Native Apple Metal GPU inference via mlx-c bindings
Instrument Generate, Classify, and BatchGenerate with: - Prefill/decode timing (separate phases) - Token counts (prompt + generated) - Throughput (tok/s for each phase) - Peak and active GPU memory via Metal allocator Wire through metalAdapter.Metrics() to go-inference interface. Test validates all fields populated after generation. Gemma3-1B 4-bit on M3 Ultra: prefill 246 tok/s, decode 82 tok/s, peak 6.2 GB GPU memory. 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 | ||