Text Generation
Transformers
Safetensors
English
Korean
qwen3_5
image-text-to-text
darwin
mfp4
mixed-precision
nvfp4
quantization
blackwell
reasoning
conversational
modelopt
Instructions to use FINAL-Bench/Darwin-9B-MFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FINAL-Bench/Darwin-9B-MFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FINAL-Bench/Darwin-9B-MFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("FINAL-Bench/Darwin-9B-MFP4") model = AutoModelForImageTextToText.from_pretrained("FINAL-Bench/Darwin-9B-MFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FINAL-Bench/Darwin-9B-MFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FINAL-Bench/Darwin-9B-MFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Darwin-9B-MFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FINAL-Bench/Darwin-9B-MFP4
- SGLang
How to use FINAL-Bench/Darwin-9B-MFP4 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "FINAL-Bench/Darwin-9B-MFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Darwin-9B-MFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "FINAL-Bench/Darwin-9B-MFP4" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FINAL-Bench/Darwin-9B-MFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FINAL-Bench/Darwin-9B-MFP4 with Docker Model Runner:
docker model run hf.co/FINAL-Bench/Darwin-9B-MFP4
Enhance card: MFP4 technique, Darwin platform integration, hardware rationale
Browse files
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 |
-
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
```
|
| 23 |
-
Qwen3.5 (Alibaba Qwen team)
|
| 24 |
β
|
| 25 |
βΌ
|
| 26 |
Darwin-9B-Opus (FINAL-Bench)
|
| 27 |
-
β evolutionary merge
|
| 28 |
-
β Architecture: Qwen3_5ForConditionalGeneration
|
| 29 |
β
|
| 30 |
βΌ
|
| 31 |
Darwin-9B-MFP4 β this model
|
| 32 |
-
|
|
|
|
| 33 |
```
|
| 34 |
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
| | |
|
| 38 |
|---|---|
|
| 39 |
| Base model | [FINAL-Bench/Darwin-9B-Opus](https://huggingface.co/FINAL-Bench/Darwin-9B-Opus) |
|
| 40 |
-
| Quantization |
|
| 41 |
-
| Disk size | β 11 GB (base
|
| 42 |
| Architecture | Qwen3.5 hybrid (full + linear attention) |
|
| 43 |
| Quantization tool | [NVIDIA ModelOpt](https://github.com/NVIDIA/TensorRT-Model-Optimizer) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
|
|
|
|
|
|
| 74 |
|
| 75 |
-
| GPU | Status |
|
| 76 |
|---|---|
|
| 77 |
-
| Blackwell (B200, RTX 5090) | β
Native NVFP4 |
|
| 78 |
-
| Hopper (H100/H200) | β
FLASHINFER_CUTLASS path |
|
| 79 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
-
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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).
|