sgl-project/sglang · error · ValueError
not a complete raw Muse Glimmer HF checkpoint: {len(missing)
Error message
not a complete raw Muse Glimmer HF checkpoint: {len(missing)} missing keys {missing[:4]}{'...' if len(missing) > 4 else ''}, {len(unexpected)} unexpected keys {unexpected[:4]}{'...' if len(unexpected) > 4 else ''}{hint} What it means
sanitize validated the weights against the expected raw Muse Glimmer HF checkpoint key set and found both missing and unexpected keys, so it can neither load a raw checkpoint nor treat it as packaged. When the gate projections are missing and there are no unexpected keys, a hint is appended saying the weights look already fused and the config must declare muse_glimmer_mlx_format.
Source
Thrown at python/sglang/srt/hardware_backend/mlx/models/muse_glimmer_mlx.py:655
text_keys = {
k
for k in weights
if not any(marker in k for marker in _VISION_KEY_MARKERS)
and "rotary_emb" not in k
}
expected = self._expected_raw_keys()
missing = sorted(expected - text_keys)
unexpected = sorted(text_keys - expected)
if missing or unexpected:
hint = ""
gate_missing = all("output_gate_proj" in k for k in missing) and missing
if gate_missing and not unexpected:
hint = (
" (weights look already fused: if this is a packaged "
'artifact, its config.json must carry "muse_glimmer_mlx_format": '
f"{MUSE_GLIMMER_MLX_FORMAT_VERSION})"
)
raise ValueError(
"not a complete raw Muse Glimmer HF checkpoint: "
f"{len(missing)} missing keys {missing[:4]}"
f"{'...' if len(missing) > 4 else ''}, "
f"{len(unexpected)} unexpected keys {unexpected[:4]}"
f"{'...' if len(unexpected) > 4 else ''}{hint}"
)
H = self.args.num_attention_heads
D = self.args.head_dim
hidden = self.args.hidden_size
embed_shape = tuple(weights["model.embed_tokens.weight"].shape)
if embed_shape != (self.args.vocab_size, hidden):
raise ValueError(
f"embed_tokens.weight has shape {embed_shape} but config says "
f"(vocab_size, hidden_size) = ({self.args.vocab_size}, {hidden})"
)
raw_q_shape = tuple(weights["model.layers.0.self_attn.q_proj.weight"].shape)View on GitHub (pinned to 0132848349)
Solutions
- If weights are already fused, add \"muse_glimmer_mlx_format\": <MUSE_GLIMMER_MLX_FORMAT_VERSION> to config.json
- If weights should be raw, verify all shards are present and from the same checkpoint
- Re-download or regenerate the complete checkpoint
Example fix
// before: fused weights, config.json lacks the marker -> missing gate keys // after: add to config.json "muse_glimmer_mlx_format": 1 // = MUSE_GLIMMER_MLX_FORMAT_VERSION
Defensive patterns
Strategy: fallback
Validate before calling
expected = expected_raw_keys(cfg)
missing = expected - set(weight_keys); unexpected = set(weight_keys) - expected
if missing and not unexpected and all("output_gate_proj" in k for k in missing):
cfg.setdefault("muse_glimmer_mlx_format", VERSION) # looks packaged Try / catch
try:
w = sanitize(weights)
except ValueError as e:
if "look already fused" in str(e):
cfg["muse_glimmer_mlx_format"] = VERSION; w = sanitize(weights) Prevention
- Keep config.json and safetensors together from the same export
- Validate shard completeness (all keys present) before loading
When it happens
Trigger: Loading a weight dict whose keys don't match the raw checkpoint schema — e.g. output_gate_proj.* keys absent (already fused) plus extra fused keys, or loading a different model's weights entirely.
Common situations: Loading a packaged artifact whose config.json lost the muse_glimmer_mlx_format marker, mixing safetensors shards from different models, or pointing the loader at a partially converted checkpoint.
Related errors
- expected a tensor with at least one dimension
- dimension {dim} size {dim_size} must be divisible by 2 * gro
- f"Invalid prefix for SparseVideoGen2AttentionImpl: {prefix}"
- Rank-local FSDP shard produced for non-DTensor parameter {ta
- Rank-local TP shard produced for DTensor parameter {target_p
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/5688bb583f19f62a.
Report an issue: GitHub.