Instructions to use axteam/Qwen3.5-2B-AWQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use axteam/Qwen3.5-2B-AWQ-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="axteam/Qwen3.5-2B-AWQ-4bit") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("axteam/Qwen3.5-2B-AWQ-4bit") model = AutoModelForMultimodalLM.from_pretrained("axteam/Qwen3.5-2B-AWQ-4bit", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use axteam/Qwen3.5-2B-AWQ-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "axteam/Qwen3.5-2B-AWQ-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "axteam/Qwen3.5-2B-AWQ-4bit", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/axteam/Qwen3.5-2B-AWQ-4bit
- SGLang
How to use axteam/Qwen3.5-2B-AWQ-4bit 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 "axteam/Qwen3.5-2B-AWQ-4bit" \ --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": "axteam/Qwen3.5-2B-AWQ-4bit", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "axteam/Qwen3.5-2B-AWQ-4bit" \ --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": "axteam/Qwen3.5-2B-AWQ-4bit", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use axteam/Qwen3.5-2B-AWQ-4bit with Docker Model Runner:
docker model run hf.co/axteam/Qwen3.5-2B-AWQ-4bit
Qwen3.5-2B ยท AWQ INT4 (W4A16)
4-bit quantization of Qwen/Qwen3.5-2B, produced for efficient vLLM serving. Quantized by axteam.
| Base model | Qwen/Qwen3.5-2B |
| Method | AWQ INT4 (W4A16) |
| Format | compressed-tensors pack-quantized |
| Weights / activations | W4A16 โ INT4 asymmetric weights, group size 32 (BF16 scale + INT4 zero-point), BF16 activations |
| Architecture | Hybrid (linear-attention + full-attention) ยท Dense ยท multimodal (vision) ยท MTP head |
| Size on disk | ~2.4 GB |
| Calibration | 256 samples (Korean-heavy mixed corpus) |
| License | Apache-2.0 |
Quantization details
- Scheme โ W4A16 โ INT4 asymmetric weights, group size 32 (BF16 scale + INT4 zero-point), BF16 activations, stored as compressed-tensors
pack-quantized. - Kept in BF16 โ the vision tower & projector (
model.visual.*), the multi-token-prediction head (mtp.*), all RMSNorms, token embeddings, the LM head, the SSM non-linear parts (linear_attn.conv1d/A_log/dt_bias). Left unquantized to preserve quality (a small fraction of parameters). - Tokenizer /
chat_template/generation_configare identical to the original.config.jsonis the original plus aquantization_configblock.
This is post-training quantization (PTQ) โ no retraining, so behaviour stays faithful to the original. AWQ uses a small calibration set (no gradient) to protect salient weight channels before rounding.
Evaluation (measured)
Fidelity to the BF16 original on an internal mixed English/Korean set (100 prompts, BF16 greedy answers scored under each build โ same harness for every row).
| Metric | This model | BF16 original |
|---|---|---|
| Perplexity (lower = closer) | 1.9971 | 1.8515 (+7.9%) |
| Top-1 next-token agreement | 86.8% | 98.9% |
These measure fidelity to the base model, not absolute task scores.
Usage (vLLM)
vllm serve axteam/Qwen3.5-2B-AWQ-4bit
Recommended sampling (Qwen):
temperature=0.7, top_p=0.8, top_k=20.
License
Quantized derivative of Qwen/Qwen3.5-2B (Apache-2.0). All original weights, tokenizer and chat template belong to the Qwen team.
ํ๊ตญ์ด ์์ฝ
Qwen/Qwen3.5-2B ๋ฅผ AWQ INT4 (W4A16) ๋ก ์์ํํ ์๋น์ฉ(4-bit) ๋ชจ๋ธ์
๋๋ค. ์์ฑ: axteam.
- ๋ฐฉ์ โ INT4 ๋น๋์นญ, 32๊ฐ ๋ฌถ์(BF16 ์ค์ผ์ผ+INT4 ์์ ), ํ์ฑํ BF16(W4A16). AWQ๋ก ๋ฐฐ์จ ์ด๋ ํ ์์ํ. ํ์ compressed-tensors
pack-quantized. - BF16 ์ ์ง โ ๋น์ ํ์ยทMTP ํค๋ยท๋ชจ๋ normยท์๋ฒ ๋ฉ/LM ํค๋ยทSSM ๋น์ ํ๋ถ(conv1d/A_log/dt_bias).
- PTQ โ ์ฌํ์ต ์์, ์๋ณธ ๋์ ์ ์ง.
- ํ์ง(์ค์ธก) โ BF16 ์๋ณธ ๋๋น perplexity 1.9971(์๋ณธ 1.8515, +7.9%), top-1 ์ผ์น๋ 86.8%(์๋ณธ 98.9%). ๋ด๋ถ ์/ํ 100๋ฌธํญ, ๊ฐ์ ํ๋ค์ค.
- ์ฌ์ฉ โ
vllm serve axteam/Qwen3.5-2B-AWQ-4bit, ๊ถ์ฅ ์ํ๋งtemperature=0.7, top_p=0.8, top_k=20. - ๋ผ์ด์ ์ค โ ์๋ณธ Apache-2.0 ํ์๋ฌผ. ๊ฐ์ค์นยทํ ํฌ๋์ด์ ยทchat_template ๊ถ๋ฆฌ๋ Qwen ํ.
- Downloads last month
- 15