vincentzed-hf commited on
Commit
d09782c
·
verified ·
1 Parent(s): 7d0d7b6

Nightly results: original MXFP4 serves and is faster there; backend warnings

Browse files
Files changed (1) hide show
  1. README.md +14 -3
README.md CHANGED
@@ -21,7 +21,18 @@ tags:
21
 
22
  NVFP4 version of [XiaomiMiMo/MiMo-V2.6-Flash-RL](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Flash-RL) for Blackwell. The routed experts run as **W4A4 NVFP4** on native FP4 Tensor Cores, and their weights are a **bit-exact transcode** of Xiaomi's released MXFP4 experts: every E2M1 code is kept byte-for-byte and each E8M0 block scale is re-expressed exactly as two E4M3 NVFP4 block scales. All 9,462,349,824 expert scale blocks convert exactly, and none are re-rounded. Every other tensor is copied byte-for-byte from the source checkpoint. The checkpoint is 175 GB (source: 178 GB).
23
 
24
- It serves on the stock `lmsysorg/sglang:v0.5.20-cu130` image on B300. On that image we could not serve the released MXFP4 checkpoint on B300: the default MoE backend routes MXFP4 experts into an FP8-only kernel, the `flashinfer_mxfp4` backend rejects MiMo's router output, and the Marlin MXFP4 path is SM90/SM120-only, and the Triton path fails a hidden-size check.
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  **About NVFP4 quantization:** NVFP4 on Blackwell couples a compact E2M1 FP4 codebook with blockwise FP8 (E4M3) scaling over 16-element micro-blocks, so that 4-bit stored values remain numerically useful for neural-network computation. The E2M1 codebook provides a small, nonuniform set of representable magnitudes up to ±6 and relies on saturating behavior rather than IEEE NaN/Inf encodings to maximize usable range per bit. Using an FP8 block scale (rather than power-of-two-only E8M0) enables fractional scales and error-minimizing scale selection. On Blackwell Tensor Cores, native FP4 multipliers exploit E2M1 simplicity to reduce multiplier area while higher-precision FP32 accumulation protects dot-product accuracy.
27
 
@@ -45,7 +56,7 @@ It serves on the stock `lmsysorg/sglang:v0.5.20-cu130` image on B300. On that im
45
 
46
  ### Deploy with SGLang
47
 
48
- Verified on `lmsysorg/sglang:v0.5.20-cu130`, 4× B300:
49
 
50
  ```bash
51
  docker run --gpus all --shm-size=64g --network=host --ipc=host \
@@ -66,7 +77,7 @@ docker run --gpus all --shm-size=64g --network=host --ipc=host \
66
 
67
  - **Attention TP must be 4.** The fused `qkv_proj` is TP=4-interleaved, as in the source checkpoint. For 8 GPUs the [SGLang MiMo cookbook](https://docs.sglang.io/cookbook/autoregressive/Xiaomi/MiMo-V2.5) uses `--tp 8 --dp 2 --enable-dp-attention`; we have only verified TP4 with this checkpoint.
68
  - `--attention-backend fa4` is required on Blackwell (asymmetric 192/128 K/V head dims); `--mm-attention-backend fa4` for the vision encoder.
69
- - `--moe-runner-backend flashinfer_cutlass` is required: on v0.5.20 the `flashinfer_trtllm` NVFP4 MoE path rejects this model.
70
  - Sampling: Xiaomi recommends `temperature=1.0, top_p=0.95`. Thinking is on by default; pass `chat_template_kwargs={"enable_thinking": false}` to turn it off.
71
  - **BF16-activation mode.** The same checkpoint also runs with BF16 activations (weight-only FP4, the reference column below): add `-e SGLANG_FLASHINFER_CUTEDSL_NVFP4_W4A16=1` to `docker run` and replace the MoE flags with `--quantization modelopt_mixed --moe-runner-backend flashinfer_cutedsl`.
72
 
 
21
 
22
  NVFP4 version of [XiaomiMiMo/MiMo-V2.6-Flash-RL](https://huggingface.co/XiaomiMiMo/MiMo-V2.6-Flash-RL) for Blackwell. The routed experts run as **W4A4 NVFP4** on native FP4 Tensor Cores, and their weights are a **bit-exact transcode** of Xiaomi's released MXFP4 experts: every E2M1 code is kept byte-for-byte and each E8M0 block scale is re-expressed exactly as two E4M3 NVFP4 block scales. All 9,462,349,824 expert scale blocks convert exactly, and none are re-rounded. Every other tensor is copied byte-for-byte from the source checkpoint. The checkpoint is 175 GB (source: 178 GB).
23
 
24
+ ## Which checkpoint should I use?
25
+
26
+ Measured on 4× B300, TP4, SGLang random 1024-in / 1024-out (2026-09-30):
27
+
28
+ | SGLang image | Xiaomi's original MXFP4 (`XiaomiMiMo/MiMo-V2.6-Flash-RL`) | This NVFP4 checkpoint |
29
+ |---|---|---|
30
+ | `lmsysorg/sglang:v0.5.20-cu130` (stable) | does not serve on B300: `flashinfer_trtllm`/default hit an FP8-only kernel with MXFP4 weights, `flashinfer_mxfp4` rejects MiMo's router output, Marlin MXFP4 is SM90/SM120-only, Triton fails a hidden-size check | **serves** with `--moe-runner-backend flashinfer_cutlass` |
31
+ | `lmsysorg/sglang:nightly-dev-cu13-20260929-79cafec0` | **serves** with `--moe-runner-backend flashinfer_mxfp4`, and is faster | serves with `--moe-runner-backend flashinfer_cutlass` |
32
+
33
+ Output throughput on that nightly, original MXFP4 (`flashinfer_mxfp4`) vs this checkpoint (`flashinfer_cutlass`): 302 vs 201 tok/s at concurrency 1, 2,223 vs 1,668 at 16, 7,079 vs 4,934 at 64 (median TPOT 3.3 / 6.0 / 8.6 ms vs 4.9 / 8.4 / 12.5 ms).
34
+
35
+ **On a recent SGLang nightly, use Xiaomi's original checkpoint.** This checkpoint is for stable `v0.5.20` on Blackwell, or for stacks that need a standard ModelOpt NVFP4 export. SGLang's faster `flashinfer_trtllm` NVFP4 MoE path does not work for this model yet (see the warnings under Usage).
36
 
37
  **About NVFP4 quantization:** NVFP4 on Blackwell couples a compact E2M1 FP4 codebook with blockwise FP8 (E4M3) scaling over 16-element micro-blocks, so that 4-bit stored values remain numerically useful for neural-network computation. The E2M1 codebook provides a small, nonuniform set of representable magnitudes up to ±6 and relies on saturating behavior rather than IEEE NaN/Inf encodings to maximize usable range per bit. Using an FP8 block scale (rather than power-of-two-only E8M0) enables fractional scales and error-minimizing scale selection. On Blackwell Tensor Cores, native FP4 multipliers exploit E2M1 simplicity to reduce multiplier area while higher-precision FP32 accumulation protects dot-product accuracy.
38
 
 
56
 
57
  ### Deploy with SGLang
58
 
59
+ Verified on `lmsysorg/sglang:v0.5.20-cu130` and `lmsysorg/sglang:nightly-dev-cu13-20260929-79cafec0`, 4× B300:
60
 
61
  ```bash
62
  docker run --gpus all --shm-size=64g --network=host --ipc=host \
 
77
 
78
  - **Attention TP must be 4.** The fused `qkv_proj` is TP=4-interleaved, as in the source checkpoint. For 8 GPUs the [SGLang MiMo cookbook](https://docs.sglang.io/cookbook/autoregressive/Xiaomi/MiMo-V2.5) uses `--tp 8 --dp 2 --enable-dp-attention`; we have only verified TP4 with this checkpoint.
79
  - `--attention-backend fa4` is required on Blackwell (asymmetric 192/128 K/V head dims); `--mm-attention-backend fa4` for the vision encoder.
80
+ - `--moe-runner-backend flashinfer_cutlass` is required. Other MoE backends fail with this checkpoint: on `v0.5.20`, `flashinfer_trtllm` is rejected at load time; on `nightly-dev-cu13-20260929-79cafec0`, the default backend crashes (`'FusedMoE' object has no attribute 'g1_scale_c'`) and **`flashinfer_trtllm` loads but generates garbage**. The same weights are correct on `flashinfer_cutlass` on both images.
81
  - Sampling: Xiaomi recommends `temperature=1.0, top_p=0.95`. Thinking is on by default; pass `chat_template_kwargs={"enable_thinking": false}` to turn it off.
82
  - **BF16-activation mode.** The same checkpoint also runs with BF16 activations (weight-only FP4, the reference column below): add `-e SGLANG_FLASHINFER_CUTEDSL_NVFP4_W4A16=1` to `docker run` and replace the MoE flags with `--quantization modelopt_mixed --moe-runner-backend flashinfer_cutedsl`.
83