Instructions to use MingZwhy/Qwen3-4B-W2.79-QAD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MingZwhy/Qwen3-4B-W2.79-QAD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MingZwhy/Qwen3-4B-W2.79-QAD") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MingZwhy/Qwen3-4B-W2.79-QAD") model = AutoModelForCausalLM.from_pretrained("MingZwhy/Qwen3-4B-W2.79-QAD", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MingZwhy/Qwen3-4B-W2.79-QAD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MingZwhy/Qwen3-4B-W2.79-QAD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MingZwhy/Qwen3-4B-W2.79-QAD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MingZwhy/Qwen3-4B-W2.79-QAD
- SGLang
How to use MingZwhy/Qwen3-4B-W2.79-QAD 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 "MingZwhy/Qwen3-4B-W2.79-QAD" \ --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": "MingZwhy/Qwen3-4B-W2.79-QAD", "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 "MingZwhy/Qwen3-4B-W2.79-QAD" \ --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": "MingZwhy/Qwen3-4B-W2.79-QAD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MingZwhy/Qwen3-4B-W2.79-QAD with Docker Model Runner:
docker model run hf.co/MingZwhy/Qwen3-4B-W2.79-QAD
Qwen3-4B — W2.79, QAD checkpoint
The quantization-aware-distillation checkpoint that on-policy distillation starts from, for the W2.79 arm. This is a starting point for training, not a finished model.
Code and recipe: MingZwhy/QAOPD.
This is a latent checkpoint — read before loading
The tensors here are bf16 and not quantized. Quantization-aware training keeps high-precision master weights and applies the quantizer inside the forward pass; what gets saved is the master copy. Loading this file directly gives you an unquantized model. It will not error, and it will score higher than the W2.79 model does.
Use it as STUDENT_MODEL for the OPD stage, which supplies the quantizer
configuration itself:
BITWIDTH=w2.79 STUDENT_MODEL=<this checkpoint> bash scripts/opd/run_math.sh
For a model you can load and evaluate, use the recovered checkpoint MingZwhy/Qwen3-4B-W2.79-QAOPD instead.
Quantization
| weights | mixed INT1.58 / INT4 in blocks of 256, 50% of blocks at INT4 → 2.79 bits effective |
| embedding, output head | INT4 |
| activations | INT8 |
| KV cache | 16-bit during OPD and evaluation |
License
Apache-2.0, inherited from Qwen3-4B.
- Downloads last month
- 130