Skip to content

MiniMax M3 ​

Serve nvidia/MiniMax-M3-NVFP4 with an EAGLE3 or DSpark draft on four NVIDIA GPUs.

MiniMax M3 uses 128-token MiniMax Sparse Attention (MSA) blocks. TokenSpeed configures its dense and sparse attention layers automatically. Select the dense backend with --attention-backend and run with --disable-kvstore.

Prerequisites ​

  • Install TokenSpeed and make the tokenspeed command available on your PATH. For installation instructions, see Getting started.
  • Use four NVIDIA GPUs for the example commands, which set --tensor-parallel-size 4.
  • Make the nvidia/MiniMax-M3-NVFP4 target checkpoint and your chosen draft checkpoint available: Inferact/MiniMax-M3-EAGLE3 or nvidia/MiniMax-M3-DSpark.
  • Review and trust the checkpoints' remote code. Both commands pass --trust-remote-code.
  • Make TCP port 8000 available and install curl for the verification steps.

Serve with an EAGLE3 draft ​

  1. Start the server with the EAGLE3 draft and an 81,920-token context limit. The command uses the published checkpoint IDs. If your checkpoints are stored locally, replace nvidia/MiniMax-M3-NVFP4 and Inferact/MiniMax-M3-EAGLE3 with their local paths:

    bash
    tokenspeed serve nvidia/MiniMax-M3-NVFP4 \
        --tensor-parallel-size 4 \
        --max-model-len 81920 \
        --max-num-seqs 16 \
        --max-prefill-tokens 8192 \
        --chunked-prefill-size 8192 \
        --disable-cuda-graph-padding \
        --attention-backend trtllm \
        --kv-cache-dtype fp8 \
        --moe-backend flashinfer_trtllm \
        --speculative-algorithm EAGLE3 \
        --speculative-draft-model-path Inferact/MiniMax-M3-EAGLE3 \
        --speculative-num-steps 3 \
        --speculative-eagle-topk 1 \
        --speculative-num-draft-tokens 4 \
        --disable-kvstore \
        --trust-remote-code \
        --host 0.0.0.0 \
        --port 8000
  2. From another terminal, check whether the server is ready. If you changed --host or --port, replace 127.0.0.1:8000 with the server's address:

    bash
    curl --fail --silent --show-error http://127.0.0.1:8000/readiness

    When the server is ready, the endpoint returns HTTP 200, and curl exits successfully.

Serve with a DSpark draft ​

nvidia/MiniMax-M3-DSpark is a six-layer Qwen3-shaped grouped-query attention (GQA) block drafter with a vanilla Markov head.

  1. Start the server with the DSpark draft and a 262,144-token context limit. The command uses the published checkpoint IDs. If your checkpoints are stored locally, replace nvidia/MiniMax-M3-NVFP4 and nvidia/MiniMax-M3-DSpark with their local paths:

    bash
    tokenspeed serve nvidia/MiniMax-M3-NVFP4 \
        --tensor-parallel-size 4 \
        --max-model-len 262144 \
        --max-num-seqs 16 \
        --max-prefill-tokens 8192 \
        --chunked-prefill-size 8192 \
        --disable-cuda-graph-padding \
        --attention-backend trtllm \
        --kv-cache-dtype fp8 \
        --moe-backend flashinfer_trtllm \
        --speculative-algorithm DSPARK \
        --speculative-draft-model-path nvidia/MiniMax-M3-DSpark \
        --speculative-num-steps 8 \
        --speculative-eagle-topk 1 \
        --speculative-num-draft-tokens 9 \
        --disable-kvstore \
        --trust-remote-code \
        --host 0.0.0.0 \
        --port 8000
  2. From another terminal, check whether the server is ready. If you changed --host or --port, replace 127.0.0.1:8000 with the server's address:

    bash
    curl --fail --silent --show-error http://127.0.0.1:8000/readiness

    When the server is ready, the endpoint returns HTTP 200, and curl exits successfully.

DSpark configuration and validation ​

  • This checkpoint's block_size is 8, and a DSpark block_size is the drafted token count, so launch it with --speculative-num-steps 8 and --speculative-num-draft-tokens 9: the verify window is one anchor row plus eight draft queries. Startup checks both widths against the checkpoint, so a mismatched launch fails fast instead of drafting a wrong-width block. For more information about the DSpark and DFlash conventions, see Block drafters.
  • The draft writes its key-value (KV) entries at the target's cache locations and shares the target's page table, so it inherits the target's 128-token MSA prefix granularity.
  • The draft's 1,024-token sliding window is an attention mask its own layers apply. It is deliberately not a cache-retention policy, because the draft's pages are the target's pages.
  • The target model captures features from the residual stream after each layer in dflash_config.target_layer_ids ([1, 12, 23, 35, 46, 57] of M3's 60 layers); the draft concatenates them in ascending layer order to feed its fc.
  • The draft checkpoint stores fp32 master weights. TokenSpeed loads it in the target's dtype rather than the standalone fp32-to-fp16 default, because the two exchange hidden states and share the target's embedding and language model (LM) head.
  • Measured on 4x GB300 with the preceding launch: GSM8K mean_acc 0.9719 versus 0.9704 without speculative decoding (paired disagreement 10 versus 8, McNemar p ~ 0.81, within run-to-run noise), so the draft does not move accuracy.

TokenSpeed documentation