{"record":{"id":"7fd20daf7c3c71b3","repo":"sgl-project/sglang","slug":"config-json-claims-a-packaged-muse-glimmer-mlx-art","errorCode":null,"errorMessage":"config.json claims a packaged Muse Glimmer MLX artifact (muse_glimmer_mlx_format={MUSE_GLIMMER_MLX_FORMAT_VERSION}) but the weights contain raw-checkpoint keys {stray[:4]}{'...' if len(stray) > 4 else ''}; the marker belongs on packaged artifacts only — repackage from the raw HF export","messagePattern":"config\\.json claims a packaged Muse Glimmer MLX artifact \\(muse_glimmer_mlx_format=(.+?)\\) but the weights contain raw-checkpoint keys (.+?)(.+?); the marker belongs on packaged artifacts only — repackage from the raw HF export","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/sglang/srt/hardware_backend/mlx/models/muse_glimmer_mlx.py","lineNumber":623,"sourceCode":"                    \"mlp.up_proj.weight\",\n                    \"mlp.down_proj.weight\",\n                )\n            )\n            if self.args.use_attn_output_gate:\n                keys.add(prefix + \"self_attn.output_gate_proj.weight\")\n        return keys\n\n    def sanitize(self, weights: dict) -> dict:\n        if self.args.muse_glimmer_mlx_format == MUSE_GLIMMER_MLX_FORMAT_VERSION:\n            # Packaged artifact: weights are already fused/folded.  A raw-only\n            # key here means the marker was stamped on the wrong directory.\n            stray = sorted(\n                k\n                for k in weights\n                if any(marker in k for marker in _RAW_ONLY_KEY_MARKERS)\n            )\n            if stray:\n                raise ValueError(\n                    \"config.json claims a packaged Muse Glimmer MLX artifact \"\n                    f\"(muse_glimmer_mlx_format={MUSE_GLIMMER_MLX_FORMAT_VERSION}) but the \"\n                    f\"weights contain raw-checkpoint keys {stray[:4]}\"\n                    f\"{'...' if len(stray) > 4 else ''}; the marker belongs \"\n                    \"on packaged artifacts only — repackage from the raw HF export\"\n                )\n            return weights\n\n        # No marker: a raw HF export, possibly in the RC multimodal layout —\n        # normalize that to the raw schema first.\n        if any(k.startswith(_RC_PREFIX) for k in weights):\n            weights = _normalize_rc_layout(weights)\n\n        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","sourceCodeStart":605,"sourceCodeEnd":641,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/hardware_backend/mlx/models/muse_glimmer_mlx.py#L605-L641","documentation":"The loader found raw-checkpoint-only key markers in the weights even though config.json claims a packaged artifact (muse_glimmer_mlx_format is set). Raw-only keys (e.g. separate output_gate_proj weights) must have been fused during packaging, so their presence means the format marker was applied to a non-packaged (raw) checkpoint.","triggerScenarios":"Calling sanitize/load on weights that still contain keys matching _RAW_ONLY_KEY_MARKERS while the config carries muse_glimmer_mlx_format — typically someone manually added the marker to a raw HF export's config.json to work around the fused-gate error (3576/3578).","commonSituations":"Hand-editing config.json to silence a previous loader error instead of actually repackaging, or a partial/failed packaging run that copied the config but left raw weights.","solutions":["Remove the muse_glimmer_mlx_format key from config.json if the weights are raw","Or properly repackage the raw HF export with the matching packager so the gate is fused and raw keys disappear","Never hand-add the format marker; only the packager sets it"],"exampleFix":"// before: raw weights + \"muse_glimmer_mlx_format\": 1 in config.json\n// after: delete that key from config.json (weights are raw)\n// or repackage: python -m sglang.srt.hardware_backend.mlx.pack muse-glimmer raw_dir out_dir","handlingStrategy":"validation","validationCode":"fmt = cfg.get(\"muse_glimmer_mlx_format\")\nif fmt is not None:\n    stray = [k for k in weight_keys if any(m in k for m in RAW_ONLY_MARKERS)]\n    assert not stray, f\"raw keys present: {stray[:4]}\"","typeGuard":null,"tryCatchPattern":"try:\n    weights = sanitize(weights)\nexcept ValueError as e:\n    if \"raw-checkpoint keys\" in str(e):\n        del cfg[\"muse_glimmer_mlx_format\"]; weights = sanitize(weights)  # retry as raw","preventionTips":["Never hand-add the format marker to config.json","Only the packager writes muse_glimmer_mlx_format"],"tags":["checkpoint-format","packaging","weight-keys"],"backgroundTag":"checkpoint-format-mismatch","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}