LEM/pkg/lem/backend_mlxlm.go
Snider 0e11c4487f refactor: extract pkg/heuristic subpackage for CGO-free scoring
Move HeuristicScores type and ScoreHeuristic logic into pkg/heuristic
with zero external deps (stdlib only). pkg/lem delegates via type alias
and wrapper function — fully backward compatible. Enables EaaS to
cross-compile for Linux without dragging in go-ml/go-mlx/go-duckdb.

Also adds missing //go:build tag to backend_mlxlm.go.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-26 04:34:18 +00:00

8 lines
312 B
Go

//go:build darwin && arm64
package lem
// Blank import registers the mlx-lm subprocess backend with go-inference.
// This spawns a Python process using mlx-lm for inference — handles memory
// management natively via Python's refcounting (2.4 GB vs 17+ GB in CGO).
import _ "forge.lthn.ai/core/go-mlx/mlxlm"