Qwen3-32B-FP8-block

Model Overview

  • Model Architecture: Qwen3ForCausalLM
    • Input: Text
    • Output: Text
  • Model Optimizations:
    • Weight quantization: FP8
    • Activation quantization: FP8
  • Release Date:
  • Version: 1.0
  • Model Developers:: Red Hat

Quantized version of Qwen/Qwen3-32B.

Model Optimizations

This model was obtained by quantizing the weights and activations of Qwen/Qwen3-32B to FP8 data type. This optimization reduces the number of bits per parameter from 16 to 8, reducing the disk size and GPU memory requirements by approximately 50%. Only the weights and activations of the linear operators within transformers blocks of the language model are quantized.

Deployment

Use with vLLM

  1. Initialize vLLM server:
vllm serve nm-testing/Qwen3-32B-FP8-block --tensor_parallel_size 4
  1. Send requests to the server:
from openai import OpenAI

# Modify OpenAI's API key and API base to use vLLM's API server.
openai_api_key = "EMPTY"
openai_api_base = "http://<your-server-host>:8000/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)

model = "nm-testing/Qwen3-32B-FP8-block"

messages = [
    {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
]


outputs = client.chat.completions.create(
    model=model,
    messages=messages,
)

generated_text = outputs.choices[0].message.content
print(generated_text)

Creation

This model was quantized using the llm-compressor library as shown below.

Creation details
from transformers import AutoProcessor, Qwen3ForCausalLM

from llmcompressor import oneshot
from llmcompressor.modeling import replace_modules_for_calibration
from llmcompressor.modifiers.quantization import QuantizationModifier

MODEL_ID = ""nm-testing/Qwen3-32B-FP8-block""

# Load model.
model = Qwen3ForCausalLM.from_pretrained(MODEL_ID, dtype="auto")
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = replace_modules_for_calibration(model)

# Configure the quantization algorithm and scheme.
# In this case, we:
#   * quantize the weights to fp8 with per-block quantization
#   * quantize the activations to fp8 with dynamic token activations
recipe = QuantizationModifier(
    targets="Linear",
    scheme="FP8_BLOCK",
    ignore=["lm_head"],
)

# Apply quantization.
oneshot(model=model, recipe=recipe)

# Save to disk in compressed-tensors format.
SAVE_DIR = MODEL_ID.rstrip("/").split("/")[-1] + "-FP8-block"
model.save_pretrained(SAVE_DIR)
processor.save_pretrained(SAVE_DIR)

Evaluation

The model was evaluated on the OpenLLM leaderboard task, using lm-evaluation-harness. vLLM was used for all evaluations.

Evaluation details

Openllm V1

lm_eval \
  --model vllm \
  --model_args pretrained="nm-testing/Qwen3-32B-FP8-block",dtype=auto,add_bos_token=True,max_model_len=16384,tensor_parallel_size=4,gpu_memory_utilization=0.9,enable_chunked_prefill=True,trust_remote_code=True \
  --tasks openllm \
  --write_out \
  --batch_size auto \
  --show_config

Openllm V2

lm_eval \
  --model vllm \
  --model_args pretrained="nm-testing/Qwen3-32B-FP8-block",dtype=auto,add_bos_token=False,max_model_len=16384,tensor_parallel_size=4,gpu_memory_utilization=0.7,disable_log_stats=True,enable_chunked_prefill=True,trust_remote_code=True \
  --tasks leaderboard \
  --apply_chat_template \
  --fewshot_as_multiturn \
  --write_out \
  --batch_size auto \
  --show_config

Coding Benchmarks

evalplus.evaluate --model "nm-testing/Qwen3-32B-FP8-block" \
                  --dataset "humaneval" \
                  --backend vllm \
                  --tp 4 \
                  --greedy
evalplus.evaluate --model "nm-testing/Qwen3-32B-FP8-block" \
                --dataset "mbpp" \
                --backend vllm \
                --tp 4 \
                --greedy

Accuracy

Category Metric Qwen/Qwen3-32B nm-testing/Qwen3-32B-FP8-block Recovery (%)
OpenLLM V1 ARC-Challenge (Acc-Norm, 25-shot) 72.95 72.78 99.77
GSM8K (Strict-Match, 5-shot) 74.15 74.53 100.51
HellaSwag (Acc-Norm, 10-shot) 84.03 83.86 99.80
MMLU (Acc, 5-shot) 81.99 81.97 99.97
TruthfulQA (MC2, 0-shot) 59.18 58.72 99.22
Winogrande (Acc, 5-shot) 76.01 75.22 98.96
Average Score 74.72 74.51 99.72
OpenLLM V2 IFEval (Inst Level Strict Acc, 0-shot) 49.04 49.28 100.49
BBH (Acc-Norm, 3-shot) 35.27 33.94 96.21
Math-Hard (Exact-Match, 4-shot) 19.94 17.52 87.88
GPQA (Acc-Norm, 0-shot) 26.01 24.41 93.87
MUSR (Acc-Norm, 0-shot) 40.34 40.21 99.67
MMLU-Pro (Acc, 5-shot) 12.38 12.35 99.73
Average Score 30.50 29.62 97.11
Coding HumanEval pass@1 90.20 90.20 100.00
HumanEval+ pass@1 84.80 84.10 98.35
MBPP pass@1 86.50 86.20 99.65
MBPP+ pass@1 73.00 71.40 97.80
Downloads last month
16
Safetensors
Model size
33B params
Tensor type
BF16
·
F8_E4M3
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for RedHatAI/Qwen3-32B-FP8-block

Base model

Qwen/Qwen3-32B
Finetuned
(122)
this model