Serve Muse Spark Open
Serve Muse Spark Open with MXFP4 on eight AMD MI355X GPUs or NVFP4 on four NVIDIA B300 GPUs, and tune the serving configuration for your workload.
Prerequisites
Before you start, complete the following prerequisites:
- Complete the Getting started setup so that the
tscommand is available. Installcurlfor the verification steps. - A checkpoint that exposes the model type
muse_sparkand the architectureMuseSparkForConditionalGeneration. The runtime reads the sliding-attention and no-RoPE schedule from this configuration. - To use the automatic Muse parser and grammar-backend defaults, a
tokenspeed-smgbuild with smg's Muse Spark support (smg main from 2026-10-16 on). Explicit parser and grammar-backend flags override these defaults. - One of the following hardware and checkpoint combinations:
- Eight MI355X GPUs (gfx950), the AMD Quark MXFP4 checkpoint, and the DFlash2 draft checkpoint.
- Four B300 GPUs and the
meta-models/Muse-Spark-Open-816B-A42B-NVFP4checkpoint.
Model defaults and input handling
Numerics and checkpoint processing
Muse Spark Open runs on the shared model path: vendor-neutral Triton kernels with capability-gated NVIDIA fast paths that keep the same numerics. The residual stream, the layer boundaries, and the final norm run in FP32; the attention and MoE branch outputs and the final-norm output are BF16.
The gateway loads the checkpoint's chat_template.jinja; pass --chat-template only to override it.
Parsing and sampling defaults
ts serve selects the muse reasoning and tool parsers: the self channel becomes reasoning_content, user and commentary stay visible, <|eom|> closes a channel, and <|eot|> closes the turn. The bundled gateway reads them with its Symphony parser, which ts serve selects with --parser symphony. Forced tool calls and JSON answers run through the engine's xgrammar backend, which ts serve turns on for this model (--grammar-backend xgrammar).
Sample with the checkpoint's generation_config.json defaults (temperature=1.0, top_p=1.0, top_k=64); greedy decoding is loop-prone for this checkpoint. The checkpoint's chat_template.jinja renders reasoning_effort (minimal, low, medium, high, xhigh) as a reasoning-strength line and defaults to medium. The OpenAI reasoning_effort field and chat_template_kwargs.reasoning_effort both reach the template. chat_template_kwargs.force_nonempty_content=true promotes an unterminated self channel to visible content.
Multimodal inputs
Images and video use the chat template's <image> and <video> anchors and the checkpoint's vision tower. Audio uses the <audio> anchor: one <|audio|> token per 1,920 samples of mono 24 kHz, encoded by the checkpoint's audio tower. SMG performs the preprocessing and anchor expansion.
Serve on eight MI355X GPUs with MXFP4
The AMD Quark MXFP4 checkpoint quantizes the routed-expert weights and activations of all but the first and last layers to MXFP4 and keeps everything else in BF16. With MoE TP8 and EP1, TokenSpeed shards every expert over its intermediate dimension, so each GPU holds all 256 experts and no tokens are dispatched between GPUs. This configuration adds the DFlash2 draft and an FP8 KV cache. The draft proposes seven tokens per step, and --enable-speculative-sampling verifies them by rejection sampling, so sampled requests keep the target model's output distribution.
Start TokenSpeed with the MXFP4 checkpoint and DFlash2 draft. If you use local checkpoints, replace the
--modeland--speculative-draft-model-pathvalues with your local paths:bashDEBUG_HIP_FORCE_GRAPH_QUEUES=1 DEBUG_HIP_GRAPH_BATCH_SIZE=1 ts serve \ --model amd/Muse-Spark-Open-816B-A42B-Quark-MXFP4 \ --served-model-name muse-spark \ --tp 8 \ --moe-tp-size 8 \ --ep-size 1 \ --dtype bfloat16 \ --quantization mxfp4 \ --moe-backend gluon \ --kv-cache-dtype fp8_e4m3 \ --max-model-len 1048576 \ --max-num-seqs 2 \ --prefill-decode-interval 192 \ --max-prefill-tokens 8192 \ --chunked-prefill-size 8192 \ --cudagraph-capture-sizes 1 2 3 4 5 6 8 12 16 32 64 \ --max-cudagraph-capture-size 64 \ --disable-prefill-graph \ --gpu-memory-utilization 0.92 \ --sampling-backend triton \ --disable-kvstore \ --kvstore-ratio 0.0 \ --speculative-algorithm DFLASH \ --speculative-draft-model-path RadixArk/Muse-Spark-Open-DFlash2 \ --speculative-draft-model-quantization fp8_weight_only \ --speculative-num-steps 7 \ --speculative-eagle-topk 1 \ --speculative-num-draft-tokens 8 \ --enable-speculative-sampling \ --host 127.0.0.1 \ --port 8000Confirm that the gateway is ready. If you changed the host or port, replace
127.0.0.1:8000with your gateway address:bashcurl --fail http://127.0.0.1:8000/readinessA successful request returns an HTTP success status, and
curlexits with status0.
MXFP4 context, draft, and memory behavior
--max-model-len 1048576 keeps the checkpoint's native context, which agentic workloads with long cached prefixes need; prefix caching is on by default.
--speculative-draft-model-quantization fp8_weight_only streams the draft's MLP, o_proj, and LM-head weights in FP8 with one scale per output row, which shortens each draft step at unchanged acceptance.
With MXFP4 experts at MoE TP8 and EP1, startup also builds a column-split copy of the expert down-projection weights for prefill. The copy holds one more set of those weights on each GPU, which leaves less memory for the KV cache. While the copy exists, TokenSpeed refuses live weight updates.
HIP runtime and graph capture settings
The two HIP runtime settings are needed for speed; TokenSpeed does not set them itself. DEBUG_HIP_FORCE_GRAPH_QUEUES=1 matters most for the two-stream speculative decode graph. The extra capture sizes (3, 5, 6, 12) cut padding at the small batch sizes that speculative decoding runs at.
Tune concurrency and prefill scheduling
For multi-turn agentic traffic, choose --max-num-seqs and --prefill-decode-interval by concurrency, as listed in the following table. The launch command uses the row for a concurrency of 2:
| Concurrency | --max-num-seqs | --prefill-decode-interval |
|---|---|---|
| 1 | 1 | 0 |
| 2 | 2 | 192 |
| 4 | 2 | 96 |
| 8 | 2 | 256 |
| 16 | 3 | 384 |
A --max-num-seqs below the concurrency queues the extra requests. With an interval of N, the scheduler runs N decode rounds after each prefill chunk before the next one. Both keep decode batches small and uninterrupted, which lowers TPOT, but queued and deferred prompts wait longer for their first token. At a concurrency of 8, time-to-first-token is noticeably higher. If time-to-first-token matters more, raise --max-num-seqs and lower the interval.
--prefill-decode-interval needs a tokenspeed-scheduler release that includes the prefill/decode interval. With an older scheduler, leave it at 0.
Serve on four B300 GPUs with NVFP4
The NVFP4 checkpoint quantizes the experts of all but the first and last layers and keeps everything else in BF16. On a four-GPU B300 node, the decode path pairs TRT-LLM attention with the TRT-LLM FP4 MoE kernels.
Start TokenSpeed with the NVFP4 checkpoint. If you use a local checkpoint, replace the
--modelvalue with your local path:bashts serve \ --model meta-models/Muse-Spark-Open-816B-A42B-NVFP4 \ --served-model-name muse-spark \ --tp 4 \ --ep-size 4 \ --attention-backend trtllm \ --moe-backend flashinfer_trtllm \ --dtype bfloat16 \ --max-model-len 65536 \ --max-num-seqs 8 \ --cudagraph-capture-sizes 1 2 4 8 \ --max-cudagraph-capture-size 8 \ --sampling-backend flashinferConfirm that the gateway is ready. If you changed the host or port, replace
127.0.0.1:8000with your gateway address:bashcurl --fail http://127.0.0.1:8000/readinessA successful request returns an HTTP success status, and
curlexits with status0.
NVFP4 execution behavior
Overlap scheduling and the prefill graph stay on: the graph serves text and multimodal prefills up to its largest bucket, where it cuts short-prompt time-to-first-token by several times. Decode is weight-stream bound, so the layer fuses its norms, residual gate, expert-input quantization, and the sharded pre-expert and post-expert projection gathers into few launches, all under programmatic dependent launch. At decode batch sizes, the top-k kernel also writes the expert GEMMs' routing metadata, so the experts launch without a routing kernel of their own.
Expert inputs are scaled by the checkpoint's calibrated static input scales, folded into the MoE kernel's dequantization scalars.
Optional: Reduce KV cache memory with FP8
Add --kv-cache-dtype fp8_e4m3 to the B300 launch command to halve the KV cache on the same decode path. The RoPE kernel writes K/V in FP8 directly.