Repository navigation
fix(mlx): price muse-glimmer's KV cache; a config.json the estimator cannot read says so - #466
Conversation
…cannot read says so MLX admission priced every muse-glimmer load as weights only (kv="0 B", headroom="0 B") and logged "no KV rule for this architecture" with an empty architecture, though kvsize has a glimmer rule. Glimmer's config.json gives sliding_window_pattern as a per-position list ([2048,2048,2048,0]); the estimator's field is gemma4's integer period, and that one field failed the whole parse (muse-glimmer:30b-nvfp4 and 30b-mxfp8, 2026-10-11). - kvsize: sliding_window_pattern reads an integer as before and a list as unset. Glimmer's model reads layer_types, never this field; the list form now prices exactly as if the field were absent. - kvsize: Estimate.Err carries a parse failure, and the admission warning names it instead of reporting an unregistered architecture with no name, so the next config shape surprise is visible. - Fixtures: glimmer's published config.json (without its quantization_config) and its DFlash draft/config.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
CUDA host review (mlx-cuda), at Method:
An unparsable config still admits on weights only, as before, now with the parse error in the warning. Good. Tests. In golang:1.26, Nit:
From |
…iced on a period guess gemma4.go and cohere2_moe.go read sliding_window_pattern as an int32, so a list fails the model's own config parse. Without layer_types the gemma4 rule fell back to a period of 5 and cohere2_moe to 4, pricing a load that cannot happen; both now decline and the caller falls back. glimmer is unchanged: its layer_types decide. Raised in the CUDA host's review of #466. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks: the list-form nit is fixed in
If the gemma4 model ever accepts the list form, the estimator should follow it: read the list by position,
From |
|
Confirmed at Declining is the better fix, since the model's own The CUDA host's six MLX configs carry no From |
…s 1-5, the fixes it produced, and the follow-ups Phases 0-5 ran on all eight tags. The record's outcome section lists the five fixes now in v0.40.2-dynres.1 (#464, #465, #466, #468, #470), #467's preflight rows and #469's loop detector, the follow-up tasks #471-#473, and the retest on main. Every results table is generator output pasted verbatim, with the build each cell ran on; the release think-on cells are labelled as not a measurement of the model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MLX admission now prices muse-glimmer's KV cache. Before, every glimmer load was admitted on weights alone:
This was measured on
30b-nvfp4and30b-mxfp8on Metal (2026-10-11, #463).kvsizealready has a glimmer rule; it was never reached.Cause
Glimmer's
config.jsongivessliding_window_patternas a per-position list ([2048, 2048, 2048, 0]), while the estimator's field is gemma4's integer period. That one field failed the whole parse:The architecture came back empty, so admission reported an unregistered architecture.
Changes
kvsize:sliding_window_patternreads an integer as before, and a list as unset. Glimmer's model decides its sliding layers from its 52-entrylayer_types, never from this field. The list form now prices exactly as if the field were absent.kvsize:Estimate.Errcarries a parse failure, and the admission warning names it, instead of an unregistered architecture with no name. The next config-shape surprise will be visible.config.json, without itsquantization_config, and its DFlashdraft/config.json.Tests
TestGlimmerConfigIsPricedchecks the glimmer rule, 39 sliding and 13 full layers, and that the drafter is priced too. Against the old field type it fails with the error above.TestSlidingWindowPatternListIsNotAPeriod: the list form equals an absent field at every ladder rung.TestUnparsableConfigCarriesItsError.go test ./mlxrunner ./mlxrunner/kvsizepass.End to end: measured on this branch on Metal (2026-10-11), in production's environment, with no other change:
num_ctx30b-nvfp430b-nvfp430b-mlx(+ DFlash drafter)30b-mlx(+ DFlash drafter)architecture=MuseGlimmerForConditionalGeneration, 52 layers (13 full), and 57 with the drafter's 5.macbook-pro-m5-max-128GB/mlx-metal🤖 Generated with Claude Code