
Google DeepMind 开源多模态模型,11.95B参数支持文本+图像+音频,256K上下文,原生函数调用,Apache 2.0免费商用
Google Gemma 4 12B — 开源多模态大模型
Google DeepMind 发布的 Gemma 4 12B 是 Gemma 4 家族中的「统一架构」版本,最大亮点是**无编码器(encoder-free)**设计:直接将图像和音频投射进 LLM 的嵌入空间,不需要单独的视觉/音频编码器,部署体积更小、推理延迟更低。
核心特性
- 多模态原生支持:文本 + 图像 + 音频输入,文本输出(12B 独有音频能力)
- 256K 超长上下文:混合注意力机制(滑动窗口 + 全局注意力)
- Thinking 模式:内置推理链,可配置开关
- 函数调用:原生支持结构化 tool use,适合 Agent 工作流
- 140+ 语言:预训练覆盖 140 种语言,开箱支持 35+ 语言
- Apache 2.0 开源:完全免费商用
性能基准(Instruction-Tuned)
| 基准 | 得分 |
|---|---|
| MMLU Pro | 77.2% |
| AIME 2026(无工具) | 77.5% |
| LiveCodeBench v6 | 72.0% |
| GPQA Diamond | 78.8% |
| MMMU Pro(视觉) | 69.1% |
| MATH-Vision | 79.7% |
| Codeforces ELO | 1659 |
作为对比,上一代 Gemma 3 27B 在 MMLU Pro 仅 67.6%、AIME 仅 20.8%——12B 参数量做到了全面超越。
官方版本一览
Dense 模型
| 模型 | 参数量 | 模态 | 上下文 | 下载量 |
|---|---|---|---|---|
google/gemma-4-12B | 11.95B | 文本+图像+音频 | 256K | ~10万 |
google/gemma-4-12B-it | 11.95B | 文本+图像+音频 | 256K | 43.5万 |
QAT 量化版(官方出品)
| 模型 | 说明 | 下载量 |
|---|---|---|
google/gemma-4-12B-it-qat-q4_0-gguf | Q4_0 GGUF 量化 | ~2.5万 |
google/gemma-4-12B-it-qat-w4a16-ct | W4A16 Cortex 量化 | ~7.7万 |
google/gemma-4-12B-it-qat-q4_0-unquantized | QAT 基础版(可再量化) | ~3,267 |
google/gemma-4-12B-it-assistant | Assistant 微调版 | ~1.5万 |
社区热门量化版
| 模型 | 格式 | 下载量 |
|---|---|---|
unsloth/gemma-4-12b-it-GGUF | GGUF 多量化 | 56.8万 |
lmstudio-community/gemma-4-12B-it-GGUF | LM Studio GGUF | ~27.2万 |
ggml-org/gemma-4-12B-it-GGUF | GGUF 官方 | ~14.5万 |
unsloth/gemma-4-12B-it-qat-GGUF | QAT GGUF | ~8.6万 |
bartowski/gemma-4-12B-it-GGUF | GGUF 多量化 | ~5.6万 |
mlx-community/gemma-4-12B-it-8bit | MLX Apple Silicon | ~2.9万 |
cyankiwi/gemma-4-12B-it-AWQ-INT4 | AWQ INT4 | ~9万 |
快速上手
pip install -U transformers torch accelerate
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "google/gemma-4-12B-it"
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL_ID, dtype="auto", device_map="auto"
)
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "用中文解释量子纠缠"},
]
inputs = processor.apply_chat_template(
messages, tokenize=True, return_dict=True,
return_tensors="pt", add_generation_prompt=True,
enable_thinking=False
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False)
print(processor.parse_response(response))
推荐场景
- 本地部署多模态推理:12B 参数量适合消费级 GPU(24GB VRAM 可跑 BF16,量化后 8-12GB 即可)
- Agent / 工具调用:原生函数调用支持,适合构建自主工作流
- 长文档处理:256K 上下文窗口,处理超长文档无压力
- 语音识别 + 翻译:12B 独有的原生音频能力(ASR + 语音翻译)
- 视觉理解:OCR、图表分析、文档解析、UI 理解
链接
暂无评论
