vroomfondel commited on
Commit
3d35db5
·
verified ·
1 Parent(s): fd02804

Upload NVFP4 (ModelOpt) quantization

Browse files
Files changed (1) hide show
  1. README.md +73 -4
README.md CHANGED
@@ -1,18 +1,87 @@
1
  ---
2
  library_name: transformers
3
  license: apache-2.0
 
4
  base_model: Qwen/Qwen3.8-27B
5
  base_model_relation: quantized
6
  pipeline_tag: text-generation
7
  tags:
8
- - modelopt
9
  - nvfp4
 
10
  - fp4
 
 
 
 
 
 
11
  ---
12
 
13
- # qwen3.8-27b-nvfp4-modelopt
14
-
15
- NVFP4 quantization of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) via NVIDIA ModelOpt.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  <!-- BEGIN quant:preview -->
18
 
 
1
  ---
2
  library_name: transformers
3
  license: apache-2.0
4
+ license_link: https://huggingface.co/Qwen/Qwen3.8-27B/blob/main/LICENSE
5
  base_model: Qwen/Qwen3.8-27B
6
  base_model_relation: quantized
7
  pipeline_tag: text-generation
8
  tags:
 
9
  - nvfp4
10
+ - modelopt
11
  - fp4
12
+ - dense
13
+ - multimodal
14
+ - gated-deltanet
15
+ - hybrid
16
+ - mtp
17
+ - speculative-decoding
18
  ---
19
 
20
+ # Qwen3.8-27B NVFP4 (ModelOpt, uniform W4A4)
21
+
22
+ NVFP4 (W4A4) quantization of [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B),
23
+ produced with the NVIDIA TensorRT Model Optimizer (ModelOpt). This is a derivative
24
+ checkpoint; see the [base model card](https://huggingface.co/Qwen/Qwen3.8-27B) for the
25
+ model's capabilities and general usage.
26
+
27
+ | | |
28
+ |---|---|
29
+ | **Base model** | [Qwen/Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B) (Qwen3.8 dense, multimodal, apache-2.0) |
30
+ | **Architecture** | `Qwen3_5ForConditionalGeneration`, Gated-DeltaNet hybrid (64 layers: 48 linear-attention, 16 full-attention), dense FFN, 27B |
31
+ | **Precision** | uniform W4A4 NVFP4 across dense FFN, full attention and the Gated-DeltaNet path; FP8 KV cache with baked scales. Vision tower, embeddings, `lm_head` and the NEXTN/MTP head kept BF16. |
32
+ | **Size** | 55.6 GB BF16 source, 20.6 GB quantized (2.7x): 12.2 GB packed NVFP4 weights, 6.9 GB BF16 (embeddings, `lm_head`, vision, MTP), 1.5 GB FP8 block scales |
33
+ | **Context** | 262144 native (1M needs YaRN RoPE scaling, not configured here) |
34
+ | **GSM8K** | 97.42% (1285/1319), zero errors, zero empty responses. See the benchmark table. |
35
+ | **Producer** | NVIDIA ModelOpt via the kikube single-node quant driver |
36
+
37
+ > **Serving note:** this is a *uniform* W4A4 build, i.e. attention is quantized too.
38
+ > NVIDIA's own Qwen3.5/3.6 NVFP4 checkpoints are MoE/FFN-only and leave attention in
39
+ > BF16, so SGLang's stock `qwen3_5` path has never had to handle this. See the
40
+ > requirements below before serving.
41
+
42
+ ### Speculative decoding
43
+
44
+ Use **DSPARK** with the external drafter
45
+ [RadixArk/Qwen3.8-27B-DSpark](https://huggingface.co/RadixArk/Qwen3.8-27B-DSpark)
46
+ (1.36B BF16, 2.6 GB). **NEXTN on this checkpoint's built-in MTP head crashes the SGLang
47
+ scheduler** on the first request (FlashInfer `fast_prefill_plan`); DSPARK does not.
48
+
49
+ ```
50
+ --speculative-algo DSPARK \
51
+ --speculative-draft-model-path <drafter> \
52
+ --speculative-draft-model-quantization unquant \
53
+ --speculative-dspark-block-size 7 \
54
+ --speculative-num-draft-tokens 8 \
55
+ --speculative-num-steps 1 \
56
+ --speculative-eagle-topk 1 \
57
+ --mamba-scheduler-strategy extra_buffer \
58
+ --attention-backend flashinfer
59
+ ```
60
+
61
+ Three of these are not optional:
62
+
63
+ - `--speculative-draft-model-quantization unquant` — SGLang otherwise inherits this
64
+ target's `modelopt_fp4` for the BF16 drafter and the load dies on a state-dict shape
65
+ mismatch.
66
+ - `--speculative-num-draft-tokens 8` — must equal `dspark_block_size + 1`; SGLang asserts
67
+ it. The drafter's `config.json` declares `block_size: 7`.
68
+ - `--mamba-scheduler-strategy extra_buffer` — required for correct Gated-DeltaNet state
69
+ rollback when draft tokens are rejected.
70
+
71
+ `--attention-backend triton` is not a substitute for `flashinfer` here: it hits a
72
+ forward-time crash in `RadixLinearAttention.forward` for this architecture
73
+ ([sgl-project/sglang#29577](https://github.com/sgl-project/sglang/issues/29577)).
74
+ DSPARK pins `num_steps` and `eagle_topk` to 1 itself. `SGLANG_ENABLE_SPEC_V2` is a no-op on
75
+ SGLang 0.5.17 (the V2 worker always runs); the corresponding knob is
76
+ `--disable-overlap-schedule`.
77
+
78
+ **Measured throughput** on one DGX Spark (GB10, sm121), SGLang 0.5.17, over 415 decode
79
+ batches during the GSM8K run: **~186 tok/s aggregate** at 11-13 concurrent requests
80
+ (roughly 15 tok/s per stream), mean accept len **3.77** of a ceiling of 8, accept rate
81
+ 0.38-0.42. No same-settings run without speculation was measured, so this is not a speedup
82
+ factor. Note the Mamba state cache, not the GPU, is what caps concurrency here: state usage
83
+ sat at 0.68-0.80 with requests queued, and speculation consumes more state slots than plain
84
+ decoding.
85
 
86
  <!-- BEGIN quant:preview -->
87