Instructions to use mattbucci/Qwen3.8-27B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mattbucci/Qwen3.8-27B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mattbucci/Qwen3.8-27B-AWQ") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("mattbucci/Qwen3.8-27B-AWQ") model = AutoModelForMultimodalLM.from_pretrained("mattbucci/Qwen3.8-27B-AWQ", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mattbucci/Qwen3.8-27B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mattbucci/Qwen3.8-27B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mattbucci/Qwen3.8-27B-AWQ", "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/mattbucci/Qwen3.8-27B-AWQ
- SGLang
How to use mattbucci/Qwen3.8-27B-AWQ 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 "mattbucci/Qwen3.8-27B-AWQ" \ --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": "mattbucci/Qwen3.8-27B-AWQ", "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 "mattbucci/Qwen3.8-27B-AWQ" \ --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": "mattbucci/Qwen3.8-27B-AWQ", "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 mattbucci/Qwen3.8-27B-AWQ with Docker Model Runner:
docker model run hf.co/mattbucci/Qwen3.8-27B-AWQ
Qwen3.8-27B-AWQ (INT4 W4A16)
4-bit AWQ quantization of Qwen/Qwen3.8-27B, calibrated in-house on 2×RTX 3090 (Ampere, sm_86) for single-user 256K-context serving under SGLang. Thinking, image, and video are all preserved and probe-verified.
Weights are ~18.7 GB, so the model fits two 24 GB cards at TP=2 with room for a
deep KV pool (697K tokens measured at --max-running 1).
Validation
Measured on the shipped checkpoint (SGLang v0.5.17 + local patches, TP=2, RTX 3090 ×2):
| Probe | Result |
|---|---|
| MMLU (30 samples) | 0.93 |
| HumanEval (25 samples) | 0.96 |
| Needle-in-haystack | 1.0 — 6/6 found at server-verified 131,150 and 250,077 actual prompt tokens |
| Capabilities | 5/5 — basic, tool-call, thinking, vision, video |
| AWQ scale integrity | 0 of 800 scales/qweight tensors flagged (no zero/NaN/Inf scales) |
| LAB-Bench (56 questions) | 0.16 — low-ish; see caveat below |
Single-user decode throughput (M=1, 100 output tokens, depth server-verified via
actual_input_tokens):
| Context | tok/s | TPOT |
|---|---|---|
| 1,024 | 70.6 | 14.2 ms |
| 32,768 | 67.2 | 14.9 ms |
| 261,916 | 48.4 | 20.7 ms |
Decode holds 69% of its short-context rate at full depth. (We do not quote a cold-prefill TTFT at 262K: our measured deep request hit the prefix cache for 261,888 of 261,916 tokens, so that timing is not a prefill number. Decode throughput is unaffected — it attends over the whole KV either way.)
Quantization recipe
- Method: GPTQ, W4A16, group size 128, symmetric int4 (
llmcompressor), then converted compressed-tensors → native AWQ (gemm) for AWQ_Marlin kernels. - Calibration data (256 samples × 1024 tokens): 30% thinking traces
(
glaiveai/reasoning-v1-20m), 25% image instruction (LLaVA-Instruct-150K), 20% video instruction (lmms-lab/LLaVA-Video-178K), 15% math (NuminaMath-CoT), 10% chat (ultrachat_200k). Video samples are deliberate: calibrating a video-capable model without them drifts the temporal-attention weights. - Kept in BF16 (not quantized):
lm_head; the whole vision tower (model.visual.*, 167 modules); and the Gated DeltaNet gating scalarsin_proj_a/in_proj_b(48 each). The rest oflinear_attn(in_proj_qkv,in_proj_z,out_proj) is INT4 — this split is what SGLang'sQwen3_5GatedDeltaNetloader expects, and getting it wrong yields a model that emits!!!!!.
Serving (SGLang)
python -m sglang.launch_server \
--model-path mattbucci/Qwen3.8-27B-AWQ \
--tensor-parallel-size 2 --quantization awq_marlin \
--context-length 262144 --max-running-requests 1 \
--mem-fraction-static 0.85 --reasoning-parser qwen3 \
--tool-call-parser qwen3_coder --max-mamba-cache-size 8
⚠ --max-running-requests caps your usable context
This model is 64 layers = 48 Gated DeltaNet + 16 full attention, and the
DeltaNet recurrent state is replicated per concurrent slot. Combined with the
untied 248,320-token vocab (embeddings + lm_head stay BF16), concurrency eats
the KV pool fast. Measured on 2×24 GB:
--max-running-requests |
KV pool (max_total_num_tokens) |
|---|---|
| 1 | 697,368 (2.7× the 262,144 context) |
| 8 | 32,516 — the 262,144 context claim is then a lie |
If you raise concurrency, lower --context-length accordingly and read
max_total_num_tokens back from /get_server_info rather than trusting the
context flag.
Caveats
- No MTP. The base ships Multi-Token-Prediction layers;
transformersdoes not model them, so they are absent here. MTP-based speculative decoding is not available on this checkpoint (SGLang's main loader skipsmtp.*weights anyway, so nothing breaks). - LAB-Bench 0.16 is on the low side. It sits inside the spread we observe across DeltaNet-family INT4 ships on the same 56-question probe (0.11–0.32), and every other instrument is top-tier, so we log it as a watch item rather than a defect — but if your workload is domain-heavy scientific protocol QA, benchmark before relying on it.
- Calibrated and validated on Ampere (sm_86) with AWQ_Marlin. Other architectures should work but are untested by us.
License
Apache-2.0, inherited from the base model. See LICENSE.
- Downloads last month
- 171
Model tree for mattbucci/Qwen3.8-27B-AWQ
Base model
Qwen/Qwen3.8-27B