Views
No views yet
Linear layers only. The vision tower
(re:.*visual.*), the hybrid linear-attention mixers (re:.*linear_attn.*),
and lm_head stay in bf16. The full VLM (with vision_config) is saved in the
compressed-tensors format,
and the base MTP predictor is preserved for speculative decoding.1from transformers import AutoModelForImageTextToText, AutoTokenizer
2from llmcompressor import oneshot
3from llmcompressor.modifiers.gptq import GPTQModifier
4from llmcompressor.modifiers.transform.awq import AWQModifier
5
6MODEL_ID = "Qwen/Qwen3.8-27B"
7model = AutoModelForImageTextToText.from_pretrained(MODEL_ID, dtype="bfloat16")
8tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
9# ... load 512 ultrachat_200k samples, chat-templated, at 2048 tokens ...
10
11recipe = [
12 AWQModifier(duo_scaling="both", n_grid=20),
13 GPTQModifier(targets=["Linear"], scheme="W4A16", block_size=128,
14 dampening_frac=0.01, actorder="static",
15 ignore=["lm_head", "re:.*visual.*", "re:.*linear_attn.*"]),
16]
17oneshot(model=model, dataset=ds, recipe=recipe,
18 max_seq_length=2048, num_calibration_samples=512)
19model.save_pretrained("Qwen3.8-27B-W4A16-AWQ-GPTQ", save_compressed=True, save_original_format=False)
20tokenizer.save_pretrained("Qwen3.8-27B-W4A16-AWQ-GPTQ")vllm serve soyrsoyr/Qwen3.8-27B-W4A16-AWQ-GPTQ1from vllm import LLM, SamplingParams
2
3llm = LLM(model="soyrsoyr/Qwen3.8-27B-W4A16-AWQ-GPTQ")
4out = llm.generate(["The capital of France is"], SamplingParams(max_tokens=32))
5print(out[0].outputs[0].text)| Benchmark | Qwen3.8-27B | W4A16-AWQ-GPTQ | Recovery |
|---|---|---|---|
| ARC-Challenge (25-shot), acc_norm | 50.68 | 50.09 | 98.8% |
| HellaSwag (10-shot), acc_norm | 71.99 | 71.94 | 99.9% |
| TruthfulQA-mc2 (0-shot), acc | 61.25 | 60.33 | 98.5% |
| Winogrande (5-shot), acc | 76.87 | 76.64 | 99.7% |
| Average | 65.20 | 64.75 | 99.3% |
| Benchmark | Qwen3.8-27B | W4A16-AWQ-GPTQ | Recovery |
|---|---|---|---|
| AIME-24, avg@4 | 95.00 | 90.83 | 95.6% |
| AIME-25, avg@4 | 93.33 | 85.00 | 91.1% |
| MATH-500, pass@1 | 82.00 | 80.80 | 98.5% |
| Average | 90.11 | 85.54 | 94.9% |