ML inference backends, scoring engine, agent orchestrator
Find a file
Snider 57fb08928c
All checks were successful
Security Scan / security (push) Successful in 15s
Test / test (push) Successful in 11m19s
chore: bump forge.lthn.ai dep versions to latest tags
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-26 05:34:22 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:29:04 +00:00
api refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
cmd chore: replace monolithic chat.js with TypeScript-built bundle 2026-02-24 18:24:22 +00:00
docs docs: archive completed backend-result-type plan 2026-02-24 13:51:21 +00:00
scripts feat: add Ubuntu workstation setup script from CLI 2026-02-21 21:20:13 +00:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:41 +00:00
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:41 +00:00
adapter.go feat: add InspectAttention pass-through on InferenceAdapter 2026-02-23 00:37:37 +00:00
adapter_attention_test.go feat: add InspectAttention pass-through on InferenceAdapter 2026-02-23 00:37:37 +00:00
adapter_test.go test: update all test assertions for Result type 2026-02-22 17:45:32 +00:00
agent_config.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
agent_eval.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
agent_execute.go refactor: modernise to Go 1.26 — iterators, slices, maps 2026-02-23 06:11:55 +00:00
agent_influx.go refactor: modernise to Go 1.26 — iterators, slices, maps 2026-02-23 06:11:55 +00:00
agent_ssh.go feat: add RemoteTransport interface for SSH abstraction 2026-02-20 03:09:42 +00:00
agent_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
approve.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
backend_http.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
backend_http_test.go test: update all test assertions for Result type 2026-02-22 17:45:32 +00:00
backend_http_textmodel.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
backend_http_textmodel_test.go feat(backend): add HTTP/Llama TextModel wrappers + verify downstream 2026-02-20 01:23:34 +00:00
backend_llama.go feat(llama): return Result from Generate/Chat 2026-02-22 17:37:34 +00:00
backend_llama_test.go test: update all test assertions for Result type 2026-02-22 17:45:32 +00:00
backend_mlx.go feat(adapter): bridge go-inference TextModel to ml.Backend/StreamingBackend 2026-02-20 00:52:34 +00:00
backend_mlx_test.go test: update all test assertions for Result type 2026-02-22 17:45:32 +00:00
benchmark_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
compare.go chore: use slices.Sorted(maps.Keys()) for ordered iteration 2026-02-24 16:03:25 +00:00
consolidate.go refactor: modernise to Go 1.26 — iterators, slices, maps 2026-02-23 06:11:55 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:41 +00:00
convert.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
coverage.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
db.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
exact.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
exact_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
expand.go refactor: unwrap Result.Text in expand, judge, agent_eval 2026-02-22 17:39:17 +00:00
export.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
gguf.go chore: sort.Slice → slices.SortFunc 2026-02-24 16:00:38 +00:00
go.mod chore: bump forge.lthn.ai dep versions to latest tags 2026-02-26 05:34:22 +00:00
go.sum chore: bump forge.lthn.ai dep versions to latest tags 2026-02-26 05:34:22 +00:00
heuristic.go chore: use min()/max() builtins (Go 1.21+) 2026-02-24 16:02:03 +00:00
heuristic_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
import_all.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
inference.go feat: add Result type, break Backend interface to return Result 2026-02-22 17:36:16 +00:00
influx.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
ingest.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
inventory.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
io.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
judge.go refactor: unwrap Result.Text in expand, judge, agent_eval 2026-02-22 17:39:17 +00:00
judge_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
metrics.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
normalize.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
ollama.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
parquet.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
probes.go refactor: modernise to Go 1.26 — iterators, slices, maps 2026-02-23 06:11:55 +00:00
probes_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
prompts.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
publish.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
README.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:41 +00:00
score.go refactor: modernise to Go 1.26 — iterators, slices, maps 2026-02-23 06:11:55 +00:00
score_race_test.go refactor: apply go fix modernizers for Go 1.26 2026-02-22 21:00:16 +00:00
score_test.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
seed_influx.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
service.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00
status.go chore: sort.Slice → slices.SortFunc 2026-02-24 16:00:38 +00:00
Taskfile.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:41 +00:00
types.go feat: extract go-ml from go-ai as standalone ML package 2026-02-19 18:32:04 +00:00
worker.go chore: fmt.Errorf(static) → errors.New 2026-02-24 15:58:11 +00:00

Go Reference License: EUPL-1.2 Go Version

go-ml

ML inference backends, multi-suite scoring engine, and agent orchestrator for the Lethean AI stack. The package provides pluggable backends (Apple Metal via go-mlx, managed llama-server subprocesses, and OpenAI-compatible HTTP APIs), a concurrent scoring engine that evaluates model responses across heuristic, semantic, content, and standard benchmark suites, 23 capability probes, GGUF model management, and an SSH-based agent orchestrator that streams checkpoint evaluation results to InfluxDB and DuckDB.

Module: forge.lthn.ai/core/go-ml Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import "forge.lthn.ai/core/go-ml"

// HTTP backend (Ollama, LM Studio, any OpenAI-compatible endpoint)
backend := ml.NewHTTPBackend("http://localhost:11434", "qwen3:8b")
resp, err := backend.Generate(ctx, "Hello", ml.GenOpts{MaxTokens: 256})

// Scoring engine
engine := ml.NewEngine(backend, ml.Options{Suites: "heuristic,semantic", Concurrency: 4})
scores := engine.ScoreAll(responses)

Documentation

Build & Test

go test ./...
go test -race ./...
go test -bench=. ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.