{"record":{"id":"5688bb583f19f62a","repo":"sgl-project/sglang","slug":"not-a-complete-raw-muse-glimmer-hf-checkpoint-le","errorCode":null,"errorMessage":"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}","messagePattern":"not a complete raw Muse Glimmer HF checkpoint: (.+?) missing keys (.+?)(.+?), (.+?) unexpected keys (.+?)(.+?)(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/hardware_backend/mlx/models/muse_glimmer_mlx.py","lineNumber":655,"sourceCode":"        text_keys = {\n            k\n            for k in weights\n            if not any(marker in k for marker in _VISION_KEY_MARKERS)\n            and \"rotary_emb\" not in k\n        }\n        expected = self._expected_raw_keys()\n        missing = sorted(expected - text_keys)\n        unexpected = sorted(text_keys - expected)\n        if missing or unexpected:\n            hint = \"\"\n            gate_missing = all(\"output_gate_proj\" in k for k in missing) and missing\n            if gate_missing and not unexpected:\n                hint = (\n                    \" (weights look already fused: if this is a packaged \"\n                    'artifact, its config.json must carry \"muse_glimmer_mlx_format\": '\n                    f\"{MUSE_GLIMMER_MLX_FORMAT_VERSION})\"\n                )\n            raise ValueError(\n                \"not a complete raw Muse Glimmer HF checkpoint: \"\n                f\"{len(missing)} missing keys {missing[:4]}\"\n                f\"{'...' if len(missing) > 4 else ''}, \"\n                f\"{len(unexpected)} unexpected keys {unexpected[:4]}\"\n                f\"{'...' if len(unexpected) > 4 else ''}{hint}\"\n            )\n\n        H = self.args.num_attention_heads\n        D = self.args.head_dim\n        hidden = self.args.hidden_size\n\n        embed_shape = tuple(weights[\"model.embed_tokens.weight\"].shape)\n        if embed_shape != (self.args.vocab_size, hidden):\n            raise ValueError(\n                f\"embed_tokens.weight has shape {embed_shape} but config says \"\n                f\"(vocab_size, hidden_size) = ({self.args.vocab_size}, {hidden})\"\n            )\n        raw_q_shape = tuple(weights[\"model.layers.0.self_attn.q_proj.weight\"].shape)","sourceCodeStart":637,"sourceCodeEnd":673,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/hardware_backend/mlx/models/muse_glimmer_mlx.py#L637-L673","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: fused weights, config.json lacks the marker -> missing gate keys\n// after: add to config.json\n\"muse_glimmer_mlx_format\": 1  // = MUSE_GLIMMER_MLX_FORMAT_VERSION","handlingStrategy":"fallback","validationCode":"expected = expected_raw_keys(cfg)\nmissing = expected - set(weight_keys); unexpected = set(weight_keys) - expected\nif missing and not unexpected and all(\"output_gate_proj\" in k for k in missing):\n    cfg.setdefault(\"muse_glimmer_mlx_format\", VERSION)  # looks packaged","typeGuard":null,"tryCatchPattern":"try:\n    w = sanitize(weights)\nexcept ValueError as e:\n    if \"look already fused\" in str(e):\n        cfg[\"muse_glimmer_mlx_format\"] = VERSION; w = sanitize(weights)","preventionTips":["Keep config.json and safetensors together from the same export","Validate shard completeness (all keys present) before loading"],"tags":["checkpoint-integrity","missing-keys","weight-loading"],"backgroundTag":"checkpoint-key-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}