Text Generation
Transformers
Safetensors
nvfp4
compressed-tensors
vllm
blackwell
conversational
custom_code
8-bit precision
Instructions to use AtomicChat/Ling-3.0-flash-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AtomicChat/Ling-3.0-flash-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AtomicChat/Ling-3.0-flash-NVFP4", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AtomicChat/Ling-3.0-flash-NVFP4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AtomicChat/Ling-3.0-flash-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AtomicChat/Ling-3.0-flash-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AtomicChat/Ling-3.0-flash-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AtomicChat/Ling-3.0-flash-NVFP4
- SGLang
How to use AtomicChat/Ling-3.0-flash-NVFP4 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 "AtomicChat/Ling-3.0-flash-NVFP4" \ --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": "AtomicChat/Ling-3.0-flash-NVFP4", "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 "AtomicChat/Ling-3.0-flash-NVFP4" \ --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": "AtomicChat/Ling-3.0-flash-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AtomicChat/Ling-3.0-flash-NVFP4 with Docker Model Runner:
docker model run hf.co/AtomicChat/Ling-3.0-flash-NVFP4
docs: model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: inclusionAI/Ling-3.0-flash
|
| 4 |
+
base_model_relation: quantized
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- gguf
|
| 8 |
+
- nvfp4
|
| 9 |
+
- blackwell
|
| 10 |
+
- llama.cpp
|
| 11 |
+
library_name: llama.cpp
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Ling-3.0-flash — NVFP4
|
| 15 |
+
|
| 16 |
+
[`inclusionAI/Ling-3.0-flash`](https://huggingface.co/inclusionAI/Ling-3.0-flash) (124B total, 5.1B active) with the routed experts in NVFP4.
|
| 17 |
+
|
| 18 |
+
NVFP4 packs 64 weights into 36 bytes: 4-bit E2M1 values with a UE4M3 scale for every 16 of them. The scale granularity is twice as fine as MXFP4, which is what makes it usable at this bit width.
|
| 19 |
+
|
| 20 |
+
| | |
|
| 21 |
+
| --- | --- |
|
| 22 |
+
| size | 72.3 GB |
|
| 23 |
+
| experts | NVFP4 (4.50 bpw) |
|
| 24 |
+
| attention, KDA gates, shared experts | Q8_0 |
|
| 25 |
+
| router, norms, `A_log`, `dt_bias`, conv1d | F32 |
|
| 26 |
+
| output | F16 |
|
| 27 |
+
|
| 28 |
+
Fits a single 128 GB DGX Spark with room for a long context.
|
| 29 |
+
|
| 30 |
+
## Requirements
|
| 31 |
+
|
| 32 |
+
The architecture is not in upstream llama.cpp yet:
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
git clone -b feat/bailingmoe3 https://github.com/AtomicBot-ai/atomic-llama-cpp-turboquant llama.cpp
|
| 36 |
+
cd llama.cpp && cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="120;121" && cmake --build build -j
|
| 37 |
+
llama-cli -m Ling-3.0-flash-NVFP4-00001-of-00002.gguf --jinja -ngl 99 -c 32768
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
**Blackwell is what this format is for.** The native FP4 tensor cores exist on sm_100 (B200) and sm_120 / sm_121 (RTX PRO 6000, RTX 5090, DGX Spark). On older cards the file still loads and runs through the dequantization path, just without the speedup.
|
| 41 |
+
|
| 42 |
+
## Notes on the build
|
| 43 |
+
|
| 44 |
+
The importance matrix is not used here: the NVFP4 quantizer in llama.cpp ignores `quant_weights` and rounds to nearest inside each 16-element block. Bits were spent where they matter instead — everything outside the routed experts is kept at Q8_0 or better, which costs about 4 GB.
|
| 45 |
+
|
| 46 |
+
Measurements against the BF16 baseline, and the same numbers for the whole K/IQ grid, are in [`AtomicChat/Ling-3.0-flash-GGUF-metrics`](https://huggingface.co/datasets/AtomicChat/Ling-3.0-flash-GGUF-metrics).
|
| 47 |
+
|
| 48 |
+
<!-- RESULTS -->
|