/ Модель

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

Размер весов
8,9 ГБ
Лицензия
Gemma
Архитектура
gemma4_unified · dense
Базовая модель
gemma-4-12B-it
Библиотека
mlx
Опубликована
5 июн 2026

gemma-4-12B-it-OptiQ-4bit

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

mlx-community/gemma-4-12B-it-OptiQ-4bit — это локальная MLX-квантизованная версия Gemma-4-12B-it, разработанная сообществом mlx-community с использованием инструментария mlx-optiq.

3 414скачиваний за 30 дней55лайковвеса обновлены20 июл 2026

Бенчмарки

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

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

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

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

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

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

Модель предназначена для генерации текста, рассуждений, программирования, извлечения и классификации, следования инструкциям, вызова инструментов и агентских сценариев на компьютерах Apple Silicon без PyTorch и облачных сервисов.

Это текстовый путь унифицированной модели Gemma-4, исходно поддерживающей текст, изображения и аудио: при конвертации визуальная и аудиобашни были удалены, поэтому данная версия работает только с текстом. Языковая башня использует смешанную квантизацию: чувствительные слои представлены в 8-битном формате, остальные — в 4-битном. Всего квантизовано 328 слоёв, средняя точность составляет 5,22 бита на вес, размер группы — 64, размер файла — около 8,3 ГБ. Модель поддерживает режим рассуждений с отдельным thinking channel; для прямых ответов его можно отключить.

Согласно приведённым тестам, OptiQ-версия превосходит равномерную 4-битную квантизацию по пяти из шести метрик, особенно в задачах длинноконтекстного извлечения и программирования; в тесте BFCL разница находится в пределах указанного доверительного интервала. Для работы требуются mlx-lm из основной ветки и импорт optiq, регистрирующий тип модели gemma4_unified, поэтому стандартного выпуска mlx-lm 0.31.3 недостаточно. Модель распространяется на условиях Gemma license, унаследованных от базовой модели Google; применяются условия использования Google Gemma.

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

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

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

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

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

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

Открыть на Hugging Face

mlx-community/gemma-4-12B-it-OptiQ-4bit

Built with mlx-optiq, the MLX-native toolkit to quantize, fine-tune, and serve LLMs locally on Apple Silicon, no PyTorch and no cloud. Try the Lab · All OptiQ quants · Docs

A 4-bit mixed-precision MLX quant produced by mlx-optiq, the sensitivity-aware quantization toolkit for Apple Silicon. Scores +6.40 over stock uniform 4-bit on the six-metric Capability Score, the second-largest mixed-precision gain in the Gemma-4 lineup.

A 4-bit mixed-precision MLX quant of google/gemma-4-12B-it, the unified (text+vision+audio) Gemma-4. This artifact is the text-inference path: the language tower is quantized and the vision/audio towers are dropped during conversion. Per-layer bit-widths come from a KL-divergence sensitivity pass on a six-domain calibration mix (prose, reasoning, code, agent, tool-call, constraint-bearing instructions). Sensitive layers go to 8-bit; robust ones stay at 4-bit.

Quantization details

PropertyValue
Predominant precision4-bit
Layers at 8-bit (sensitive)156
Layers at 4-bit (robust)172
Total quantized layers328
Average bits per weight5.22
Group size64
Calibration mixsix-domain mix (40 samples × 6 domains)
Reference for sensitivityuniform-4-bit (bf16 base too large to fit in RAM; auto-resolved)

We follow the same naming convention llama.cpp uses for Q4_K_M and similar mixed-precision quants: the "4-bit" label is for the predominant precision, not the weighted average. The mixed allocation is what lets this build beat stock uniform 4-bit on the Capability Score at a comparable disk size.

Usage

This is the unified Gemma-4 12B (model_type: gemma4_unified), so it needs mlx-lm from main and import optiq to register the model type. The unified text tower is not in the 0.31.3 PyPI release of mlx-lm, and the main build also reports version 0.31.3, so install from git rather than pinning a version:

pip install -U mlx-optiq "mlx-lm @ git+https://github.com/ml-explore/mlx-lm.git"
import optiq  # registers the gemma4_unified model type
from mlx_lm import load, generate

model, tokenizer = load("mlx-community/gemma-4-12B-it-OptiQ-4bit")
response = generate(
    model, tokenizer,
    prompt="Explain quantum computing in simple terms.",
    max_tokens=200,
)

Gemma-4-12B is a reasoning model with a thinking channel. For direct (non-thinking) answers on tasks like extraction or classification, pass chat_template_kwargs={"enable_thinking": False} when applying the chat template.

For more (mixed-precision KV-cache serving, sensitivity-aware LoRA fine-tuning, OpenAI + Anthropic-compatible inference server, hot-swap mounted adapters, sandboxed Python execution for agent workflows), install mlx-optiq:

pip install mlx-optiq

See the Gemma-4 family guide on mlx-optiq.com for sampling defaults, training recipes, and family-specific caveats.

Benchmarks

Six-metric Capability Score (mean of MMLU + GSM8K + IFEval + BFCL + HumanEval + HashHop). Apples-to-apples comparison against stock uniform 4-bit, both at the full sample counts:

MetricOptiQUniform 4-bitΔ
MMLU (5-shot, 1000 samples)42.6%34.4%+8.3
GSM8K (1000 samples, 3-shot CoT)93.4%90.1%+3.3
IFEval (full set, strict)73.9%71.2%+2.8
BFCL-V3 simple (200 calls)71.0%71.5%−0.5
HumanEval (164 problems, pass@1)88.4%76.8%+11.6
HashHop (long-context retrieval)40.0%27.0%+13.0
Capability Score (mean of 6)68.2361.83+6.40
KL vs uniform-4-bit reference (mean / p95)1.52 / 4.85,,
On-disk size8.3 GB6.3 GB+2.0

Every metric gets one equal vote. Disk size is reported next to the score as an honest second axis instead of being folded into the score. BFCL-V3 is within its ±6.3pp confidence interval (a tie); the other five benchmarks all improve, with the largest gains on long-context retrieval and code. MMLU is scored cloze-style (answer-letter log-likelihood), which underscores reasoning models that prefer to think before answering; the strong GSM8K and HumanEval results are the better quality signal. See the eval-framework writeup for the full methodology.

Links

Quantize your own

This quant was produced by mlx-optiq. Point it at any Hugging Face model to get the same sensitivity-aware mixed precision:

pip install mlx-optiq
optiq convert <hf-model-id> --target-bpw 5.0 --candidate-bits 4,8
optiq lab   # full local workbench: chat, compare, quantize, fine-tune

License

Gemma license (inherits from base model). See https://ai.google.dev/gemma/terms for the terms of use.

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

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

GPU в ailist

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

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

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

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

0 моделей