Views
No views yet
vllm serve RedHatAI/Qwen3-30B-A3B-FP8-block --tensor_parallel_size 41from openai import OpenAI
2
3# Modify OpenAI's API key and API base to use vLLM's API server.
4openai_api_key = "EMPTY"
5openai_api_base = "http://<your-server-host>:8000/v1"
6
7client = OpenAI(
8 api_key=openai_api_key,
9 base_url=openai_api_base,
10)
11
12model = "RedHatAI/Qwen3-30B-A3B-FP8-block"
13
14messages = [
15 {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
16]
17
18outputs = client.chat.completions.create(
19 model=model,
20 messages=messages,
21)
22
23generated_text = outputs.choices[0].message.content
24print(generated_text)1from transformers import AutoProcessor, Qwen3MoeForCausalLM
2
3from llmcompressor import oneshot
4from llmcompressor.modeling import replace_modules_for_calibration
5from llmcompressor.modifiers.quantization import QuantizationModifier
6
7MODEL_ID = "Qwen/Qwen3-30B-A3B"
8
9# Load model.
10model = Qwen3ForCausalLM.from_pretrained(MODEL_ID, dtype="auto")
11processor = AutoProcessor.from_pretrained(MODEL_ID)
12model = replace_modules_for_calibration(model)
13
14# Configure the quantization algorithm and scheme.
15# In this case, we:
16# * quantize the weights to fp8 with per-block quantization
17# * quantize the activations to fp8 with dynamic token activations
18recipe = QuantizationModifier(
19 targets="Linear",
20 scheme="FP8_BLOCK",
21 ignore=["lm_head"],
22)
23
24# Apply quantization.
25oneshot(model=model, recipe=recipe)
26
27# Save to disk in compressed-tensors format.
28SAVE_DIR = MODEL_ID.rstrip("/").split("/")[-1] + "-FP8-block"
29model.save_pretrained(SAVE_DIR)
30processor.save_pretrained(SAVE_DIR)lm_eval \
--model vllm \
--model_args pretrained="RedHatAI/Qwen3-30B-A3B-FP8-block",dtype=auto,add_bos_token=True,max_model_len=16384,tensor_parallel_size=2,gpu_memory_utilization=0.9,enable_chunked_prefill=True,trust_remote_code=True \
--tasks openllm \
--write_out \
--batch_size auto \
--show_configlm_eval \
--model vllm \
--model_args pretrained="RedHatAI/Qwen3-30B-A3B-FP8-block",dtype=auto,add_bos_token=False,max_model_len=16384,tensor_parallel_size=2,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_configevalplus.evaluate --model "RedHatAI/Qwen3-30B-A3B-FP8-block" \
--dataset "humaneval" \
--backend vllm \
--tp 2 \
--greedy
evalplus.evaluate --model "RedHatAI/Qwen3-30B-A3B-FP8-block" \
--dataset "mbpp" \
--backend vllm \
--tp 2 \
--greedy
| Category | Metric | Qwen/Qwen3-30B-A3B | RedHatAI/Qwen3-30B-A3B-FP8-block | Recovery (%) |
|---|---|---|---|---|
| OpenLLM V1 | ARC-Challenge (Acc-Norm, 25-shot) | 69.28 | 69.88 | 100.86 |
| GSM8K (Strict-Match, 5-shot) | 89.99 | 89.16 | 99.07 | |
| HellaSwag (Acc-Norm, 10-shot) | 77.64 | 77.41 | 99.71 | |
| MMLU (Acc, 5-shot) | 79.50 | 79.37 | 99.84 | |
| TruthfulQA (MC2, 0-shot) | 53.20 | 53.93 | 101.38 | |
| Winogrande (Acc, 5-shot) | 72.30 | 72.69 | 100.55 | |
| Average Score | 73.65 | 73.74 | 100.12 | |
| OpenLLM V2 | IFEval (Inst Level Strict Acc, 0-shot) | 48.68 | 47.84 | 98.28 |
| BBH (Acc-Norm, 3-shot) | 32.46 | 32.06 | 98.77 | |
| Math-Hard (Exact-Match, 4-shot) | 18.81 | 18.96 | 100.80 | |
| GPQA (Acc-Norm, 0-shot) | 24.16 | 24.75 | 102.43 | |
| MUSR (Acc-Norm, 0-shot) | 38.62 | 40.48 | 104.79 | |
| MMLU-Pro (Acc, 5-shot) | 23.15 | 25.66 | 110.80 | |
| Average Score | 30.98 | 31.62 | 102.07 | |
| Coding | HumanEval pass@1 | 93.30 | 93.90 | 100.64 |
| HumanEval+ pass@1 | 87.80 | 88.40 | 100.68 | |
| MBPP pass@1 | 86.00 | 85.20 | 99.06 | |
| MBPP+ pass@1 | 73.00 | 73.30 | 100.41 |