/ Модель

Характеристики

Лицензия
Apache 2.0
Архитектура
gemma4 · dense
Базовая модель
gemma-4-26B-A4B-it
Библиотека
transformers
Опубликована
5 апр 2026

gemma-4-26B-A4B-it-NVFP4

Изображение и текст → текст15 профессий

RedHatAI/gemma-4-26B-A4B-it-NVFP4 — квантизированная версия мультимодальной модели google/gemma-4-26B-A4B-it, разработанная RedHatAI на базе модели Google.

322 тыс.скачиваний за 30 дней46лайковвеса обновлены13 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Она предназначена для генерации текста, диалоговых и текстовых задач, обработки изображений с выдачей текстового ответа, а также вызова инструментов и function calling. Модель поддерживает режим рассуждений и ориентирована на развёртывание через vLLM.

Архитектура модели обозначена как Gemma4ForConditionalGeneration. На вход она принимает текст и изображения, на выходе генерирует текст. Веса и активации линейных операторов внутри transformer-блоков квантизированы в формат NVFP4/FP4: для весов используется размер группы 16, для активаций — локальное масштабирование по группам. Vision tower, эмбеддинги, выходная голова и маршрутизаторы MoE сохранены в исходной точности. Квантизация сокращает число бит на параметр с 16 до 4 и примерно на 75% уменьшает размер модели на диске и требования к GPU-памяти. В документации для vLLM указан максимальный контекст 32768 токенов.

Сильные стороны модели — мультимодальность, поддержка рассуждений и вызова инструментов, а также сниженные требования к памяти по сравнению с неквантизированной версией. Квантизация может приводить к некоторому снижению качества относительно исходной модели; README приводит результаты сравнительных оценок, но не содержит полного описания языков и всех ограничений. Для вызова инструментов и режима рассуждений требуются соответствующие настройки vLLM и парсеры Gemma 4. Модель распространяется по лицензии Apache 2.0.

Для каких профессий подходит15

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Overview

  • Model Architecture: Gemma4ForConditionalGeneration
    • Input: Text / Image
    • Output: Text
  • Model Optimizations:
    • Weight quantization: FP4
    • Activation quantization: FP4
  • Release Date: 2026-04-04
  • Version: 1.0
  • Model Developers: RedHatAI

This model is a quantized version of google/gemma-4-26B-A4B-it. It was evaluated on several tasks to assess its quality in comparison to the unquantized model.

Model Optimizations

This model was obtained by quantizing the weights and activations of google/gemma-4-26B-A4B-it to NVFP4 data type, ready for inference with vLLM. This optimization reduces the number of bits per parameter from 16 to 4, reducing the disk size and GPU memory requirements by approximately 75%.

Weights are quantized to FP4 with a group size of 16, and activations are quantized to FP4 with local per-group scaling. Only the weights and activations of the linear operators within transformer blocks are quantized using LLM Compressor. Vision tower, embedding, output head, and MoE router layers are kept in their original precision.

Deployment

Use with vLLM

This model can be deployed using vLLM. For detailed instructions including multimodal inference, thinking mode, function calling, and benchmarking, see the Gemma 4 26B-A4B vLLM usage guide.

  1. Start the vLLM server:
vllm serve RedHatAI/gemma-4-26B-A4B-it-NVFP4 \
  --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}'

Tip: 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.

  1. Send requests to the server:
from openai import OpenAI

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 = "RedHatAI/gemma-4-26B-A4B-it-NVFP4"

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

outputs = client.chat.completions.create(
    model=model,
    messages=messages,
    extra_body={"chat_template_kwargs": {"enable_thinking": True}},
)

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

Creation

This model was created by applying NVFP4 quantization with LLM Compressor, as presented in the code snippet below.

from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer
from llmcompressor import apply
from llmcompressor.modifiers.quantization import QuantizationModifier

MODEL_ID = "google/gemma-4-26B-A4B-it"
SAVE_DIR = MODEL_ID.split("/")[1] + "-NVFP4"

model = AutoModelForCausalLM.from_pretrained(MODEL_ID, torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)

ds = load_dataset("mgoin/ultrachat_200k_s3", split="train_sft")
calibration_data = [ex["prompt"] for ex in ds.select(range(512))]

recipe = QuantizationModifier(
    targets=["Linear"],
    ignore=["lm_head", "re:.*embed.*", "re:.*router", "re:.*vision_tower.*"],
    scheme="NVFP4",
)

apply(model=model, tokenizer=tokenizer, recipe=recipe, calibration_data=calibration_data)
model.save_pretrained(SAVE_DIR, save_compressed=True)
tokenizer.save_pretrained(SAVE_DIR)

Evaluation

This model was evaluated on GSM8K Platinum, MMLU-Pro, IFEval, MATH-500, AIME 2025, GPQA Diamond, LiveCodeBench v6, and BFCLv4 (function calling) using lm-evaluation-harness, lighteval, and BFCL — all served with vLLM (OpenAI-compatible API). Accuracy results are reported both without and with thinking enabled; BFCLv4 was evaluated with thinking enabled.

Accuracy

Without thinking

With thinking

Reproduction

The results were obtained using the following commands:

Each benchmark was run 3 times with different random seeds (1234, 2345, 3456) and the scores were averaged; AIME 2025 used 8 seeds.

vLLM server:

vllm serve RedHatAI/gemma-4-26B-A4B-it-NVFP4 \
  --tensor-parallel-size 1 \
  --max-model-len 69632 \
  --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":0,"audio":0}' \
  --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.

GSM8K Platinum (lm-eval, 0-shot, 3 repetitions)

lm_eval --model local-chat-completions \
  --tasks gsm8k_platinum_cot_llama \
  --model_args "model=RedHatAI/gemma-4-26B-A4B-it-NVFP4,max_length=69632,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
  --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"

MMLU-Pro (lm-eval, 0-shot, 3 repetitions)

lm_eval --model local-chat-completions \
  --tasks mmlu_pro_chat \
  --model_args "model=RedHatAI/gemma-4-26B-A4B-it-NVFP4,max_length=69632,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
  --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"

IFEval (lm-eval, 0-shot, 3 repetitions)

lm_eval --model local-chat-completions \
  --tasks ifeval \
  --model_args "model=RedHatAI/gemma-4-26B-A4B-it-NVFP4,max_length=69632,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
  --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"

MATH-500, AIME 2025, GPQA Diamond, LiveCodeBench v6 (lighteval, 3 repetitions; 8 for AIME 2025)

litellm_config.yaml:

model_parameters:
  provider: hosted_vllm
  model_name: hosted_vllm/RedHatAI/gemma-4-26B-A4B-it-NVFP4
  base_url: http://0.0.0.0:8000/v1
  api_key: ''
  timeout: 3600
  concurrent_requests: 32
  generation_parameters:
    temperature: 1.0
    max_new_tokens: 65536
    top_p: 0.95
    top_k: 64
    seed: 1234

Run once per seed (changing seed 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-details

lighteval endpoint litellm litellm_config.yaml 'lcb:codegeneration_v6|0' \
  --output-dir results/ --save-details

BFCLv4

BFCL requires the model to be registered in the leaderboard codebase before running evaluation.

Step 1 — Register the model in bfcl_eval/constants/model_config.py

Add the following entry to api_inference_model_map:

"gemma-4-26b-a4b-it-NVFP4": ModelConfig(
    model_name="gemma-4-26b-a4b-it-NVFP4",
    display_name="Gemma-4-26B-A4B-it-NVFP4 (FC)",
    url="https://huggingface.co/RedHatAI/gemma-4-26B-A4B-it-NVFP4",
    org="Google",
    license="Apache 2.0",
    model_handler=OpenAICompletionsHandler,
    input_price=None,
    output_price=None,
    is_fc_model=True,
    underscore_to_dot=True,
),

Step 2 — Add the key to bfcl_eval/constants/supported_models.py

Add "gemma-4-26b-a4b-it-NVFP4" to the SUPPORTED_MODELS list.

Step 3 — Start the vLLM server (use the command at the top of this section; the --served-model-name flag ensures BFCL can find the model by its registered slug).

Step 4 — Generate responses and evaluate

bfcl generate --model gemma-4-26b-a4b-it-NVFP4 --test-category all
bfcl evaluate --model gemma-4-26b-a4b-it-NVFP4 --test-category all

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Нельзя запустить

Готовая квантизация поддерживается только для текстовых LLM (vLLM).

Класс архитектуры
Gemma4ForConditionalGeneration
Ревизия весов
5557756

0 моделей