LLaDA2.1-flash NVFP4 (W4A16, routed experts)

A 4-bit checkpoint of inclusionAI/LLaDA2.1-flash, the mixture-of-experts diffusion language model, that runs on a single 96 GB GPU and matches the BF16 model on GSM8K and ARC-Challenge.

Quantized routed-expert weights only, NVFP4 (group size 16), activations in BF16 (W4A16)
Kept in BF16 attention, router, shared experts, the first (dense) layer, output head
Size on disk 58 GiB, down from 192 GiB
Hardware tested one NVIDIA RTX PRO 6000 Blackwell (96 GB)
Engine tested SGLang 0.5.19 with --moe-runner-backend marlin
Accuracy same as BF16 within noise (GSM8K 97.2 vs 95.6, ARC-Challenge 94.8 vs 95.0)

What W4A16 means

A model stores two kinds of numbers: weights, the fixed parameters learned in training, and activations, the intermediate values computed from your input at every step. The shorthand WxAy gives the bits used for each, so W4A16 means 4-bit weights and 16-bit activations. Only the stored weights shrink, while all computation still happens in BF16. This saves most of the memory, since weights are what fills the GPU, and keeps the accuracy of full-precision arithmetic.

The 4-bit format here is NVFP4, introduced by NVIDIA with Blackwell GPUs. Each weight is a tiny 4-bit floating-point number, and every group of 16 weights shares an FP8 scale factor that sets their range. NVIDIA's post Introducing NVFP4 for Efficient and Accurate Low-Precision Inference explains the format with diagrams.

The WxAy notation comes from the post-training quantization literature, for example SmoothQuant (W8A8). Weight-only 4-bit quantization of LLMs was made practical by GPTQ, and Marlin is the GPU kernel for such weight-quantized models that this checkpoint uses at inference. A W4A4 checkpoint also cuts activations to 4 bits. That can run faster on Blackwell tensor cores, but it rounds every computation and usually costs more accuracy.

Serving

python -m sglang.launch_server \
  --model-path m1rkocasu/LLaDA2.1-flash-NVFP4-W4A16 \
  --trust-remote-code \
  --moe-runner-backend marlin \
  --attention-backend flashinfer \
  --mem-fraction-static 0.8 \
  --tp-size 1 \
  --dllm-algorithm JointThreshold \
  --dllm-algorithm-config joint_threshold_quality.yaml

Use the marlin MoE backend. Marlin keeps the weights in 4 bits and computes in BF16, and its outputs match those of the same 4-bit weights dequantized to BF16. SGLang's default NVFP4 MoE path, flashinfer_cutlass, gave clearly worse outputs on this architecture in our tests. With marlin, temperature-0 decoding is not bitwise deterministic, so the same request can return slightly different text.

The decoding settings come from the original model card and ship with this repository.

File Mode threshold edit_threshold max_post_edit_steps block_size
joint_threshold_quality.yaml Quality 0.7 0.5 16 32
joint_threshold_speed.yaml Speed 0.5 0.0 16 32

Sampling at temperature > 0

In SGLang 0.5.19 the JointThreshold algorithm always proposes the most likely token and ignores the request temperature, so a request at temperature 0.7 returns the same text as one at temperature 0. The official LLaDA2.1 code instead divides the logits by the temperature and samples.

joint_threshold_sampling.py restores that behaviour. It subclasses JointThreshold and changes only how each token is proposed, so at temperature 0 it behaves exactly like the original. To use it:

  1. Copy the file into sglang/srt/dllm/algorithm/, next to joint_threshold.py.
  2. Start the server with --dllm-algorithm JointThresholdSampling.
  3. Optionally set sampling_seed in the algorithm YAML (default 0). Give each server a different seed when you run several of them.

top_p and top_k are not supported, and a request that sets them fails with an error. If you only decode at temperature 0, you do not need this file.

Evaluation

Accuracy on GSM8K and ARC-Challenge of the BF16 model, this checkpoint and a community NVFP4 checkpoint, Quality Mode, temperature 0

Weights Mode Temperature GSM8K ARC-Challenge
BF16 (original) Quality 0 95.6 95.0
this checkpoint Quality 0 97.2 94.8
this checkpoint Quality 0.7 95.4 93.8
this checkpoint Speed 0 95.0 94.2
this checkpoint Speed 0.7 87.2 94.6
community NVFP4 (W4A4) Quality 0 82.8 91.0
community NVFP4 (W4A4) Quality 0.7 74.2 91.0
community NVFP4 (W4A4) Speed 0 69.8 90.8

Setup: first 500 test questions of GSM8K and ARC-Challenge, one chat request per question, up to 16,384 output tokens, SGLang 0.5.19 for every model.

  • Against BF16. In Quality Mode at temperature 0 this checkpoint is within 1.6 points of the original on both benchmarks. With 500 questions, differences of one or two points are noise.
  • Other settings. Quality Mode at temperature 0.7 and Speed Mode at temperature 0 stay close to BF16. Speed Mode at temperature 0.7 drops to 87.2 on GSM8K. We did not run BF16 in that setting, so we cannot say how much of the drop comes from quantization and how much from the setting itself.
  • Against the community checkpoint. thnkinbtfly/llada2.1-flash-nvfp4 scores 12.8 points below BF16 on GSM8K and 4.0 below on ARC-Challenge in the same setting. It also quantizes activations (W4A4) and nearly every layer, which rules out marlin and forces the flashinfer_cutlass MoE path, so we cannot separate the effect of its weights from that of the kernel.

How it was made

  • Tool. NVIDIA ModelOpt 0.46.1, from the official BF16 weights at revision 2bf95e86.
  • Recipe. NVFP4 weight-only quantization of the routed experts, with no activation quantizers. Each 16-weight block's scale was chosen by minimizing mean squared error over a sweep of all FP8 scale values.
  • Calibration. 8 samples of up to 2,048 tokens from cnn_dailymail and Nemotron-Post-Training-Dataset-v1. All 256 experts of every MoE layer received calibration tokens, and none was left unseen.
  • Patch. ModelOpt does not know this architecture's expert block, so a small patch maps its expert projections (gate_proj, up_proj, down_proj).

QUANTIZATION_REPORT.json records the full configuration, the patches and per-layer expert coverage.

Limitations

  • Tested only with SGLang 0.5.19, the marlin backend and one Blackwell GPU. Other engines, backends and GPUs are untested.
  • The comparison with BF16 covers two English benchmarks of 500 questions each. It does not cover long contexts, code or other languages.
  • The 4-bit model is not identical to BF16. Individual answers can differ even where accuracy is the same.

License

Apache 2.0, as the base model.

Downloads last month
23
Safetensors
Model size
53B params
Tensor type
BF16
·
U8
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for m1rkocasu/LLaDA2.1-flash-NVFP4-W4A16

Quantized
(2)
this model

Papers for m1rkocasu/LLaDA2.1-flash-NVFP4-W4A16