Repository navigation
v0.4.16
·
84 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
What's Changed
Added
gmlx distilltrains a LoRA adapter for a small GGUF on a larger GGUF's
outputs, so the small model answers from a document without it in the prompt.gmlx traintakes--grad-checkpoint, which recomputes activations in
the backward pass so longer rows fit in memory.token_bytes,whitespace_start_maskandvocab_map_hashare exported
fromgmlxfor tools that line up two tokenizers over the same text.gmlx.stream.moe_routesrecords a forward's expert ids per layer and
replays them in a later forward over the same positions.GMLX_BATCH_INVARIANT=1keepsnn.Linearexpert routers and the gated-delta
decay gate the same at any prefill batch size, for about one percent of prefill.
Changed
- Training attention at 4096-token rows peaks at 2.8 GB instead of
10.7 GB on Qwen3.5-9B.GMLX_TRAIN_BLOCKED_ATTN=0restores MLX's path. - Training on Qwen3.5, 3.6 and Qwen4 experimental runs a chunked gated
delta scan, 64 tokens per step instead of one.GMLX_TRAIN_GDN_CHUNK=0
restores the loop. gmlx trainandgmlx distillrun float32 matmul at exact precision
unlessMLX_ENABLE_TF32is set. Training a Qwen3.5 or Qwen3.6 model with
TF32 left on prints a notice once.--moe-expert-massand--moe-expert-probenow act on gpt-oss MoE
blocks, which were reported as unsupported before.
Fixed
serveignored a request'sthinkingcontrol when the profile or
MLX_VLM_ENABLE_THINKINGsetenable_thinking. The request now wins.- Unloading a DeepSeek-V4.1 model that reads its engram tables from the GGUF
could hang while a table read was still queued. - A stalled prefill expert read could give later requests wrong output with
no error. Prefill now reads through the page cache until the model is
loaded again. - A short prefill chunk, a model unload, or process exit could hang forever
after a stalled expert read. - A test run or a long session could stop dead when an expert streaming
feeder was garbage-collected while a thread was starting. gmlx trainon a text-only Qwen3.5 or Qwen3.6 GGUF kept every state
of the gated delta scan on the gradient tape, so a 9B model ran out of
memory at the first step on rows near 1000 tokens.gmlx trainon Qwen3-Next, Kimi-K3 and GLM-5-Next ran the same
per-token scan on the tape, and the GLM-5-Next chunk kernels carried no
gradient. All three now take a checkpointed scan under training.gmlx serve --adapteron a base whose text stack sits under
language_model, such as the Qwen3.5 hybrids, refused the adapter with
every target reported as unmatched.- Serving with an adapter failed at the first decode step with
'LoRAKQuantLinear' object has no attribute 'weight'on models with
fused gate-up or q-k-v projections. - A request's
seedcould be applied to another request that arrived
while the server was busy, so a seeded reply did not repeat. gmlx trainon a MoE GGUF failed at the first step with
Cannot calculate VJP with respect to indices.gmlx trainwith its default keys failed on Qwen4 experimental and
GLM-5-Next with'LoRALinear' object has no attribute 'weight'.gmlx trainon DeepSeek-V4.1 failed at the first step with
[async_eval] Not allowed inside a graph transformation.gmlx trainon DeepSeek-V4, V4.1, GLM-5-Next and HY4 without validation
data failed at the first step with
Attempting to eval an array during function transformations.- Training on DeepSeek-V4.1 gave a zero gradient to the adapters on the
wkv
projections and on the compressor'swgate, so those modules never trained. gmlx trainon MoE, DeepSeek-V4, Qwen4 experimental, HY4 and Hadamard-folded
GGUFs failed on the GPU with[Primitive::vjp] Not implemented.gmlx trainfailed after its last step, while writing the adapter, on Qwen3.5
and 3.6 MoE bases and on architectures gguf-py cannot name, such as GLM-5-Next.- Serving with an adapter that covers a MoE model's shared expert failed at the
first decode step with'LoRAKQuantLinear' object has no attribute 'kquant_type'. gmlx serve --adapteron DeepSeek-V4 ignored the adapter on thewq_aand
wkvprojections and on the compressor'swkvandwgate.gmlx train --dropoutwith 1 or a negative value failed with a traceback
after the base model had loaded. It is now refused before the load.gmlx train --adapter-outnaming an existing folder trained the whole run and
then failed to write the adapter.gmlx train --adapter-outending in/wrote the adapter as a file named
after the folder.gmlx train --rank 0wrote an adapter thatgmlx serve --adaptercould not
load.- A
gmlx trainrun that failed or was refused before writing its adapter left
behind the empty folder made for--adapter-out. - Streamed MoE experts could return wrong values at layers whose gate+up
concat had been built, since the copy is expert-ordered while the
decode arena binds slot bytes and slot ids. Feeder-swapped calls now
gather from the bound bytes, and streamed stacks never build the copy. - A Hadamard-folded model kept the last layer's gated activation in memory
after a forward until its next one.
Full Changelog: v0.4.15...v0.4.16