Text Generation
Transformers
Safetensors
qwen3_next
qwen3
Mixture of Experts
nvfp4
quantized
llmcompressor
vllm
conversational
compressed-tensors
Instructions to use GadflyII/Qwen3-Coder-Next-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GadflyII/Qwen3-Coder-Next-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GadflyII/Qwen3-Coder-Next-NVFP4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GadflyII/Qwen3-Coder-Next-NVFP4") model = AutoModelForCausalLM.from_pretrained("GadflyII/Qwen3-Coder-Next-NVFP4") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use GadflyII/Qwen3-Coder-Next-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GadflyII/Qwen3-Coder-Next-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": "GadflyII/Qwen3-Coder-Next-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GadflyII/Qwen3-Coder-Next-NVFP4
- SGLang
How to use GadflyII/Qwen3-Coder-Next-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 "GadflyII/Qwen3-Coder-Next-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": "GadflyII/Qwen3-Coder-Next-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 "GadflyII/Qwen3-Coder-Next-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": "GadflyII/Qwen3-Coder-Next-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GadflyII/Qwen3-Coder-Next-NVFP4 with Docker Model Runner:
docker model run hf.co/GadflyII/Qwen3-Coder-Next-NVFP4
Note: If you have a multi-GPU SM120 Blackwell system (RTX 50/Pro), try my vLLM fork to resolve P2P / TP=2 issues (Pending PR into upstream).
https://github.com/Gadflyii/vllm/tree/main
Qwen3-Coder-Next-NVFP4
NVFP4 quantized version of Qwen/Qwen3-Coder-Next (80B-A3B).
Model Details
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-Coder-Next |
| Architecture | Qwen3NextForCausalLM (Hybrid DeltaNet + Attention + MoE) |
| Parameters | 80B total, 3B activated per token |
| Experts | 512 total, 10 activated + 1 shared |
| Layers | 48 |
| Context Length | 262,144 tokens (256K) |
| Quantization | NVFP4 (FP4 weights + FP4 activations) |
| Size | 45GB (down from ~149GB BF16, 70% reduction) |
| Format | compressed-tensors |
Quantization Details
Quantized using llmcompressor 0.9.0.1.
NUM_CALIBRATION_SAMPLES = 20
MAX_SEQUENCE_LENGTH = 2048
DATASET = "HuggingFaceH4/ultrachat_200k" (train_sft)
moe_calibrate_all_experts = True
# Layers kept in BF16
ignore = [
"lm_head",
"re:.*mlp.gate$", # MoE router gates
"re:.*mlp.shared_expert_gate$", # Shared expert gates
"re:.*linear_attn.*", # DeltaNet linear attention
]
Benchmark Results
MMLU-Pro
| Model | Accuracy | Delta |
|---|---|---|
| BF16 | 52.90% | - |
| NVFP4 | 51.27% | -1.63% |
Context Length Testing
Successfully tested up to 128K tokens with FP8 KV cache (Not enough VRAM to test any higher context).
Usage with vLLM
Requires vLLM with NVFP4 support (0.16.0+), Transformers 5.0.0+
#vllm Serving
vllm serve GadflyII/Qwen3-Coder-Next-NVFP4 \
--tensor-parallel-size 2 \
--max-model-len 131072 \
--kv-cache-dtype fp8
License
Apache 2.0 (same as base model)
Acknowledgments
- Qwen Team for the base model
- RedHatAI for the quantization approach reference
- vLLM Project for llmcompressor
- Downloads last month
- 9,049
Model tree for GadflyII/Qwen3-Coder-Next-NVFP4
Base model
Qwen/Qwen3-Coder-Next