Repository navigation
fix(muse_glimmer)!: keep the attention gate out of the qkv fusion - #741
Merged
Merged
Conversation
The NVFP4 release quantizes the attention gate with a different weight global scale than q/k/v, so one fused weight cannot carry a single global for all four parts. BREAKING CHANGE: an FTW checkpoint converted with the fused qkvg_proj no longer loads; reconvert it with `ft checkpoint`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Muse-Glimmer fused its per-head attention output gate into the q/k/v projection (
qkvg_proj). The gate is now its own linear next toqkv_proj, as vLLM builds it (qkv_proj+output_gate_proj), in every format the family loads (bf16, compressed-tensors NVFP4, GGUF).The reason is the NVFP4 release: Muse-Glimmer-30B-NVFP4 quantizes the gate with a different weight global scale than q/k/v in all 52 layers (the gate's global is down to 0.40x of q/k/v's), while q/k/v share one. main's Triton W4A16 linear keeps one global per output row, so the fused weight is exact there, but GEMMs that take one global per weight (cuBLASLt
scaled_mm, FlashInfermm_fp4, used by #737) cannot run a fused weight whose parts differ without scaling one part wrongly. Across the local NVFP4 checkpoints (Qwen3.6-27B, Qwen3.8-27B, Gemma-4-31B, Muse-Glimmer-30B, GLM-4.7) this was the only fused weight with differing per-part globals. Merge before #737.Changes
models/muse_glimmer/attention.py:qkv_proj(q, k, v) andgate_proj(the gate) instead ofqkvg_proj..self_attn.gate_projloads on its own; the full suffix keeps it out of the MLP's gate/up fusion), the GGUF reader writesqkv_projandgate_proj; the family uses the sharedqkv_proj/gate_up_projpacked mapping.docs/models.md.Breaking: an FTW checkpoint converted with
qkvg_projno longer loads; reconvert it withft checkpoint.Results
On RTX PRO 6000, main's W4A16 linears:
attn_qkv+ Q4_0 gate) giveqkv_projandgate_projoutputs equal to the oldqkvg_projoutput bitwise at T = 1 / 7 / 64 (an F16 gate now runs as a plain bf16 linear, the same bf16 values). There is no real Muse-Glimmer GGUF on this box.Tests
pytest tests/models/test_muse_glimmer.py tests/models/test_muse_glimmer_vision.py tests/server/test_muse_glimmer_parsers.py tests/models/test_quant_config.py tests/models/test_models_registry.py tests/checkpoint: 235 passed, 12 skipped, 5 failed; the 5 failures (test_quant_config.py, from the local HF cache) also fail on main. Thetest_quant_config.pyMuse-Glimmer cases that build the model on the bf16, FP8 block and NVFP4 checkpoints on disk pass with the separate gate.