/ Модель

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

Размер весов
8,7 ГБ
Лицензия
Apache 2.0
Архитектура
gemma4_unified · dense
Базовая модель
gemma-4-12B-it-qat-q4_0-unquantized
Опубликована
20 окт 2026

gemma-4-12B-it-qat-mlx

Изображение и текст → текст7 профессий
241скачиваний за 30 дней0лайковвеса обновлены13 ноя 2026

Описание модели

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

Квантованная мультимодальная Gemma 4 12B в формате MLX для локального диалога, анализа изображений и работы с аудио на компьютерах Apple.

Это мультимодальная инструкционная модель Gemma 4 12B от Google, представленная bambocher в формате MLX для компьютеров Apple. Она предназначена для диалога и ответов на запросы с текстом или изображениями; также README сообщает о поддержке аудио и приводит пример распознавания речи. Архитектура — плотная Gemma4UnifiedForConditionalGeneration, а в репозитории используются веса safetensors. Текстовые веса в основном квантованы до 4 бит на сетке q4_0, соответствующей QAT-обучению Google; 44 наиболее чувствительных линейных слоя хранятся в 8 бит, эмбеддинги — в 6 бит. Размер модели в README указан как 7,89 ГБ.

Модель подходит для локального чат-ассистента, анализа изображений и мультимодальных запросов. Автор сообщает о проверках диалоговых ответов, распознавания животного на фото и речи, а также приводит измерения качества и скорости на MacBook Air M5. По сравнению с исходными весами QAT точность top-1 совпадает в 93,44% случаев в описанном тесте Wikitext-2; скорость декодирования в указанном тесте составляет 14,8 токена в секунду. Лицензия — Apache-2.0.

Это конверсия и квантованная MLX-сборка базовой модели google/gemma-4-12B-it-qat-q4_0-unquantized. README отмечает, что распознавание речи проверялось на конкретном примере и при запросе транскрибировать известную фразу модель склонна обсуждать её вместо дословной транскрипции. Поэтому результат для аудио может зависеть от формулировки запроса; опубликованные показатели качества и скорости относятся к указанным автором условиям тестирования.

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

  • диалог с локальным ассистентом на Mac
  • ответы на вопросы по изображению
  • описание объектов и сцен на фотографии
  • распознавание речи из аудиозаписи
  • генерация ответов на текстовые запросы

Ограничения

В README показано распознавание речи на одном примере; при запросе транскрибировать известную фразу модель может обсуждать её вместо дословной транскрипции. Приведённые метрики качества и скорости относятся к описанным автором тестам и оборудованию.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

Gemma 4 12B — Google's QAT on its exact q4_0 grid, MLX (text + vision + audio + MTP)

Google trained Gemma 4 12B with quantization-aware training (QAT) for llama.cpp's q4_0. This is that model in MLX, on the very grid the QAT trained for. The text decoder's 4-bit codes are the very ones in Google's own q4_0 GGUF, block for block; only their scales are rounded from fp16 to bf16 (MLX's scale type). On top of that, the 44 Linears that lose the most at 4-bit are kept at 8-bit, which costs 200 MB. Images and audio are included.

The 12B has no vision or audio encoder: images go in as raw 48×48 pixel patches and audio as raw waveform frames, each through one small projection into the text model.

How it's made

  • The QAT grid, exactly. Google's GGUF is q4_0 of the -qat-q4_0-unquantized master weights: every block's scale and every code matches. MLX's affine 4-bit with group 32 stores scale·q + bias; with scale = d and bias = -8d that is q4_0's grid itself. 284 Linears are written this way, and each is checked against the GGUF at conversion. The one difference is that the fp16 scale is rounded to bf16, MLX's scale dtype: under 1/64 of a step per weight.

  • Why not the usual conversions:

    • mlx_lm.convert -q refits every group's min/max;
    • mlx-community's qat builds use group 64, which spans two q4_0 blocks, and keep every MLP at 8-bit.

    Both move the weights off the grid the QAT trained for.

  • A few Linears at 8-bit, chosen by measurement. Each of the text Linears was raised to 8-bit on its own and scored by the KL divergence it removes, against the bf16 QAT master weights, per MB it adds. The best 44 fit in +200 MB. Almost all attention projections (17 V, 15 K, 10 O, 1 Q); one MLP Linear.

  • Everything else follows Google's own split:

    • embeddings at 6-bit, as the GGUF's Q6_K;
    • the image patch projection and the image and audio projections into the text model, which were never QAT-trained, at 8-bit;
    • norms as they are.

Measured

Wikitext-2 (test), 128 windows of 512 tokens, scored as the model's chat reply (the chat template, the thinking channel closed). KL divergence and top-1 agreement are measured to the bf16 QAT master weights, the model this one reproduces.

modelsizePPLKL to QAT mastertop-1 agree
QAT master weights, bf16 (google/gemma-4-12B-it-qat-q4_0-unquantized)—22.26——
this model7.89 GB22.770.025393.44%
mlx-community/gemma-4-12B-it-qat-4bit10.99 GB22.820.025993.35%
mlx-community/gemma-4-12B-it-4bit (no QAT)6.74 GB26.700.34078.78%

How to read it:

  • KL and top-1 measure faithfulness; a lower KL is closer.
  • Why as a chat reply: on raw text this checkpoint, Google's own master and q4_0 GGUF included, scores in the thousands -- it reads text outside a chat turn as its own reasoning. Framed as its reply, it's the model it is.
  • PPL compares this build with its master, not with other models: instruct models' confidence differs by size.

Speed (MacBook Air M5, mlx-lm, decode)

buildtokens/speak memory
this model14.88.1 GB
mlx-community/gemma-4-12B-it-qat-4bit9.811.2 GB

About 1.5× faster (a fanless Mac throttles; a second pair measured 9.2 vs 6.4): mlx-community's build keeps every MLP at 8-bit. 3 GB smaller, it fits a 16 GB Mac with room for context.

Checked

  • It answers in chat.
  • It names the animal in a photo: "There is a red fox in this picture."
  • It hears speech: given a spoken "The quick brown fox jumps over the lazy dog", it recognizes the pangram (asked to transcribe a well-known sentence, it tends to discuss it instead).
  • No large weight is left unquantized.

Method / code

rromenskyi/quant-ternary/gemma4-quant has the code and the full lab notes (docs/FINDINGS.md, "Gemma 4 QAT in MLX on the q4_0 grid"):

  • qat_mlx_pipeline.sh: one pipeline for every Gemma 4 size;
  • qat_aligned_convert.py;
  • qat_sensitivity.py;
  • qat_eval.py.

License

Licensed under the Apache License 2.0, the same license as the base model — see LICENSE.

Modified from google/gemma-4-12B-it-qat-q4_0-unquantized (the QAT release of google/gemma-4-12B-it): quantized to MLX. The text decoder's Linears are on Google's q4_0 grid; 44 of them, the embeddings and the image/audio projections are at 6/8-bit. The weights and configuration files in this repo are therefore modified versions of the original, not the original files.

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

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

GPU в ailist

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

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

MLX-модели работают только на Apple Silicon.

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

0 моделей