Skip to content

Studio: support Muse Spark Open GGUFs - #13903

Merged
danielhanchen merged 1 commit into
mainfrom
studio-muse-spark
Oct 15, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-muse-spark

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Studio support for the Muse Spark Open GGUFs (unsloth/Muse-Spark-Open-816B-A42B-GGUF, llama.cpp arch muse-spark, loaded through the prebuilt llama.cpp that carries ggml-org/llama.cpp#30616).

  • Sampling defaults. A new muse-spark family uses the model card settings: temperature 1.0, top_p 1.0, top_k disabled, and min_p 0.0. The Hugging Face generation_config.json lists top_k 64, but the model card recommends top_k disabled and its benchmarks use that, so the card wins. Before this, every Muse Spark id fell through to default.yaml (0.7 / 0.95 / min_p 0.01).
    • top_k is stored as -1, Studio's "disabled" value. The llama-server payload sends it as 0, which llama.cpp reads as no top-k cutoff.
    • The pattern sits next to muse-glimmer, so Glimmer keeps its own 0.95 / 64.
  • Reasoning effort. The Muse Spark chat template accepts reasoning_effort low, medium, high or xhigh (default xhigh). Any other value hits raise_exception, and the render fails.
    • Before this change, the request builder forwarded the OpenAI none sentinel as-is, and the default-effort path forwarded none, minimal and max. All of them failed.
    • Muse Spark cannot turn reasoning off. So for the muse-spark architecture only, none and minimal now map to low and max maps to xhigh. Inkling's numeric mapping and every other architecture are unchanged.

Already handled by main (verified, no change needed)

  • Variant menu. On the real repo listing, the menu shows exactly the eight quants: UD-IQ1_S, UD-IQ1_M, UD-IQ2_XXS, UD-IQ2_S, UD-IQ3_XXS, UD-Q2_K_XL, UD-Q3_K_XL and UD-Q4_K_XL.
    • Each quant resolves to shard 1 plus its remaining shards.
    • The root imatrix_unsloth.gguf is never offered as a variant and never picked as the model.
  • Reasoning detection. Detection publishes the four effort levels and tool support.
    • The template opens reasoning with <|start|>assistant to=self<|message|>, so the existing recipient-channel parser handles the output: self is reasoning, user is the reply.
  • Memory planner. Tested on the real UD-IQ1_S metadata (62 blocks: 16 full-attention and 46 sliding-window layers; 163.6 GiB of weights). The planner fits 134144 tokens of context on a single B200. Larger context requests and smaller cards spread across 2 or 3 GPUs without errors.

Testing

  • New tests: tests/test_muse_spark.py, 38 tests. 12 fail on main and all pass on this branch.
    • Sampling for the repo, repo:quant, cache snapshot, local .gguf and org variants.
    • The variant menu and shard resolution for every quant.
    • The imatrix exclusion.
    • Reasoning detection.
    • Every reasoning kwarg Studio can produce, rendered against the template's effort handling.
  • Full backend suite (studio/backend/tests, -n 24): main vs this branch comparison of failing test IDs is in progress; I will update here.
  • Live check: Studio's planned argv for UD-IQ1_S (-c 134144, flash attention on), run on a model: add Muse Spark Open (text, vision and audio) ggml-org/llama.cpp#30616 llama-server build on two B200s.
    • Effort high: 511 tokens, reasoning split into reasoning_content, answer 17 x 23 = 391.
    • Effort low: 114 tokens, answer 391; the system prompt renders Reasoning strength: 8.
    • Rendering with reasoning_effort: "none" fails with HTTP 500 Unsupported reasoning_effort. That is the failure the coercion prevents.

Add a muse-spark sampling family (temperature 1.0, top_p 1.0, top_k disabled,
min_p 0.0) so every repo, repo:quant, snapshot and local .gguf id resolves to the
model card's settings instead of default.yaml.

The Muse Spark template accepts reasoning_effort low, medium, high and xhigh only
and raises on anything else. Map none and minimal to low and max to xhigh for the
muse-spark architecture so a request can never fail the render.

Tests cover sampling for every id shape, the eight-quant variant menu and shard
resolution, imatrix_unsloth.gguf never being a model, reasoning detection and that
every reasoning kwarg Studio can send renders against the template.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-15T18:10:08.334513Z abae5fc PR opened
🔒 Security Review ⚠️ Failed 2026-10-15T18:10:09.481612Z abae5fc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen
danielhanchen merged commit ad61a23 into main Oct 15, 2026
@danielhanchen
danielhanchen deleted the studio-muse-spark branch October 15, 2026 18:10
@danielhanchen
danielhanchen restored the studio-muse-spark branch October 15, 2026 18:14
danielhanchen added a commit that referenced this pull request Oct 15, 2026
…3909)

With #13846 merged, main (d303bac) is still red in Backend CI and
Repo tests, from three regressions that landed in the last few hours.
Each is reproduced locally on main and fixed here.

## 1. `test_text_io_names_its_encoding[drafter.py]` (from #13806)

```
drafter.py:222: subprocess(text = True) without encoding
```

`core/training/drafter.py` runs the drafter capability probe in a child
interpreter with `text = True` and no encoding, so the parent decodes
the child's output with the locale codec (cp1252 on Windows, ASCII under
a C locale). The guard is right and the code is what changes: the call
now passes `encoding = "utf-8", errors = "replace"`, and the child gets
`PYTHONIOENCODING=utf-8` so it writes what the parent reads. That
matches how `core/training/worker.py` runs its own probes. The payload
line is `json.dumps` output, so nothing parsed changes.

## 2. `test_backfill_splits_a_quant_suffix_the_way_the_backend_does`
(from #13899)

```
AssertionError: MXFP
```

#13899 widened the GGUF known-quant pattern from `MXFP...` to
`(?:MX|NV)FP...` so NVFP4 files get their own variant key. That change
is right, and it was made consistently in all three places that must
agree: `core/inference/llama_cpp.py` (`_GGUF_KNOWN_QUANT_RE`),
`hub/utils/gguf.py` (`_GGUF_QUANT_RE`) and the frontend's
`model-identity.ts` (`QUANT_TOKEN_SOURCE`). The test was checking that
the literal substring `MXFP` appears in `llama_cpp.py`, which it no
longer does.

The test now checks the property it was standing in for: it reads the
pattern string out of both Python modules with `ast` (adjacent literals
joined as Python joins them) and the TypeScript constant, asserts all
three are identical, and asserts the shared pattern still fully matches
`MXFP4`, `NVFP4`, `IQ4_XS`, `TQ1_0`, `Q4_K_M`, `Q8_0`, `BF16`, `F16` and
`F32`. That is stricter than before, since a pattern edited on one side
only now fails, and it no longer breaks on a correct rewording.

## 3. `test_every_tracked_python_file_is_already_formatted`

Formatter drift (pinned ruff 0.6.9 via `scripts/run_ruff_format.py`),
output only, no logic change:

| file | from |
| --- | --- |
| `studio/backend/core/inference/llama_cpp.py`, `offload_layout.py`,
`tests/test_nemotron35_bolt_super.py`,
`tests/test_nemotron35_planner.py` | #13899 |
| `studio/backend/tests/test_muse_spark.py` | #13903 |
| `tests/test_norm_fast_launch.py`, `unsloth/kernels/layernorm.py` |
#13889 |
| `tests/test_remote_code_class_and_expert_submodules.py`,
`unsloth/models/_utils.py` | #13851 |
| `tests/test_triton_fp_fusion.py` | #13846 |

## Verification

- `tests/test_formatter_fixed_point.py` (ruff 0.6.9): fails on main, 16
passed here.
- `tests/studio/test_model_picker_contracts.py` and
`tests/test_runtime_text_encoding.py`: 210 passed.
- `studio/backend/tests/test_text_io_encoding.py`,
`test_nemotron35_bolt_super.py`, `test_drafter_training.py`: all pass
except `test_capability_child_process_runs_for_real`, which fails
identically on main without this change on this host (it runs the probe
in a real child interpreter) and is not failing in CI.
- Sabotage on the rewritten picker guard: dropping `NV` from the pattern
in `hub/utils/gguf.py` only, or in `model-identity.ts` only, fails it;
restored, it passes.
- Sabotage for (1) is main itself: without the encoding, the guard fails
as quoted above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant