Instructions to use vadery/Qwen3.5-0.8B-W8A8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vadery/Qwen3.5-0.8B-W8A8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="vadery/Qwen3.5-0.8B-W8A8") 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("vadery/Qwen3.5-0.8B-W8A8") model = AutoModelForMultimodalLM.from_pretrained("vadery/Qwen3.5-0.8B-W8A8", 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 vadery/Qwen3.5-0.8B-W8A8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vadery/Qwen3.5-0.8B-W8A8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vadery/Qwen3.5-0.8B-W8A8", "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/vadery/Qwen3.5-0.8B-W8A8
- SGLang
How to use vadery/Qwen3.5-0.8B-W8A8 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 "vadery/Qwen3.5-0.8B-W8A8" \ --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": "vadery/Qwen3.5-0.8B-W8A8", "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 "vadery/Qwen3.5-0.8B-W8A8" \ --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": "vadery/Qwen3.5-0.8B-W8A8", "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 vadery/Qwen3.5-0.8B-W8A8 with Docker Model Runner:
docker model run hf.co/vadery/Qwen3.5-0.8B-W8A8
Qwen3.5-0.8B W8A8 (INT8 weights + INT8 dynamic activations)
W8A8 INT8 quantization of Qwen/Qwen3.5-0.8B, produced with llm-compressor (SmoothQuant + GPTQ). The built-in MTP head is preserved as BF16 and works in vLLM โฅ 0.17 out of the box.
Quick start
pip install "vllm>=0.17"
huggingface-cli download vadery/Qwen3.5-0.8B-W8A8 --local-dir ./Qwen3.5-0.8B-W8A8
vllm serve ./Qwen3.5-0.8B-W8A8 \
--max-model-len 32768 \
--dtype bfloat16 \
--trust-remote-code \
--reasoning-parser qwen3 \
--speculative-config '{"method":"qwen3_5_mtp","num_speculative_tokens":1}'
No additional patches required โ both config.json.quantization_config.ignore (covers MTP Linear modules) and actorder field are already fixed.
Performance (single H200 SXM, single-stream)
| Workload | Throughput | TPOT p50 | MTP Accept rate | Mean accept length |
|---|---|---|---|---|
| JSON gen (concurrency 1) | 392 tok/s | 2.6 ms | 95.4 % | 1.95 / 2.0 |
3-4ร faster than the BF16 source running the same MTP recipe.
Architecture preserved
| Component | Status |
|---|---|
| Language model Linear (q/k/v/o, MLP) on full-attn layers | INT8 (W8A8 channelwise weight + dynamic per-token activation) |
linear_attn.* (Gated DeltaNet / SSM) layers |
BF16 (excluded โ Mamba state numerics matter) |
Vision tower (model.visual.*) |
BF16 (excluded) |
MTP head (mtp.*, 1 layer) |
BF16 (excluded; correctly listed in quantization_config.ignore) |
lm_head, embeddings, norms |
BF16 / FP32 (excluded) |
Quantization recipe
SmoothQuantModifier(smoothing_strength=0.8, mappings=SQ_MAPPINGS,
ignore=[...vision, mtp, linear_attn, embed, lm_head...])
GPTQModifier(targets="Linear", scheme="W8A8",
ignore=[same as above],
dampening_frac=0.01)
SmoothQuant mappings explicitly cover only the 6 full-attention layers (indices 3, 7, 11, 15, 19, 23 out of 24) plus MLP on every layer โ to avoid SmoothQuant trying to fuse into the linear_attn projections which have a non-standard shape.
Calibration: 256 samples ร 2048 tokens from HuggingFaceH4/ultrachat_200k.
File size
| Size | |
|---|---|
BF16 source (Qwen/Qwen3.5-0.8B) |
1.7 GB |
| This W8A8 model | 1.4 GB |
Notes / gotchas
- vLLM โฅ 0.17 required (
qwen3_5_mtpspeculative method only landed there). transformersโฅ 5.x is required forqwen3_5model_type.- The MTP head weights are stored as
mtp.*keys in the safetensors file; do not delete or re-quantize them. The companionquantization_config.ignorelist explicitly excludes the 8 MTP Linear modules so vLLM treats them as float. - For multi-stream serving raise
--max-model-lenand--max-num-seqsto taste.
Reproducing
The quantization script is at https://huggingface.co/vadery/qwen36-27b-ft-grm-w8a8 (sibling 27B model), parameterized for the 0.8B's layer count.
License
Inherits Apache 2.0 from the base model.
- Downloads last month
- 48