Views
No views yet


vllm serve RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic --reasoning-parser qwen3 --language-model-only --tensor-parallel-size 4vllm serve RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic --reasoning-parser qwen3 --tensor-parallel-size 4vllm serve RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic --reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder --tensor-parallel-size 4vllm serve RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic --reasoning-parser qwen3 --speculative-config '{"method":"qwen3_next_mtp","num_speculative_tokens":2}' --tensor-parallel-size 41from openai import OpenAI
2
3openai_api_key = "EMPTY"
4openai_api_base = "http://<your-server-host>:8000/v1"
5
6client = OpenAI(
7 api_key=openai_api_key,
8 base_url=openai_api_base,
9)
10
11model = "RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic"
12
13messages = [
14 {"role": "user", "content": "Explain quantum mechanics clearly and concisely."},
15]
16
17outputs = client.chat.completions.create(
18 model=model,
19 messages=messages,
20)
21
22generated_text = outputs.choices[0].message.content
23print(generated_text)1from transformers import AutoProcessor, Qwen3_5MoeForConditionalGeneration
2
3from llmcompressor import oneshot
4from llmcompressor.modifiers.quantization import QuantizationModifier
5
6MODEL_ID = "Qwen/Qwen3.5-397B-A17B"
7
8# Load model.
9model = Qwen3_5MoeForConditionalGeneration.from_pretrained(MODEL_ID, dtype="auto")
10processor = AutoProcessor.from_pretrained(MODEL_ID)
11
12# Configure the quantization algorithm and scheme.
13# In this case, we:
14# * quantize the weights to fp8 with channel-wise quantization
15# * quantize the activations to fp8 with dynamic per-token quantization
16recipe = QuantizationModifier(
17 targets="Linear",
18 scheme="FP8_DYNAMIC",
19 ignore=[
20 "re:.*lm_head",
21 "re:visual.*",
22 "re:model.visual.*",
23 "re:.*mlp.gate$",
24 "re:.*embed_tokens$",
25 "re:.*shared_expert_gate$",
26 "re:.*mlp\\.shared_expert$",
27 "re:.*linear_attn.*",
28 ],
29)
30
31# Apply quantization.
32oneshot(model=model, recipe=recipe)
33
34# Save to disk in compressed-tensors format.
35SAVE_DIR = MODEL_ID.rstrip("/").split("/")[-1] + "-FP8-dynamic"
36model.save_pretrained(SAVE_DIR)
37processor.save_pretrained(SAVE_DIR)--language-model-only.| Category | Benchmark | Qwen/Qwen3.5-397B-A17B | RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic | Recovery |
|---|---|---|---|---|
| Reasoning | GSM8K-Platinum (0-shot) | 95.53 | 95.37 | 100.2% |
| MMLU-Pro (0-shot) | 88.27 | 88.33 | 100.1% | |
| Math 500 (0-shot) | 84.93 | 84.53 | 99.5% | |
| AIME 25 (0-shot) | 92.92 | 94.58 | 101.8% | |
| GPQA Diamond (0-shot) | 89.73 | 88.72 | 98.9% | |
| Instruction Following | IFEval prompt-level strict (0-shot) | 90.63 | 90.70 | 100.1% |
| IFEval inst-level strict (0-shot) | 93.21 | 93.37 | 99.8% | |
| Coding | LiveCodeBench v6 (0-shot) | 83.81 | 83.62 | 99.8% |
vllm serve RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic --reasoning-parser qwen3 --language-model-only --max-model-len 96000 --tensor-parallel-size 4lm_eval --model local-chat-completions \
--tasks gsm8k_platinum_cot_llama \
--model_args "model=RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic,max_length=96000,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=128,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=2400" \
--num_fewshot 0 \
--apply_chat_template \
--output_path results.json \
--seed 42 \
--gen_kwargs "do_sample=true,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000,presence_penalty=0.0,repetition_penalty=1.0,seed=42"lm_eval --model local-chat-completions \
--tasks ifeval \
--model_args "model=RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic,max_length=96000,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=128,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=2400" \
--apply_chat_template \
--output_path results.json \
--seed 42 \
--gen_kwargs "do_sample=true,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000,presence_penalty=0.0,repetition_penalty=1.0,seed=42"lm_eval --model local-chat-completions \
--tasks mmlu_pro_chat \
--model_args "model=RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic,max_length=96000,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=128,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
--num_fewshot 0 \
--apply_chat_template \
--output_path results.json \
--seed 42 \
--gen_kwargs "do_sample=true,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000,presence_penalty=0.0,repetition_penalty=1.0,seed=42"1model_parameters:
2 provider: "hosted_vllm"
3 model_name: "hosted_vllm/RedHatAI/Qwen3.5-397B-A17B-FP8-dynamic"
4 base_url: "http://0.0.0.0:8000/v1"
5 api_key: ""
6 timeout: 3600
7 concurrent_requests: 32
8 generation_parameters:
9 temperature: 0.6
10 max_new_tokens: 64000
11 top_p: 0.95
12 top_k: 20
13 min_p: 0.0
14 presence_penalty: 0.0
15 repetition_penalty: 1.0
16 seed: 0lighteval endpoint litellm litellm_config.yaml \
"math_500|0,gpqa:diamond|0,lcb:codegeneration_v6|0" \
--output-dir results \
--save-detailslighteval endpoint litellm litellm_config.yaml \
"aime25|0" \
--output-dir results \
--save-details