go-mlx/internal/metal
Snider 4d1bff3d78 refactor(api): clean root package — interfaces only, metal auto-registered
Root package now contains only:
- mlx.go: package doc + go:generate directives
- textmodel.go: TextModel, Token, Message interfaces
- options.go: GenerateOption, LoadOption functional options
- backend.go: Backend interface, Register/Get/Default/LoadModel
- register_metal.go: build-tagged init() + adapter + memory delegates
- mlx_stub.go: non-darwin fallback

internal/metal/ has its own Token, GenerateConfig, Model types.
register_metal.go adapts between the two via metalAdapter.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 20:04:19 +00:00
..
array.go refactor(metal): move dtype, array, metal, stream to internal/metal 2026-02-19 19:34:38 +00:00
array_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
backend.go refactor(api): clean root package — interfaces only, metal auto-registered 2026-02-19 20:04:19 +00:00
cache.go refactor(metal): flatten model, tokenizer, sample, cache into internal/metal 2026-02-19 19:51:14 +00:00
cache_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
compile.go refactor(metal): move ops, slice, random, fast, compile to internal/metal 2026-02-19 19:39:49 +00:00
dtype.go refactor(metal): move dtype, array, metal, stream to internal/metal 2026-02-19 19:34:38 +00:00
fast.go refactor(metal): move ops, slice, random, fast, compile to internal/metal 2026-02-19 19:39:49 +00:00
fast_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
gemma3.go refactor(metal): flatten model, tokenizer, sample, cache into internal/metal 2026-02-19 19:51:14 +00:00
generate.go refactor(api): clean root package — interfaces only, metal auto-registered 2026-02-19 20:04:19 +00:00
grad.go refactor(metal): move nn, io, grad, lora, optim to internal/metal 2026-02-19 19:39:58 +00:00
grad_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
io.go refactor(metal): move nn, io, grad, lora, optim to internal/metal 2026-02-19 19:39:58 +00:00
lora.go refactor(metal): move nn, io, grad, lora, optim to internal/metal 2026-02-19 19:39:58 +00:00
lora_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
metal.go refactor(metal): move dtype, array, metal, stream to internal/metal 2026-02-19 19:34:38 +00:00
model.go refactor(metal): flatten model, tokenizer, sample, cache into internal/metal 2026-02-19 19:51:14 +00:00
nn.go refactor(metal): move nn, io, grad, lora, optim to internal/metal 2026-02-19 19:39:58 +00:00
nn_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
ops.go refactor(metal): move ops, slice, random, fast, compile to internal/metal 2026-02-19 19:39:49 +00:00
ops_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
optim.go refactor(metal): move nn, io, grad, lora, optim to internal/metal 2026-02-19 19:39:58 +00:00
optim_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
qwen3.go refactor(metal): flatten model, tokenizer, sample, cache into internal/metal 2026-02-19 19:51:14 +00:00
random.go refactor(metal): move ops, slice, random, fast, compile to internal/metal 2026-02-19 19:39:49 +00:00
sample.go refactor(metal): flatten model, tokenizer, sample, cache into internal/metal 2026-02-19 19:51:14 +00:00
sample_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00
slice.go refactor(metal): move ops, slice, random, fast, compile to internal/metal 2026-02-19 19:39:49 +00:00
stream.go refactor(metal): move dtype, array, metal, stream to internal/metal 2026-02-19 19:34:38 +00:00
tokenizer.go refactor(metal): flatten model, tokenizer, sample, cache into internal/metal 2026-02-19 19:51:14 +00:00
tokenizer_test.go refactor(metal): move all tests to internal/metal (148 tests passing) 2026-02-19 20:00:02 +00:00