Views
No views yet
vllm serve RedHatAI/gemma-4-31B-it-FP8-block --max-model-len 32768vllm serve RedHatAI/gemma-4-31B-it-FP8-block \
--max-model-len 32768 \
--reasoning-parser gemma4 \
--tool-call-parser gemma4 \
--enable-auto-tool-choiceTip: For text-only workloads, pass--limit-mm-per-prompt image=0to skip vision encoder memory allocation. Set--gpu-memory-utilization 0.90to maximize KV cache capacity.
1from 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/gemma-4-31B-it-FP8-block"
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 llmcompressor import model_free_ptq
2
3MODEL_ID = "google/gemma-4-31B-it"
4SAVE_DIR = MODEL_ID.split("/")[1] + "-FP8-block"
5
6model_free_ptq(
7 model_stub=MODEL_ID,
8 save_directory=SAVE_DIR,
9 scheme="FP8_BLOCK",
10 ignore=["re:.*vision.*", "lm_head", "re:.*embed_tokens.*"],
11 max_workers=8,
12 device="cuda:0",
13)| Category | Benchmark | google/gemma-4-31B-it | RedHatAI/gemma-4-31B-it-FP8-block | Recovery |
|---|---|---|---|---|
| Instruction Following | GSM8k-Platinum (5-shot, strict-match) | 97.60 | 97.82 | 100.2% |
| MMLU-CoT (5-shot, strict_match) | 90.53 | 90.70 | 100.2% | |
| MMLU-Pro (5-shot, custom-extract) | 85.03 | 84.92 | 99.9% | |
| IFEval (0-shot, prompt-level strict) | 91.07 | 91.31 | 100.3% | |
| IFEval (0-shot, inst-level strict) | 93.76 | 93.84 | 100.1% |
vllm serve RedHatAI/gemma-4-31B-it-FP8-block --max-model-len 96000lm_eval --model local-chat-completions \
--tasks gsm8k_platinum_cot_llama \
--model_args "model=RedHatAI/gemma-4-31B-it-FP8-block,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 5 \
--apply_chat_template \
--fewshot_as_multiturn \
--output_path results_gsm8k_platinum.json \
--seed 1234 \
--gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=64000,seed=1234"lm_eval --model local-chat-completions \
--tasks mmlu_cot_llama \
--model_args "model=RedHatAI/gemma-4-31B-it-FP8-block,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 5 \
--apply_chat_template \
--fewshot_as_multiturn \
--output_path results_mmlu_cot.json \
--seed 1234 \
--gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=64000,seed=1234"lm_eval --model local-chat-completions \
--tasks mmlu_pro_chat \
--model_args "model=RedHatAI/gemma-4-31B-it-FP8-block,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 5 \
--apply_chat_template \
--fewshot_as_multiturn \
--output_path results_mmlu_pro.json \
--seed 1234 \
--gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=64000,seed=1234"lm_eval --model local-chat-completions \
--tasks ifeval \
--model_args "model=RedHatAI/gemma-4-31B-it-FP8-block,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 \
--fewshot_as_multiturn \
--output_path results_ifeval.json \
--seed 1234 \
--gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=64,max_gen_toks=64000,seed=1234"