SeaWolf-AI commited on
Commit
7da8a2b
Β·
verified Β·
1 Parent(s): 78ab35f

Enhance card: MFP4 technique, Darwin platform integration, hardware rationale

Browse files
Files changed (1) hide show
  1. README.md +112 -22
README.md CHANGED
@@ -8,45 +8,112 @@ base_model:
8
  pipeline_tag: text-generation
9
  tags:
10
  - darwin
 
 
11
  - nvfp4
12
  - quantization
 
 
13
  library_name: transformers
14
  ---
15
 
16
  # Darwin-9B-MFP4
17
 
18
- NVFP4 mixed-precision quantization of [Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus).
19
 
20
- ## Model Lineage
 
 
 
 
21
 
22
  ```
23
- Qwen3.5 (Alibaba Qwen team)
24
  β”‚
25
  β–Ό
26
  Darwin-9B-Opus (FINAL-Bench)
27
- β”‚ evolutionary merge of Qwen3.5 family
28
- β”‚ Architecture: Qwen3_5ForConditionalGeneration (hybrid attention)
29
  β”‚
30
  β–Ό
31
  Darwin-9B-MFP4 ← this model
32
- NVFP4 quantization (NVIDIA ModelOpt)
 
33
  ```
34
 
35
- ## Specs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  | | |
38
  |---|---|
39
  | Base model | [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus) |
40
- | Quantization | NVFP4 (NVIDIA Blackwell native FP4 format) |
41
- | Disk size | β‰ˆ 11 GB (base model: 19 GB) |
42
  | Architecture | Qwen3.5 hybrid (full + linear attention) |
43
  | Quantization tool | [NVIDIA ModelOpt](https://github.com/NVIDIA/TensorRT-Model-Optimizer) |
 
 
 
 
 
 
 
44
 
45
- ## Usage
46
 
47
- ### vLLM
 
 
 
 
 
 
48
 
49
  ```bash
 
 
50
  vllm serve FINAL-Bench/Darwin-9B-MFP4 \
51
  --quantization modelopt_fp4 \
52
  --trust-remote-code \
@@ -70,22 +137,45 @@ response = client.chat.completions.create(
70
  )
71
  ```
72
 
73
- ## Hardware
 
 
74
 
75
- | GPU | Status |
76
  |---|---|
77
- | Blackwell (B200, RTX 5090) | βœ… Native NVFP4 |
78
- | Hopper (H100/H200) | βœ… FLASHINFER_CUTLASS path |
79
- | Older Ampere/Volta | ❌ Not supported |
 
 
 
 
 
 
 
80
 
81
- Minimum VRAM for inference: ~13 GB.
 
 
 
82
 
83
- ## Credits
 
 
 
84
 
85
- - Base model: [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus)
86
- - Architecture: Qwen3.5 (Alibaba Qwen team)
87
- - Quantization framework: NVIDIA ModelOpt + vLLM
 
 
 
 
 
 
 
 
88
 
89
- ## License
90
 
91
  Apache 2.0 (inherited from base model).
 
8
  pipeline_tag: text-generation
9
  tags:
10
  - darwin
11
+ - mfp4
12
+ - mixed-precision
13
  - nvfp4
14
  - quantization
15
+ - blackwell
16
+ - reasoning
17
  library_name: transformers
18
  ---
19
 
20
  # Darwin-9B-MFP4
21
 
22
+ **Mixed-Precision FP4** quantization of [Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus), built on NVIDIA Blackwell-native NVFP4.
23
 
24
+ The first member of the **Darwin Mixed-Precision** family β€” quantization that respects what each layer actually does, instead of compressing everything uniformly.
25
+
26
+ ---
27
+
28
+ ## 🧬 Model Lineage
29
 
30
  ```
31
+ Qwen3.5 (Alibaba Qwen team β€” hybrid attention architecture)
32
  β”‚
33
  β–Ό
34
  Darwin-9B-Opus (FINAL-Bench)
35
+ β”‚ evolutionary merge across the Qwen3.5 family
36
+ β”‚ Architecture: Qwen3_5ForConditionalGeneration
37
  β”‚
38
  β–Ό
39
  Darwin-9B-MFP4 ← this model
40
+ Mixed-Precision FP4 via NVIDIA ModelOpt
41
+ Targets MLP layers only; preserves attention pathways
42
  ```
43
 
44
+ ---
45
+
46
+ ## πŸ’‘ What is MFP4?
47
+
48
+ **MFP4 (Mixed FP4)** is a precision-allocation strategy, not a single bit-width. Different functional regions of the network get different precisions, chosen to match their role:
49
+
50
+ | Region | Precision | Why |
51
+ |---|---|---|
52
+ | **MLP / FFN layers** | NVFP4 (4-bit) | Per-token compute β€” tolerant to controlled noise |
53
+ | **Self-attention (Q/K/V/O)** | BF16 | Long-range coordination β€” sensitive to rounding |
54
+ | **Linear-attention blocks** | BF16 | Stateful recurrent paths β€” must remain stable |
55
+ | **LM head / Embeddings** | BF16 | Direct I/O surface β€” no degradation acceptable |
56
+ | **LayerNorms / scales** | BF16 | Tiny, but critical scale factors |
57
+
58
+ The bulk of parameters (the MLPs) move to FP4, while the small but architecturally critical attention/coordination paths stay full-precision.
59
+
60
+ ---
61
+
62
+ ## 🎯 Why mixed precision matters
63
+
64
+ Uniform quantization treats every weight the same. In practice, transformer layers have very different roles:
65
+
66
+ - **MLPs** are local, parallel, and compute-heavy β€” they account for the majority of the parameter count and tolerate compression noise gracefully because each forward pass averages over many independent activations.
67
+ - **Attention** is the model's coordination substrate. Even small perturbations there propagate across long contexts, fragmenting reasoning chains and causing decoding pathologies (looping, repetition, premature termination).
68
+
69
+ A **uniform 4-bit** quantization compresses all of these the same way and pays an attention-quality cost it didn't need to pay. **MFP4** isolates the cost to the layers that can absorb it.
70
+
71
+ This aligns with the Darwin philosophy: *let the architecture's structure dictate the optimization*, rather than imposing a single recipe everywhere.
72
+
73
+ ---
74
+
75
+ ## πŸš€ Why NVFP4 (and not just FP4)?
76
+
77
+ NVFP4 is NVIDIA's microblock 4-bit floating-point format with FP8-scaled groups of 16 elements.
78
+
79
+ - **Native hardware acceleration on Blackwell** (B200, RTX 5090): NVFP4 GEMMs run on dedicated tensor cores at 2nd-generation FP4 throughput, with no software emulation in the hot path.
80
+ - **Higher numerical accuracy than INT4** at the same bit-width, thanks to the floating-point representation and per-block FP8 scales.
81
+ - **First-class support** in vLLM (`--quantization modelopt_fp4`), TensorRT-LLM, and the broader NVIDIA inference stack.
82
+
83
+ Combined with MFP4's selective application, the result is FP4-class memory savings on the bulk of the model with BF16-quality attention behavior β€” and on Blackwell, FP4-class throughput on the dominant cost center (MLP GEMMs).
84
+
85
+ ---
86
+
87
+ ## πŸ“¦ Specs
88
 
89
  | | |
90
  |---|---|
91
  | Base model | [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus) |
92
+ | Quantization scheme | MFP4 (MLP β†’ NVFP4, attention β†’ BF16) |
93
+ | Disk size | β‰ˆ 11 GB *(base BF16: 19 GB)* |
94
  | Architecture | Qwen3.5 hybrid (full + linear attention) |
95
  | Quantization tool | [NVIDIA ModelOpt](https://github.com/NVIDIA/TensorRT-Model-Optimizer) |
96
+ | Inference runtime | vLLM β‰₯ 0.19 with `modelopt_fp4` backend |
97
+
98
+ ---
99
+
100
+ ## βš™οΈ Where MFP4 fits in the Darwin platform
101
+
102
+ The Darwin platform produces base models through evolutionary merging of open-source families. MFP4 is the **first deployment-ready quantization** in that lineage β€” designed so that the structural decisions made during evolution (which attention type lives where, which MLP carries which capability) are preserved when the model is compressed for serving.
103
 
104
+ In other words: Darwin's value isn't only in *how the weights got there* β€” it's also in *making sure those weights still work when you halve the memory footprint*. MFP4 is the bridge between research-grade BF16 checkpoints and Blackwell-grade serving infrastructure.
105
 
106
+ Future Darwin releases will share this serving stack: same NVFP4 format, same MLP-only allocation policy, same vLLM path.
107
+
108
+ ---
109
+
110
+ ## πŸš€ Usage
111
+
112
+ ### vLLM (recommended)
113
 
114
  ```bash
115
+ pip install "vllm>=0.19" nvidia-modelopt
116
+
117
  vllm serve FINAL-Bench/Darwin-9B-MFP4 \
118
  --quantization modelopt_fp4 \
119
  --trust-remote-code \
 
137
  )
138
  ```
139
 
140
+ ---
141
+
142
+ ## πŸ–₯️ Hardware
143
 
144
+ | GPU family | Status |
145
  |---|---|
146
+ | Blackwell (B200, RTX 5090) | βœ… Native NVFP4 tensor cores β€” best path |
147
+ | Hopper (H100/H200) | βœ… FLASHINFER_CUTLASS NVFP4 path |
148
+ | Ada (L40, RTX 6000 Ada) | ⚠️ Partial β€” depends on driver/runtime |
149
+ | Older Ampere/Volta | ❌ NVFP4 unavailable |
150
+
151
+ **Minimum VRAM for inference**: ~13 GB. Comfortable on a single 24 GB consumer card.
152
+
153
+ ---
154
+
155
+ ## πŸ“ When to use this model
156
 
157
+ **Good fit:**
158
+ - Latency- and memory-constrained serving on Blackwell or Hopper hardware
159
+ - Reasoning workloads where attention quality matters (multi-step deduction, long contexts)
160
+ - Workloads currently bottlenecked by 9B-class BF16 memory footprints
161
 
162
+ **Consider the BF16 base instead if:**
163
+ - You need bit-exact reproducibility against research baselines
164
+ - Your hardware lacks NVFP4 support
165
+ - You are doing further training / fine-tuning (quantize after, not before)
166
 
167
+ ---
168
+
169
+ ## πŸ™ Credits
170
+
171
+ - **Base model**: [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus)
172
+ - **Architecture lineage**: Qwen3.5 (Alibaba Qwen team)
173
+ - **Quantization framework**: [NVIDIA ModelOpt](https://github.com/NVIDIA/TensorRT-Model-Optimizer)
174
+ - **Inference runtime**: [vLLM](https://github.com/vllm-project/vllm)
175
+ - **Hardware target**: NVIDIA Blackwell NVFP4
176
+
177
+ ---
178
 
179
+ ## πŸ“œ License
180
 
181
  Apache 2.0 (inherited from base model).