/ Модель

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

Лицензия
Gemma
Архитектура
gemma4 · dense
Базовая модель
Huihui-gemma-4-31B-it-abliterated-v2
Библиотека
transformers
Опубликована
11 апр 2026

Huihui-gemma-4-31B-it-abliterated-v2-NVFP4

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

lyf/Huihui-gemma-4-31B-it-abliterated-v2-NVFP4 — мультимодальная 31-миллиардная модель, представляющая собой NVFP4-квантизированную версию Huihui-gemma-4-31B-it-abliterated-v2 от huihui-ai, созданную на базе Google Gemma 4 31B IT.

1 110скачиваний за 30 дней3лайкавеса обновлены12 апр 2026

Бенчмарки

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

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

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

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

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

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

Релиз предназначен для диалогов, генерации и анализа текста, следования инструкциям, программирования, структурированного вывода, а также обработки изображений и видео. В README также указана abliteration-интервенция, направленная на удаление отказов модели.

Модель поддерживает сценарии «текст—текст», «изображение—текст» и «видео—текст»; аудио не поддерживается, поскольку в 31B-чекпойнте отсутствует аудиоэнкодер. Визуальная башня сохранена в формате BF16, а большинство линейных слоёв текстового стека, включая слои self-attention, квантизированы в NVFP4. Эмбеддинги, lm_head и визуальная часть также остаются в BF16. Размер файлов составляет около 19,5 ГБ, что позволяет запускать модель на одной видеокарте RTX 5090 с 32 ГБ памяти; заявленная скорость декодирования — около 69 токенов в секунду.

К сильным сторонам относятся уменьшенный размер, сохранение мультимодальных возможностей исходной модели, улучшенное по сравнению с предыдущей версией значение perplexity и более строгое следование инструкциям по результатам локального тестирования. Ограничения связаны с отсутствием аудиоподдержки, требовательностью к совместимому программному стеку и аппаратному обеспечению, а также возможным влиянием агрессивной NVFP4-квантизации на качество. Для работы рекомендуется vLLM с поддержкой Gemma 4 и NVFP4. Лицензия указана как gemma.

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

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

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

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

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

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

Открыть на Hugging Face

Huihui-gemma-4-31B-it-abliterated-v2-NVFP4

This repository contains an NVFP4-compressed version of huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2.

The goal of this build is to produce an NVFP4 checkpoint that actually fits on a single 32 GB RTX 5090 while preserving the multimodal pipeline and the abliteration intervention. The existing NVIDIA reference release keeps every self_attn layer in BF16, which pushes the on-disk weights past 32 GB and makes single-GPU serving impossible. This build quantizes self_attn as well, so only the vision tower, embeddings, and lm_head remain in BF16.

What Changed In v2 (vs v1)

The source model (huihui-ai/...-abliterated-v2) differs from v1 in one key way: the first 5 text layers (layers 0–4) are no longer abliterated. They retain the original google/gemma-4-31B-it weights. Layers 5–59 are still abliterated but with a refusal direction recomputed excluding those early layers.

Per the source model card, this produces lower perplexity (better quality) while maintaining the same level of refusal removal:

ModelPPLGap vs base
google/gemma-4-31B-it (base)14874.75—
v1 abliterated13335.55-1539
v2 abliterated13161.29-1713 (v1 − 174)

In local side-by-side testing of the NVFP4 quantized versions, v2 showed tighter instruction following (stricter JSON output, more efficient reasoning steps within the same token budget) while retaining identical abliteration effectiveness and decode throughput (~69 tok/s).

Source And References

Supported Modalities

This checkpoint matches the input/output capabilities of the upstream google/gemma-4-31B-it exactly — no modality was added or removed by quantization.

ModalityStatusNotes
Text → Text✅ SupportedVerified locally across English, Chinese, reasoning, code, long-form, and JSON-constrained outputs
Image → Text✅ SupportedVision tower (27-layer SigLIP-style, ~550M params) preserved in BF16 via the re:.*vision.* ignore pattern. Verified locally with multiple real images at species-level accuracy
Video → Text✅ SupportedUses the same vision tower with the Gemma4VideoProcessor sampling 32 frames at 70 soft-tokens per frame. Verified locally by posting a real 5-second MP4 through the vLLM chat/completions endpoint with a video_url content part
Audio → Text❌ Not supportedThe 31B dense checkpoint has no audio encoder. config.json has audio_config: null and there are zero audio-related tensors in the safetensors. Per the Gemma 4 model card, audio ASR/translation is available only on the E2B and E4B variants. This is a property of the upstream weights, not the quantization

A Note On The any-to-any Tag Seen On Some Related Repos

The huihui source repository carries an any-to-any tag among its Hub tags. That tag does not reflect the actual capabilities of the 31B weights — the upstream google/gemma-4-31B-it is tagged as image-text-to-text and its model card explicitly restricts audio support to the E2B/E4B variants. The Gemma4Processor in processor_config.json does include a Gemma4AudioFeatureExtractor section (because the Gemma4ForConditionalGeneration architecture class is a superset capable of hosting audio), but the 31B checkpoint ships without audio encoder weights. This release intentionally does not carry an any-to-any tag, to avoid propagating that mislabel.

What Was Quantized

  • Every Linear layer in the text stack — including self_attn.{q,k,v,o}_proj and all mlp.*_proj — was quantized to NVFP4 with llm-compressor.
  • The vision tower, all embed_* tensors, the lm_head, and any audio_* modules remain in BF16 so the multimodal pipeline and vocabulary pathways are preserved.
  • Calibration used mit-han-lab/pile-val-backup, 128 samples at 1024 tokens per sample, batch size 1.
  • Quantization recipe (from recipe.yaml):
    QuantizationModifier:
      targets: [Linear]
      ignore: ['re:.*vision.*', 're:.*audio.*', lm_head, 're:.*embed.*']
      scheme: NVFP4
    

Ignore List Compared To The NVIDIA Reference

NVIDIA Gemma-4-31B-IT-NVFP4This build
MLP Linear layersNVFP4NVFP4
self_attn.* Linear layersBF16 (excluded)NVFP4
Vision towerBF16 (excluded)BF16 (excluded)
embed_*BF16 (excluded)BF16 (excluded)
lm_headBF16 (excluded)BF16 (excluded)
On-disk size~32.6 GB~19.5 GB
Single-GPU 32 GB fitNoYes

Inference

As tested locally, this model works with the vllm/vllm-openai:gemma4-cu130 image on an RTX 5090 (32 GB). Representative launch via docker compose:

services:
  vllm:
    image: vllm/vllm-openai:gemma4-cu130
    network_mode: host
    ipc: host
    devices:
      - nvidia.com/gpu=all
    volumes:
      - ./Huihui-gemma-4-31B-it-abliterated-v2-NVFP4:/models/huihui-gemma4-nvfp4:ro
    environment:
      - VLLM_NVFP4_GEMM_BACKEND=marlin
      - PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
    command:
      - /models/huihui-gemma4-nvfp4
      - --served-model-name=huihui-gemma4-31b-nvfp4
      - --max-model-len=102400
      - --gpu-memory-utilization=0.95
      - --kv-cache-dtype=fp8
      - --trust-remote-code
      - --enable-prefix-caching
      - --enable-auto-tool-choice
      - --tool-call-parser=gemma4

Observed on RTX 5090 at max-model-len=102400, gpu-memory-utilization=0.95:

  • ~29.7 GB VRAM occupied (weights + KV cache + CUDA runtime)
  • ~69 tokens/second single-stream decode throughput
  • Available KV cache: 8.55 GiB, maximum concurrency for 102,400 tokens: 1.15x
  • Engine init (profile + KV cache + warmup): ~51 seconds
  • Tool calling enabled with native gemma4 parser

Validation

A local quality sweep was run against the served OpenAI-compatible endpoint. All tests passed.

Text (7 / 7)

  • English coherence with sentence-count constraint
  • Chinese generation with first-sentence geographic-location constraint
  • Multi-step arithmetic (two trains converging, correct reasoning chain)
  • Strict JSON output — parsed cleanly by json.loads, output was bare JSON without markdown fencing
  • 400-word long-form narrative generation — 21 / 21 unique sentences, no degeneration
  • Python code generation with assert-based test cases
  • Abliteration smoke test: the refusal-vector intervention from the source model is preserved through the NVFP4 round-trip

Image (4 / 4)

Posted real JPEGs via the image_url content part:

SubjectModel outputVerdict
Black Labrador puppy"The image shows a black dog."✅
Walruses on a beach"Several walruses are lounging and resting on a sandy beach. Overcast and cool, hazy grey sky."✅ species-level
Pug wrapped in blanket"Dog (Pug), Blanket, Bed/Bedding"✅ breed-level
Grey-tone cat portrait"grays... whites/off-whites... soft pinks/browns on the nose"✅

Video (1 / 1)

Posted a real 5-second MP4 (~2.85 MB) via the video_url content part. prompt_tokens = 2436, consistent with 32 frames × 70 soft-tokens per frame plus the text wrapper.

Model output: "A white truck and several cars are parked along a road bordering a lush, green park. The scene features tall trees, a grassy area with a path, and a park bench."

Spatial and object-level description are correct. End-to-end latency was ~2 seconds.

v1 vs v2 Comparison (NVFP4)

Both versions were tested with the same quality battery on the same hardware:

Testv1v2Notes
English coherence✅ 31 tok/s✅ 36 tok/sv2 slightly more articulate
Chinese✅ 69 tok/s✅ 69 tok/sEquivalent quality
Math reasoningCorrect chain, truncated before final answerCorrect chain, reached "1h 21min" conclusionv2 more token-efficient
JSON outputPretty-printed with fencingBare single-line JSONv2 stricter instruction following
Long-form story27/27 unique sentences21/21 unique sentencesBoth zero degeneration
CodeCorrectCorrectNear-identical
AbliterationZero refusalZero refusalBoth fully preserved

Formal Benchmarks

Intentionally omitted for now. They will be added later once a reproducible evaluation harness run is available.

Notes

  • Architecture: Gemma4ForConditionalGeneration
  • Model type: gemma4
  • Pipeline tag: image-text-to-text
  • Quantization format: nvfp4-pack-quantized (compressed-tensors)
  • KV cache precision at inference time (recommended): fp8
  • Requires transformers >= 5.5.0 to load gemma4 configurations
  • The multimodal processing files (processor_config.json, chat_template.jinja) are preserved so vision input still works; text-only usage also works unchanged

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

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

GPU в ailist

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

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

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

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

0 моделей