Instructions to use AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4") model = AutoModelForCausalLM.from_pretrained("AminFa12/qwen3-coder-30b-a3b-reap50-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 Settings
- vLLM
How to use AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AminFa12/qwen3-coder-30b-a3b-reap50-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": "AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4
- SGLang
How to use AminFa12/qwen3-coder-30b-a3b-reap50-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 "AminFa12/qwen3-coder-30b-a3b-reap50-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": "AminFa12/qwen3-coder-30b-a3b-reap50-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 "AminFa12/qwen3-coder-30b-a3b-reap50-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": "AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4 with Docker Model Runner:
docker model run hf.co/AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4
Qwen3-Coder-30B-A3B · REAP-50% · NVFP4
A 50%-expert-pruned and NVFP4-quantized build of Qwen/Qwen3-Coder-30B-A3B-Instruct, made to run fully GPU-resident on a 16 GB Blackwell card (RTX 50-series / RTX PRO 6000, SM120) with real context to spare.
- Weights: 9.9 GB (single safetensors shard)
- Architecture: Qwen3-MoE, 64 experts/layer (down from 128), top-8 routing unchanged, 48 layers
- Format: NVFP4 4-bit weights (group size 16) + FP8 KV cache; MoE routers kept high-precision
How it was made
- Prune — Cerebras REAP @ 50%.
Each expert is scored by router-gate × activation-norm over a calibration set, and the
64 lowest-saliency experts per layer are removed, with router renormalization.
The calibration set is personal: ~100 real coding-agent transcripts plus
evol-codealpacaandSWE-smithtrajectories — so the surviving experts are the ones this workload actually exercises. - Quantize — NVIDIA TensorRT Model-Optimizer 0.45, NVFP4.
PTQ calibrated on the same personal transcripts (100 samples @ 8192 tokens). All 48
mlp.gaterouters are excluded from quantization (kept in high precision — routers are too sensitive for 4-bit).
Evaluation
EvalPlus (greedy), measured on the pruned bf16 checkpoint.
| model | HumanEval | HumanEval+ | MBPP | MBPP+ |
|---|---|---|---|---|
| REAP-50 (this model, bf16 pre-quant) | 0.909 | 0.872 | 0.839 | 0.704 |
| REAP-40 (lighter prune, for reference) | 0.933 | 0.878 | 0.852 | 0.709 |
Usage (vLLM, SM120)
Requires a Blackwell GPU (compute capability 12.0) and vLLM ≥ 0.24 (older builds lack SM120 NVFP4 kernels).
uv pip install -U vllm
VLLM_ATTENTION_BACKEND=TRITON_ATTN \
vllm serve AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4 \
--max-model-len 32768 --gpu-memory-utilization 0.9 --enforce-eager \
--enable-auto-tool-choice --tool-call-parser qwen3_coder
First-launch warmup: FlashInfer JIT-compiles its NVFP4 kernels for SM120 on the first run — this can look like a hang (GPU idle, one CPU core busy) for several minutes before the server binds. Be patient the first time; it caches afterwards.
--enforce-eagerskips the separate torch.compile/CUDA-graph phase.
from openai import OpenAI
c = OpenAI(base_url="http://localhost:8000/v1", api_key="x")
print(c.chat.completions.create(
model="AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4",
messages=[{"role":"user","content":"Write a Python function to merge two sorted lists."}],
temperature=0.7, top_p=0.8).choices[0].message.content)
Credits & license
- Cerebras REAP — pruning method
- Qwen3-Coder — base model (Apache-2.0)
- NVIDIA TensorRT Model-Optimizer — NVFP4 PTQ
Licensed Apache-2.0, inherited from the Qwen3-Coder base model.
- Downloads last month
- 186
Model tree for AminFa12/qwen3-coder-30b-a3b-reap50-nvfp4
Base model
Qwen/Qwen3-Coder-30B-A3B-Instruct