Views
No views yet

vllm serve RedHatAI/gemma-4-31B-it-FP8-block \
--tensor-parallel-size 2 \
--max-model-len 32768 \
--gpu-memory-utilization 0.90 \
--enable-auto-tool-choice \
--reasoning-parser gemma4 \
--tool-call-parser gemma4 \
--chat-template examples/tool_chat_template_gemma4.jinja \
--limit-mm-per-prompt '{"image": 4, "audio": 1}' \
--async-schedulingTip: For text-only workloads, pass--limit-mm-per-prompt '{"image": 0, "audio": 0}'to skip vision encoder memory allocation and free up GPU memory for a longer context window.
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 extra_body={"chat_template_kwargs": {"enable_thinking": True}},
21)
22
23generated_text = outputs.choices[0].message.content
24print(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 | IFEval (0-shot, prompt-level strict) | 90.70 | 91.25 | 100.6% |
| IFEval (0-shot, inst-level strict) | 93.45 | 94.00 | 100.6% | |
| Reasoning | GSM8K Platinum (0-shot, strict-match) | 95.78 | 95.78 | 100.0% |
| MMLU-Pro (0-shot, custom-extract) | 85.41 | 85.44 | 100.0% | |
| MATH-500 (0-shot, pass@1) | 89.40 | 88.67 | 99.2% | |
| AIME 2025 (0-shot, pass@1) | 65.83 | 68.33 | 103.8% | |
| GPQA Diamond (0-shot, pass@1) | 77.44 | 77.95 | 100.7% | |
| Coding | LiveCodeBench v6 (0-shot, pass@1) | 71.43 | 73.52 | 102.9% |
| Category | Benchmark | google/gemma-4-31B-it | RedHatAI/gemma-4-31B-it-FP8-block | Recovery |
|---|---|---|---|---|
| Instruction Following | IFEval (0-shot, prompt-level strict) | 94.58 | 94.21 | 99.6% |
| IFEval (0-shot, inst-level strict) | 96.44 | 96.12 | 99.7% | |
| Reasoning | GSM8K Platinum (0-shot, strict-match) | 96.11 | 96.20 | 100.1% |
| MMLU-Pro (0-shot, custom-extract) | 87.05 | 87.01 | 100.0% | |
| MATH-500 (0-shot, pass@1) | 87.93 | 88.07 | 100.2% | |
| AIME 2025 (0-shot, pass@1) | 87.08 | 87.50 | 100.5% | |
| GPQA Diamond (0-shot, pass@1) | 86.36 | 86.87 | 100.6% | |
| Tool Calling | BFCLv4 Overall | 70.77% | 67.59% | 95.5% |
| BFCLv4 Single Turn | 84.99% | 85.15% | 100.2% | |
| BFCLv4 Multi-Turn | 66.25% | 67.62% | 102.1% | |
| BFCLv4 Agentic | 65.82% | 56.53% | 85.9% |
vllm serve RedHatAI/gemma-4-31B-it-FP8-block \
--served-model-name gemma-4-31b-it-FP8-block \
--max-model-len 32768 \
--gpu-memory-utilization 0.90 \
--language-model-only \
--enable-auto-tool-choice \
--reasoning-parser gemma4 \
--tool-call-parser gemma4 \
--chat-template examples/tool_chat_template_gemma4.jinja \
--async-scheduling \
--default-chat-template-kwargs '{"enable_thinking": true}'Note: To reproduce the results without thinking, remove--default-chat-template-kwargs '{"enable_thinking": true}'. To run without tool calling, remove--enable-auto-tool-choice,--tool-call-parser gemma4, and--reasoning-parser gemma4.
lm_eval --model local-chat-completions \
--tasks gsm8k_platinum_cot_llama \
--model_args "model=gemma-4-31b-it-FP8-block,max_length=32768,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
--num_fewshot 0 \
--apply_chat_template \
--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=32000,seed=1234"lm_eval --model local-chat-completions \
--tasks mmlu_pro_chat \
--model_args "model=gemma-4-31b-it-FP8-block,max_length=32768,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
--num_fewshot 0 \
--apply_chat_template \
--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=32000,seed=1234"lm_eval --model local-chat-completions \
--tasks ifeval \
--model_args "model=gemma-4-31b-it-FP8-block,max_length=32768,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
--num_fewshot 0 \
--apply_chat_template \
--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=32000,seed=1234"1model_parameters:
2 provider: hosted_vllm
3 model_name: hosted_vllm/gemma-4-31b-it-FP8-block
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: 1.0
10 max_new_tokens: 65536
11 top_p: 0.95
12 top_k: 64
13 seed: 1234seed in the config each time):lighteval endpoint litellm litellm_config.yaml 'math_500|0' \
--output-dir results/ --save-details
lighteval endpoint litellm litellm_config.yaml 'aime25|0' \
--output-dir results/ --save-details
lighteval endpoint litellm litellm_config.yaml 'gpqa:diamond|0' \
--output-dir results/ --save-details1model_parameters:
2 provider: hosted_vllm
3 model_name: hosted_vllm/gemma-4-31b-it-FP8-block
4 base_url: http://0.0.0.0:8000/v1
5 api_key: ''
6 timeout: 1200
7 concurrent_requests: 32
8 generation_parameters:
9 temperature: 1.0
10 max_new_tokens: 32768
11 top_p: 0.95
12 top_k: 64
13 seed: 1234--default-chat-template-kwargs):lighteval endpoint litellm litellm_config.yaml 'lcb:codegeneration_v6|0' \
--output-dir results/ --save-detailsbfcl_eval/constants/model_config.pyapi_inference_model_map:1"gemma-4-31b-it-FP8-block": ModelConfig(
2 model_name="gemma-4-31b-it-FP8-block",
3 display_name="Gemma-4-31b-it-FP8-Block (FC)",
4 url="https://huggingface.co/RedHatAI/gemma-4-31B-it-FP8-block",
5 org="Google",
6 license="Apache 2.0",
7 model_handler=OpenAICompletionsHandler,
8 input_price=None,
9 output_price=None,
10 is_fc_model=True,
11 underscore_to_dot=True,
12),bfcl_eval/constants/supported_models.py"gemma-4-31b-it-FP8-block" to the SUPPORTED_MODELS list.--served-model-name flag ensures BFCL can find the model by its registered slug).bfcl generate --model gemma-4-31b-it-FP8-block --test-category all
bfcl evaluate --model gemma-4-31b-it-FP8-block --test-category all