Native Apple Metal GPU inference via mlx-c bindings
Model.Close() now walks the full model tree (Gemma3/Qwen3) and explicitly frees all weight arrays. Handles tied output weights, nil safety, idempotent double-close. Helpers: freeLinear, freeEmbedding, freeRMSNorm, freeCaches, closeGemma, closeQwen3. Array.Iter() returns iter.Seq[float32] for range-over-func iteration. Handles non-contiguous arrays and supports early break. 192 tests passing (12 new: 8 close, 4 iter). Co-Authored-By: Virgil <virgil@lethean.io> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| cpp | ||
| docs/plans | ||
| internal/metal | ||
| .gitignore | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| FINDINGS.md | ||
| go.mod | ||
| mlx.go | ||
| mlx_stub.go | ||
| mlx_test.go | ||
| register_metal.go | ||
| TODO.md | ||