CoolFace
Modelpublic

amd/Qwen3.5-9B-w4a16-tao-symgroup-torchao-v0.17.0

sourceHugging Faceapache-2.0updated 4mo agoView on Hugging Face
0likes77downloads
Model Card

Qwen3.5-9B-w4a16-tao-symgroup-torchao-v0.17.0

Model Overview

  • —Model Architecture: Qwen3_5ForConditionalGeneration
  • —Input: Text
  • —Output: Text
  • —Source Model: Qwen3.5-9B
  • —Supported Hardware: AMD EPYC (CPU inference)
  • —Preferred Operating System: Linux
  • —Inference Engine: vLLM v0.20.2
  • —Quantization Framework: TorchAO v0.17.0
  • —Quantization Method: 4-bit Weight-Only (W4A16), Symmetric Per-Group
  • —Compatible Stack:
  • —ZenDNN v6.0.0
  • —ZenTorch v2.11.0.1
  • —PyTorch v2.11.0
  • —TorchAO v0.17.0
  • —vLLM v0.20.2

This is a quantized version of Qwen3.5-9B created by AMD using TorchAO for ZenDNN-optimized CPU inference.

Quantization

The model was quantized from Qwen3.5-9B using TorchAO v0.17.0.

  • —Method: 4-bit Weight-Only (W4A16), Symmetric Per-Group
  • —Config: Int4WeightOnlyConfig(group_size=128, mapping_type=MappingType.SYMMETRIC)
  • —Quantized Layers: All linear layers excluding lm_head and embed_tokens

Quantization script:

bash
python woq_sym_group.py \
    --model_name Qwen/Qwen3.5-9B \
    --output_dir ./Qwen3.5-9B-w4a16-tao-symgroup-torchao-v0.17.0

Quick Start

Use with vLLM

python
from vllm import LLM, SamplingParams

model = LLM(
    model="amd/Qwen3.5-9B-w4a16-tao-symgroup-torchao-v0.17.0",
    dtype="bfloat16",
)

sampling_params = SamplingParams(temperature=0.7, max_tokens=256)
outputs = model.generate(["Hello, how are you?"], sampling_params)
print(outputs[0].outputs[0].text)

Requirements

torch==2.11.0
torchao==0.17.0
zentorch==2.11.0.1
vllm==0.20.2

OpenMP Setup

For optimal performance, set LD_PRELOAD with libomp.so (LLVM OpenMP) or libiomp5.so (Intel OpenMP):

bash
# Using LLVM OpenMP (llvmopenmp)
export LD_PRELOAD=$(find /path/to/env -name "libomp.so" | head -1)

# Or using Intel OpenMP (libiomp)
export LD_PRELOAD=$(find /path/to/env -name "libiomp5.so" | head -1)
Note: Set LD_PRELOAD before launching vLLM or any inference script.

Evaluation

The model was evaluated against the BF16 (unquantized) baseline on standard benchmarks using lm-evaluation-harness with the vLLM engine.

BenchmarkBF16 BaselineW4A16-TAO-SymGroup (this model)Recovery
MMLU (5-shot)---
GSM8K_COT (8-shot)---
Perplexity (wikitext2)---
Evaluation results will be updated after benchmarking.

Reproduction

bash
lm_eval \
    --model vllm \
    --model_args pretrained="amd/Qwen3.5-9B-w4a16-tao-symgroup-torchao-v0.17.0" \
    --tasks mmlu \
    --num_fewshot 5 \
    --batch_size auto

Limitations

  • —Version Lock: This model is quantized with TorchAO v0.17.0 and is compatible only with PyTorch v2.11.0 / ZenDNN v6.0.0. It will not load correctly on other PyTorch versions.
  • —CPU Only: This model is optimized for AMD EPYC CPU inference via ZenDNN. It is not intended for GPU inference.

License

This model is distributed under the same license as the source model. See the LICENSE file for details.

Modifications copyright (c) 2026 Advanced Micro Devices, Inc. All rights reserved.