Instructions to use qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16") model = AutoModelForCausalLM.from_pretrained("qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16
- SGLang
How to use qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16 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 "qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16" \ --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": "qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16", "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 "qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16" \ --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": "qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16 with Docker Model Runner:
docker model run hf.co/qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16
QDA-Qwen3-Coder-30B-A3B-W4A16
4-bit weight quantization of Qwen/Qwen3-Coder-30B-A3B-Instruct. 3.4× smaller than BF16 (17.8 GB vs. 61.1 GB), keeps 99.5% of BF16 accuracy.
Evaluation
| Benchmark | BF16 61.1 GB |
QDA W4A16 17.8 GB |
cyankiwi AWQ-4bit 18.1 GB |
|---|---|---|---|
| AIME 2025 | 25.8 | 27.1 | 25.1 |
| HMMT Feb 2026 | 19.8 | 18.2 | 17.5 |
| GPQA-Diamond | 52.5 | 53.3 | 51.9 |
| IFBench | 34.6 | 34.3 | 32.3 |
| MMLU-Pro | 70.9 | 70.2 | 69.6 |
| LiveCodeBench | 38.4 | 37.8 | 37.6 |
| Average | 40.3 | 40.1 | 39.0 |
Pass@1 averaged over 1–32 seeds (non-thinking model), same settings for all models.
| Evaluation setting | AIME 2025 | HMMT Feb 2026 | GPQA-Diamond | IFBench | MMLU-Pro | LiveCodeBench |
|---|---|---|---|---|---|---|
| Max new tokens per item | 81,920 | 81,920 | 81,920 | 81,920 | 32,768 | 81,920 |
| Repeats (seed 17 + j for repeat j = 0, 1, …) | 32 (seeds 17–48) | 32 (seeds 17–48) | 16 (seeds 17–32) | 16 (seeds 17–32) | 1 (seed 17) | 4 (seeds 17–20) |
| Sampling | temperature 0.7, top-p 0.8, top-k 20, min-p 0, presence penalty 0, repetition penalty 1.05 | |||||
| Thinking | off (no thinking marker) | |||||
| chat_template_kwargs | none | |||||
| MTP / speculative decoding | off | |||||
Usage
Runs on NVIDIA H100, A100, RTX Pro 6000 and B200 GPUs.
vLLM:
VLLM_DISABLED_KERNELS=MacheteLinearKernel vllm serve qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16
On H100 and H200, without a CUDA 13 toolkit on the machine, the kernel's compile at start fails (failed to open libnvrtc-builtins.so.13.0). Put the venv's NVIDIA libraries on the loader path first:
lib="$(python -c 'import glob, sysconfig as s; p = s.get_paths(); print(":".join(sorted({d for k in ("purelib", "platlib") for d in glob.glob(p[k] + "/nvidia/*/lib")})))')" &&
export LD_LIBRARY_PATH="$lib:$LD_LIBRARY_PATH"
How it was made
Weights are 4-bit integers in groups of 64, quantized with GPTQ; the attention projections are 8-bit, and the group scales were then fine-tuned by distillation. The recipe was chosen by QDA's automated search.
Reproduce
Install QDA 0.1.0 (Linux, an NVIDIA GPU and uv):
git clone https://github.com/humanfia/qda.git && cd qda
uv venv -p 3.12 --managed-python && . .venv/bin/activate
uv pip install -c constraints.txt "./packages/qda-quant[hf,gguf]" "./packages/qda-kl[vllm]" ./packages/qda-agent
Then:
hf download qda-lab/qda-recipe-inputs --repo-type dataset --include "QDA-Qwen3-Coder-30B-A3B-W4A16/*" --local-dir inputs
cd inputs/QDA-Qwen3-Coder-30B-A3B-W4A16
qda build qwen3-coder-30b-a3b-w4a16.yaml --set out=QDA-Qwen3-Coder-30B-A3B-W4A16-rebuild --set "devices=[0,1]"
Needs QDA 0.1.0. Original model: Qwen/Qwen3-Coder-30B-A3B-Instruct@b2cff646eb4bb1d68355c01b18ae02e7cf42d120, the revision the recipe builds from. Recipe: qwen3-coder-30b-a3b-w4a16.yaml; inputs
(calibration sample and distillation data): QDA-Qwen3-Coder-30B-A3B-W4A16/ in qda-lab/qda-recipe-inputs.
Built on 2× H100 (80 GB); the scale_kd step (300 rounds) takes 53 min. Rebuilt weights are not bit-identical to this checkpoint: scored on the same prompts, a rebuild reads KL 0.00701 against the original and this checkpoint 0.00704 (−0.4 %).
License
Apache-2.0, the same as the base model.
Citation
QDA: Closed-Loop LLM Quantization Design with Agents
@article{li2026qda,
title = {QDA: Closed-Loop LLM Quantization Design with Agents},
author = {Li, Xingyang and Zhao, Tianlang and Han, Song and Zhu, Ligeng},
journal = {arXiv preprint arXiv:2611.23388},
year = {2026}
}
- Downloads last month
- 1,076
Model tree for qda-lab/QDA-Qwen3-Coder-30B-A3B-W4A16
Base model
Qwen/Qwen3-Coder-30B-A3B-Instruct