/ Модель

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

Размер весов
62,5 ГБ
Лицензия
Gemma
Архитектура
gemma4 · dense
Базовая модель
gemma-4-31B-it
Опубликована
3 апр 2026

gemma4-prometheus-merged

Генерация текстаТекст → текст3 профессии

Слитая с Prometheus steering-векторами модель Gemma 4 31B IT для диалоговой генерации текста и мультимодального инференса.

60скачиваний за 30 дней1лайквеса обновлены22 авг 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

groxaxo/gemma4-prometheus-merged — слитый чекпойнт, опубликованный groxaxo на основе инструкционной мультимодальной модели Google Gemma 4 31B IT. Веса BF16 в формате Safetensors содержат результат одного эксперимента Prometheus adversarial steering по шести поведенческим направлениям: лучшие steering-векторы объединены с базовыми весами, поэтому отдельный runtime Prometheus не требуется. Архитектура включает 60 трансформерных слоёв с чередованием локального и глобального внимания; в метаданных указан класс Gemma4ForConditionalGeneration.

Модель предназначена для диалоговой генерации текста и мультимодального взаимодействия, включая сценарии с изображениями, а также для открытой оценки, воспроизводимых экспериментов и локального или размещённого инференса в совместимых средах Hugging Face. Карточка указывает базовую модель image-text-to-text; при этом авторские метаданные классифицируют задачу как text-generation. В README описан тест связности ответов на пяти вопросах и приведены ориентиры контекста, зависящие от режима внимания, кэша и оборудования.

Чекпойнт занимает около 58 ГиБ в BF16; для запуска в этом формате автор рекомендует не менее 65 ГиБ VRAM. Доступна лицензия Gemma; перед распространением и развёртыванием следует учитывать условия лицензии исходной модели. Ответы могут быть неточными, результаты теста ограничены небольшим набором примеров, а карточка не подтверждает качество по широким бенчмаркам. Русский язык отдельно не заявлен.

Сценарии применения

  • генерация ответов в диалоговом ассистенте
  • экспериментальная оценка adversarial steering для поведения модели
  • локальный инференс Gemma 4 в совместимом Transformers-окружении
  • ответы на вопросы по текстовым запросам
  • эксперименты с анализом изображений в мультимодальном режиме

Ограничения

Требует значительных вычислительных ресурсов: BF16-версия занимает около 58 ГиБ и для указанного режима требует не менее 65 ГиБ VRAM; полезный контекст зависит от внимания, кэша и доступных оптимизаций. Приведённая проверка связности охватывает лишь пять вопросов, ответы могут быть неточными, а поддержка русского языка отдельно не описана.

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

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

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

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

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

Открыть на Hugging Face

gemma4-prometheus-merged

Overview

gemma4-prometheus-merged is a model checkpoint packaged for compatible Hugging Face runtimes, published by groxaxo. It is intended for open-source evaluation, reproducible experimentation, and compatible local or hosted inference workflows. The wording below is deliberately limited to what can be verified from this repository's metadata and artifacts.

At a glance

FieldDetails
FormatTransformers
Source / basegoogle/gemma-4-31B-it
Intended taskimage-text-to-text
Licensegemma

What is included

  • *.safetensors (2 files)
  • config.json
  • generation_config.json
  • tokenizer.json
  • tokenizer_config.json
  • chat_template.jinja
  • Additional configuration, tokenizer, processor, or shard files (10 visible artifacts total)

Quick start

Getting started

Start with the upstream library named in the repository metadata and keep all configuration, tokenizer, processor, and weight files together. This repository is an artifact release, so the source project remains the authoritative reference for task-specific loading code.

Compatibility and responsible use

  • Use a runtime that explicitly supports this format, architecture, and modality.
  • Keep configuration, tokenizer, processor, projection, and weight files from the same revision together.
  • Review the source model card and license before redistribution or deployment.
  • Hardware needs depend on parameter count, context length, cache precision, quantization, and concurrency.
  • Report reproducible issues with the runtime version, hardware, launch command, and a minimal example.

Generated outputs may be inaccurate or unsuitable for a given use case. Users are responsible for testing behavior, applying appropriate safeguards, and complying with applicable licenses and laws.

Prometheus-steered merged model — google/gemma-4-31B-it with Prometheus adversarial-steering baked in and all adapter weights merged into the base model.

Related repositories

RepoDescription
groxaxo/gemma4-prometheus-gptq-4bitGPTQ-4bit quantized version of this model
groxaxo/gemma4-prometheus-workflowReproducible scripts, config, and checkpoint journal
groxaxo/gemma4-prometheus-fixesAll local patches applied to make this work
google/gemma-4-31B-itOriginal base model

What is this?

  1. Downloaded google/gemma-4-31B-it (31 B parameters, BF16).
  2. Ran Prometheus adversarial-steering optimization over 1 trial with 6 behaviors.
  3. Merged the best steering vectors back into the base model weights.
  4. Saved as a standalone, loadable model (no Prometheus runtime needed).

Size: ~58 GiB (two BF16 shards).


How to run

Minimum requirements

  • 3 × RTX 3090 (24 GB each) or any combination totalling ≥ 65 GiB VRAM
  • On 2 GPUs (≤ 48 GiB): load with BnB 8-bit (see below)

BF16 on 3 GPUs

from transformers import AutoModelForImageTextToText, AutoTokenizer
import torch

model_id = "groxaxo/gemma4-prometheus-merged"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model.eval()

messages = [{"role": "user", "content": "Explain gradient descent."}]
text = tokenizer.apply_chat_template(
    messages, tokenize=False,
    add_generation_prompt=True,
    enable_thinking=False,
)
ids = tokenizer(text, return_tensors="pt").input_ids.to(model.device)
with torch.no_grad():
    out = model.generate(ids, max_new_tokens=512, do_sample=False,
                         pad_token_id=tokenizer.eos_token_id)
print(tokenizer.decode(out[0, ids.shape[1]:], skip_special_tokens=True))

BnB 8-bit on 2 GPUs (48 GiB)

from transformers import AutoModelForImageTextToText, AutoTokenizer, BitsAndBytesConfig
import torch

model_id = "groxaxo/gemma4-prometheus-merged"

bnb_cfg = BitsAndBytesConfig(load_in_8bit=True)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    quantization_config=bnb_cfg,
    device_map="auto",
    max_memory={0: "23GiB", 1: "23GiB"},
)
model.eval()

Important: disable thinking tokens

Always pass enable_thinking=False to apply_chat_template — otherwise the model may emit <start_of_turn>think tokens and spend tokens on chain-of-thought.


Evaluation results

All tests run on 2 × RTX 3090 (24 GB each) in pipeline-parallel mode (device_map="auto" via 🤗 Accelerate). True tensor-parallelism (TP=2) requires vLLM, which does not yet support the gemma4 architecture natively.

Coherence test (GPTQ-4bit model — same backbone)

5 diverse ML questions answered. 5/5 passed (≥ 15 words, on-topic).

PromptResponse excerptOK
Explain how neural networks learn from data."…a neural network learns by trial and error. It makes a guess, finds out how wrong…"✅
What is the difference between supervised and unsupervised learning?"…In supervised learning, the data is 'labeled'…In unsupervised learning, the data is 'unlabeled'…"✅
Describe the concept of gradient descent in machine learning."…Gradient Descent is an optimization algorithm used to minimize a function…"✅
What are transformers in NLP?"…a Transformer is a deep learning architecture…focusing on the most important parts…"✅
Explain quantization for neural network models."…quantization is the process of reducing the precision of the numbers…"✅

Context length

KV CacheMax TokensBottleneckNotes
FP166 144Attention compute O(n²)Without flash-attn, attention matrix = 32 heads × n² × 2 B
FP8 (software)6 144Same — attention computeFP8 saves KV storage, not the attention matrix
FP16 + flash-attn (estimated)~113 000KV cacheRecommended: pip install flash-attn --no-build-isolation
FP8 + flash-attn (estimated)~226 000KV cacheCapped by max_position_embeddings = 262 144

Action: Installing flash-attn would increase usable context ~18×.

Perplexity (WikiText-2, sliding window stride=512, 4096 tokens)

ModelPerplexityNotes
Merged (BnB-8bit reference)1782.3Chat model tested on raw text — high PPL is expected
GPTQ-4bit1815.8+1.9% vs merged reference

Chat-tuned models have high raw-text perplexity. The ΔPPL between variants is the meaningful signal: +1.9% degradation from 4-bit quantization.

KL divergence (GPTQ-4bit vs merged reference)

MetricValue
DirectionKL(merged_bnb8 ‖ gptq_4bit)
Mean KL4.77 nats
Std KL3.65 nats
Prompts8 ML-domain questions
Top-k tokens1000

Mean KL of ~4.77 nats reflects expected 4-bit quantization error relative to an 8-bit reference. Note: part of this KL is attributable to bnb-8bit noise in the reference; true KL vs FP16 merged would be somewhat lower.


Architecture notes

  • 60 transformer layers alternating:
    • Sliding-window attention (window=1024, 16 KV heads, head_dim=256)
    • Full (global) attention (4 KV heads, head_dim=512)
  • GQA with 32 query heads, 16/4 KV heads
  • VLM wrapper (model.language_model) — vision tower present but text-only inference works

Patches applied

All source patches are documented at groxaxo/gemma4-prometheus-fixes.

Key fixes:

  1. Prometheus PEFT adapter targeting — resolved exact module paths via named_modules() traversal to prevent over-matching vision layers.
  2. Prometheus steering FP16 — defaulted steering vector compute dtype to FP16 (not FP32) to prevent VRAM OOM on quantized layers.
  3. gptqmodel Gemma4 support — added Gemma4QModel definition with layer_modules_strict=False.
  4. gptqmodel rotary embedding — per-layer position_embeddings regeneration with correct layer_type (sliding vs global).

Citation / acknowledgements

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

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

0 моделей