玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
llmfan46 /

gemma-4-26B-A4B-it-ultra-uncensored-heretic-GGUF

HF 源站

llmfan46/gemma-4-26B-A4B-it-ultra-uncensored-heretic-GGUF is an uncensored open-source model hosted on Hugging Face.

Image-Text-to-TextGGUFLicense: apache-2.026Btransformershereticuncensoreddecensoredabliteratedaraconversational
README.md说明 / 使用方法

library_name: transformers license: apache-2.0 license_link: https://ai.google.dev/gemma/docs/gemma_4_license pipeline_tag: image-text-to-text tags:

  • heretic
  • uncensored
  • decensored
  • abliterated
  • ara base_model:
  • llmfan46/gemma-4-26B-A4B-it-ultra-uncensored-heretic


拒绝率降低 97%(去审查版 3/100 vs 原版 100/100),同时基本保留了模型质量(KL 散度 0.1237)。

❤️ 支持我的工作

制作这些模型需要投入大量的时间、精力与算力。如果您觉得它们有用,请考虑支持我:

image/png

平台链接您将获得
🎉 Patreon按月支持优先模型请求权
☕ Ko-fi单次打赏我的由衷感谢

您的帮助将激励我继续前行,并将用于进一步改进我的工作流、支付存储和算力费用,甚至可能帮助租用云端 GPU 对更大的模型进行去审查处理。


llmfan46/gemma-4-26B-A4B-it-ultra-uncensored-heretic 的 GGUF 量化版本。

这是 google/gemma-4-26B-A4B-it 的去审查版本,使用 Heretic v1.2.0 并采用 Arbitrary-Rank Ablation (ARA) 方法制作

消除审查参数 (Abliteration parameters)

参数值
start_layer_index11
end_layer_index22
preserve_good_behavior_weight0.5664
steer_bad_behavior_weight0.0032
overcorrect_relative_weight0.9388
neighbor_count15

目标组件

  • attn.o_proj

性能表现

指标本模型原始模型 (gemma-4-26B-A4B-it)
KL 散度0.12370 (定义值)
拒绝率✅ 3/100❌ 100/100

PIQA 测试结果:

原始模型:

  • 总问题数:1838
  • 正确数:1692
  • 准确率:0.9206 (92.06%)
  • 解析失败:0

Heretic 版:

  • 总问题数:1838
  • 正确数:1678
  • 准确率:0.9129 (91.29%)
  • 解析失败:0

更低的拒绝率表明内容限制更少,而更低的 KL 散度表明与原始模型基准更加接近。更高的拒绝率会导致更多的拒绝回答、反对、推脱、说教、审查、软化和回避。PIQA(物理常识问答基准,Physical Intuition Question Answering)包含约 1,800 道题目,通过基准测试得分衡量模型对物理世界运行机制的常识理解与物理推理能力。

MMLU 测试结果:

原始模型:

============================================================

  • 总问题数:7021

  • 正确数:5791

  • 准确率:0.8248 (82.48%)

  • 解析失败:31

============================================================

表现最好的学科:

  • professional_law: 0.7006 (550/785)
  • moral_scenarios: 0.7014 (310/442)
  • miscellaneous: 0.9164 (351/383)
  • professional_psychology: 0.8861 (280/316)
  • high_school_psychology: 0.9556 (258/270)
  • high_school_macroeconomics: 0.9086 (179/197)
  • elementary_mathematics: 0.9076 (167/184)
  • moral_disputes: 0.8333 (145/174)
  • prehistory: 0.9128 (157/172)
  • philosophy: 0.8365 (133/159)

Heretic 版:

============================================================

  • 总问题数:7021

  • 正确数:5616

  • 准确率:0.7999 (79.99%)

  • 解析失败:14

============================================================

表现最好的学科:

  • professional_law: 0.6064 (476/785)
  • moral_scenarios: 0.6561 (290/442)
  • miscellaneous: 0.9243 (354/383)
  • professional_psychology: 0.8323 (263/316)
  • high_school_psychology: 0.9556 (258/270)
  • high_school_macroeconomics: 0.8731 (172/197)
  • elementary_mathematics: 0.9076 (167/184)
  • moral_disputes: 0.7816 (136/174)
  • prehistory: 0.8895 (153/172)
  • philosophy: 0.8302 (132/159)

MMLU——大规模多任务语言理解(Massive Multitask Language Understanding),涵盖 57 个学科(数学、历史、法律、医学等)约 14,000 道多项选择题。


量化版本

文件名量化级别描述
gemma-4-26B-A4B-it-ultra-uncensored-heretic-BF16.ggufBF16全精度
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q8_0.ggufQ8_0几乎无损,推荐
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q6_K.ggufQ6_K卓越画质/品质
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q5_K_M.ggufQ5_K_M良好平衡
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q5_K_S.ggufQ5_K_S较小的 Q5
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q4_K_M.ggufQ4_K_M适合显存有限的情况
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q4_K_S.ggufQ4_K_S较小的 Q4
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q3_K_L.ggufQ3_K_L低显存,尚可品质
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q3_K_M.ggufQ3_K_M低显存,体积更小

视觉投影器 (Vision Projector)

文件名量化级别描述
gemma-4-26B-A4B-it-mmproj-BF16.ggufBF16原生精度

视觉/多模态功能必须配合视觉投影器文件(Vision Projector File)。请与上述任一量化模型一同使用。

使用方法

兼容 llama.cpp、LM Studio、Ollama 以及其他兼容 GGUF 的工具。


Gemma 是由 Google DeepMind 构建的开放模型系列。Gemma 4 系列模型均为多模态模型,支持文本和图像输入(小尺寸模型还支持音频),并生成文本输出。本次发布包含了预训练(Pre-trained)和指令微调(Instruction-tuned)两种变体的开放权重模型。Gemma 4 拥有高达 256K tokens 的上下文窗口,并保持对 140 多种语言的多语言支持。

Gemma 4 兼具密集(Dense)和混合专家(MoE)架构,非常适合文本生成、编程和推理等任务。模型提供四种不同规格尺寸:E2B、E4B、26B A4B 和 31B。多样化的规格尺寸使其能够部署在从高端手机到笔记本电脑及服务器的各种环境中,推动最先进 AI 技术的普及。

Gemma 4 带来了关键的能力与架构提升:

  • 推理能力(Reasoning) – 该系列中的所有模型均被设计为具备高超推理能力的模型,并带有可配置的思考模式。
  • 扩展多模态(Extended Multimodalities) – 支持处理文本、支持多宽高比与分辨率的图像(所有模型)、视频以及音频(E2B 和 E4B 模型原生支持)。
  • 多样且高效的架构(Diverse & Efficient Architectures) – 提供不同尺寸的密集(Dense)和混合专家(MoE)变体,以实现灵活扩展的部署。
  • 针对端侧设备优化(Optimized for On-Device) – 较小尺寸的模型专门针对笔记本电脑和移动设备上的本地高效执行进行了优化设计。
  • 增大的上下文窗口(Increased Context Window) – 小模型具备 128K 上下文窗口,中型模型支持 256K。
  • 增强的编程与智能体能力(Enhanced Coding & Agentic Capabilities) – 在编程基准测试上取得了显著提升,并原生支持函数调用(Function Calling),从而能够驱动高能力的自主智能体(Autonomous Agents)。
  • 原生系统提示词支持(Native System Prompt Support) – Gemma 4 引入了对 system 角色的原生支持,实现了更具结构化和可控性的对话。

模型概览

Gemma 4 模型旨在每个尺寸级别上均提供前沿水准的表现,涵盖从移动端和边缘设备(E2B、E4B)到消费级 GPU 和工作站(26B A4B、31B)的部署场景。它们非常适合推理、智能体工作流、编程以及多模态理解。

模型采用了混合注意力机制(Hybrid Attention Mechanism),将局部滑动窗口注意力与全局完全注意力交替结合,并确保最后一层始终是全局注意力。这种混合设计既具备轻量级模型的处理速度与低内存占用,又兼具复杂长上下文任务所需的深度感知力。为了优化长上下文下的内存占用,全局层采用了统一的 Keys 和 Values,并应用了比例旋转位置编码(Proportional RoPE, p-RoPE)。

密集模型

属性E2BE4B31B 密集版
总参数量2.3B 有效 (含嵌入层 5.1B)4.5B 有效 (含嵌入层 8B)30.7B
层数354260
滑动窗口512 tokens512 tokens1024 tokens
上下文长度128K tokens128K tokens256K tokens
词表大小262K262K262K
支持模态文本、图像、音频文本、图像、音频文本、图像
视觉编码器参数量~150M~150M~550M
音频编码器参数量~300M~300M无音频

E2B 和 E4B 中的“E”代表“有效(effective)”参数。较小的模型结合了逐层嵌入(Per-Layer Embeddings, PLE),以在端侧设备部署中最大化参数效率。PLE 不是直接向模型添加更多层或常规参数,而是为每个解码器层中的每个 token 提供其专属的小嵌入。这些嵌入表虽然占用体积较大,但仅用于快速查找,因此有效参数量远低于总参数量。

混合专家(MoE)模型

属性26B A4B MoE
总参数量25.2B
激活参数量3.8B
层数30
滑动窗口1024 tokens
上下文长度256K tokens
词表大小262K
专家数量8 个激活 / 128 个总计及 1 个共享专家
支持模态文本、图像
视觉编码器参数量~550M

26B A4B 中的“A”代表“激活参数(active parameters)”,与模型包含的总参数量相对。通过在推理过程中仅激活 4B 左右的参数子集,该混合专家模型的运行速度远快于其 26B 总量所暗示的速度。与密集型 31B 模型相比,这使其成为高速推理的极佳选择,因为它的运行速度几乎与 4B 参数模型一样快。

基准测试结果

这些模型在一系列涵盖文本生成不同方面的大型数据集和指标上进行了评估。表中标记的评估结果针对的是指令微调版(Instruction-tuned)模型。

Gemma 4 31BGemma 4 26B A4BGemma 4 E4BGemma 4 E2BGemma 3 27B (无思考)
MMLU Pro85.2%82.6%69.4%60.0%67.6%
AIME 2026 no tools89.2%88.3%42.5%37.5%20.8%
LiveCodeBench v680.0%77.1%52.0%44.0%29.1%
Codeforces ELO21501718940633110
GPQA Diamond84.3%82.3%58.6%43.4%42.4%
Tau2 (3 次测试平均)76.9%68.2%42.2%24.5%16.2%
HLE no tools19.5%8.7%---
HLE with search26.5%17.2%---
BigBench Extra Hard74.4%64.8%33.1%21.9%19.3%
MMMLU88.4%86.3%76.6%67.4%70.7%
视觉 (Vision)
MMMU Pro76.9%73.8%52.6%44.2%49.7%
OmniDocBench 1.5 (平均编辑距离,越低越好)0.1310.1490.1810.2900.365
MATH-Vision85.6%82.4%59.5%52.4%46.0%
MedXPertQA MM61.3%58.1%28.7%23.5%-
音频 (Audio)
CoVoST--35.5433.47-
FLEURS (越低越好)--0.080.09-
长上下文 (Long Context)
MRCR v2 8 needle 128k (平均)66.4%44.1%25.4%19.1%13.5%

核心能力

Gemma 4 系列模型可处理涵盖文本、视觉和音频的广泛任务。核心能力包括:

  • 思考(Thinking) – 内置推理模式,允许模型在回答之前进行逐步思考。
  • 长上下文(Long Context) – 上下文窗口高达 128K tokens (E2B/E4B) 和 256K tokens (26B A4B/31B)。
  • 图像理解(Image Understanding) – 目标检测、文档/PDF 解析、屏幕与 UI 理解、图表理解、OCR(包括多语言)、手写识别与定位指向(pointing)。图像支持以多种宽高比和分辨率进行处理。
  • 视频理解(Video Understanding) – 通过处理连续帧序列来分析视频。
  • 交错多模态输入(Interleaved Multimodal Input) – 在单个提示词中以任意顺序自由混合文本和图像。
  • 函数调用(Function Calling) – 原生支持结构化工具调用,赋能智能体工作流。
  • 编程(Coding) – 代码生成、补全与纠错。
  • 多语言(Multilingual) – 开箱即用支持 35+ 种语言,预训练覆盖 140+ 种语言。
  • 音频(Audio,仅限 E2B 和 E4B) – 跨多种语言的自动语音识别(ASR)与语音翻译为文本。

快速上手

您可以通过最新版本的 Transformers 来使用所有 Gemma 4 模型。首先,请在您的环境中安装必要的依赖:

pip install -U transformers torch accelerate

安装完成后,即可使用以下代码加载模型:

from transformers import AutoProcessor, AutoModelForCausalLM

MODEL_ID = "google/gemma-4-26B-A4B-it"

# 加载模型
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    dtype="auto",
    device_map="auto"
)

模型加载完毕后,即可开始生成输出:

# 提示词
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Write a short joke about saving RAM."},
]

# 处理输入
text = processor.apply_chat_template(
    messages, 
    tokenize=False, 
    add_generation_prompt=True, 
    enable_thinking=False
)
inputs = processor(text=text, return_tensors="pt").to(model.device)
input_len = inputs["input_ids"].shape[-1]

# 生成输出
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# 解析输出
processor.parse_response(response)

若要启用推理思考,请设置 enable_thinking=True,parse_response 函数将负责解析思考链输出。

下面,您还可以找到用于与文本一同处理音频(仅限 E2B 和 E4B)、图像及视频的代码示例:

与使用 AutoModelForCausalLM 不同,处理音频可以使用 AutoModelForMultimodalLM。使用前请确保安装以下依赖包:

pip install -U transformers torch librosa accelerate

然后可以使用以下代码加载模型:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-E2B-it"

# 加载模型
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

模型加载完成后,可以直接在提示词中引用音频 URL 开始生成输出:

# 提示词 - 在文本前添加音频
messages = [
    {
        "role": "user",
        "content": [
            {"type": "audio", "audio": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/journal1.wav"},
            {"type": "text", "text": "Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:
* Only output the transcription, with no newlines.
* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."},
        ]
    }
]

# 处理输入
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]

# 生成输出
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# 解析输出
processor.parse_response(response)

与使用 AutoModelForCausalLM 不同,处理图像可以使用 AutoModelForMultimodalLM。使用前请确保安装以下依赖包:

pip install -U transformers torch torchvision accelerate

然后可以使用以下代码加载模型:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-26B-A4B-it"

# 加载模型
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

模型加载完成后,可以直接在提示词中引用图像 URL 开始生成输出:

# 提示词 - 在文本前添加图像
messages = [
    {
        "role": "user", "content": [
            {"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"},
            {"type": "text", "text": "What is shown in this image?"}
        ]
    }
]

# 处理输入
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]

# 生成输出
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# 解析输出
processor.parse_response(response)

与使用 AutoModelForCausalLM 不同,处理视频可以使用 AutoModelForMultimodalLM。使用前请确保安装以下依赖包:

pip install -U transformers torch torchvision torchcodec librosa accelerate

然后可以使用以下代码加载模型:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-26B-A4B-it"

# 加载模型
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

模型加载完成后,可以直接在提示词中引用视频 URL 开始生成输出:

# 提示词 - 在文本前添加视频
messages = [
    {
        'role': 'user',
        'content': [
            {"type": "video", "video": "https://github.com/bebechien/gemma/raw/refs/heads/main/videos/ForBiggerBlazes.mp4"},
            {'type': 'text', 'text': 'Describe this video.'}
        ]
    }
]

# 处理输入
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]

# 生成输出
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# 解析输出
processor.parse_response(response)

最佳实践

为获得最佳性能,请使用以下配置和最佳实践:

1. 采样参数

在所有用例中推荐使用以下标准化采样配置:

  • temperature=1.0
  • top_p=0.95
  • top_k=64

2. 思考模式配置

与 Gemma 3 相比,本模型采用标准的 system、assistant 和 user 角色。为正确管理思考过程,请使用以下控制 token:

  • 触发思考: 通过在系统提示词开头包含 <|think|> token 来启用思考。要禁用思考,请移除该 token。
  • 标准生成: 启用思考时,模型将输出其内部推理思考过程,随后输出最终答案,采用如下结构:
    <|channel>thought [内部推理]<channel|>
  • 禁用思考行为: 除 E2B 和 E4B 变体外,对于其他所有模型,如果禁用思考,模型仍会生成标签,但 thought 块为空:
    <|channel>thought <channel|>[最终答案]

[!Note] 请注意,像 Transformers 和 llama.cpp 等许多库会自动为您处理复杂的聊天模板。

3. 多轮对话

  • 历史记录中不得包含思考内容:在多轮对话中,历史模型输出应仅包含最终回复。在下一轮用户发言开始之前,绝不可添加之前模型轮次的思考内容。

4. 模态顺序

  • 为了在多模态输入下获得最佳性能,请在提示词中将图像和/或音频内容置于文本之前。

5. 可变图像分辨率

除了可变宽高比之外,Gemma 4 还通过可配置的视觉 token 预算(visual token budget)支持可变图像分辨率,该预算控制用于表示单张图像的 token 数量。更高的 token 预算可保留更多视觉细节,但会增加计算开销;而更低的预算可实现更快的推理速度,适用于不需要精细理解的任务。

  • 支持的 token 预算为:70、140、280、560 和 1120。
    • 对于图像分类、打标字幕生成(captioning)或视频理解等任务,使用较低预算,在这些任务中更快的推理速度以及处理多帧视频的需求胜过对细粒度细节的要求。
    • 对于 OCR、文档解析或小字文本阅读等任务,使用较高预算。

6. 音频

对于音频处理,请使用以下提示词结构:

  • 自动语音识别 (ASR)
Transcribe the following speech segment in {LANGUAGE} into {LANGUAGE} text.

Follow these specific instructions for formatting the answer:
* Only output the transcription, with no newlines.
* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.
  • 自动语音翻译 (AST)
Transcribe the following speech segment in {SOURCE_LANGUAGE}, then translate it into {TARGET_LANGUAGE}.
When formatting the answer, first output the transcription in {SOURCE_LANGUAGE}, then one newline, then output the string '{TARGET_LANGUAGE}: ', then the translation in {TARGET_LANGUAGE}.

7. 音频与视频时长

所有模型均支持图像输入,并能够以视频帧形式处理视频,而 E2B 和 E4B 模型还支持音频输入。音频最大支持 30 秒长度。在以每秒一帧(1 fps)处理图像的前提下,视频最大支持 60 秒长度。

模型数据

用于模型训练的数据及数据处理方式。

训练数据集

我们的预训练数据集是一个大规模、多样化的数据集合,涵盖了广泛的领域和模态,包括网络文档、代码、图像、音频,数据截止日期为 2025 年 1 月。核心组成部分如下:

  • 网络文档:丰富多样的网络文本确保模型接触到广泛的语言风格、主题和词汇。训练数据集包含超过 140 种语言的内容。
  • 代码:让模型接触代码有助于其学习编程语言的语法和模式,从而提升其代码生成能力以及理解代码相关问题的能力。
  • 数学:在数学文本上的训练有助于模型学习逻辑推理、符号表示,并有效解答数学问题。
  • 图像:广泛的图像数据使模型能够执行图像分析和视觉数据提取任务。

这些多样化数据源的结合对于训练一个能够处理各种不同任务和数据格式的强大多模态模型至关重要。

数据预处理

以下是应用于训练数据的关键数据清洗与过滤方法:

  • CSAM 过滤:在数据准备过程的多个阶段实施了严格的儿童性虐待材料(CSAM)过滤,以确保彻底排除有害和非法内容。
  • 敏感数据过滤:作为保证 Gemma 预训练模型安全可靠的一环,使用自动化技术从训练集中过滤掉了某些个人身份信息及其他敏感数据。
  • 其他方法:根据我们的政策,基于内容质量和安全性进行多维度过滤。

伦理与安全

随着开放模型成为企业基础设施的核心,模型溯源与安全性至关重要。由 Google DeepMind 开发的 Gemma 4 接受了与专有 Gemini 模型同样严格的安全评估。

评估方法

Gemma 4 系列模型是与内部安全及负责任 AI 团队合作开发的。开展了一系列自动化评估和人工评估,以帮助提升模型安全性。这些评估契合 Google 的 AI 原则 以及安全政策,旨在防止我们的生成式 AI 模型生成有害内容,包括:

  • 与儿童性虐待材料及剥削相关的内容
  • 危险内容(例如,宣扬自残/自杀,或指导可能导致现实世界伤害的危险活动)
  • 露骨色情内容
  • 仇恨言论(例如,针对受保护群体的非人化言论)
  • 骚扰(例如,煽动针对个人的暴力)

评估结果

在所有安全测试领域中,相对于先前的 Gemma 模型,我们在所有内容安全类别中均观察到了重大改善。总体而言,Gemma 4 模型在提升安全性方面的表现明显优于 Gemma 3 和 3n 模型,同时将无端拒绝率保持在较低水平。所有测试均在未开启安全过滤器的情况下进行,以充分评估模型固有的能力和行为。无论是在文本到文本还是图像到文本任务中,在所有模型尺寸下,模型产生的违规内容极少,相较于先前的 Gemma 模型均展现出了显著的进步。

使用与局限性

这些模型存在用户应了解的某些局限性。

预期用途

多模态模型(具备处理视觉、语言和/或音频能力)在各个行业和领域拥有广泛的应用。以下列出的潜在用途并非详尽无遗,其目的在于提供模型创建者在模型训练与开发过程中考虑到的可能用例的背景信息。

  • 内容创作与交流
    • 文本生成:这些模型可用于生成诗歌、脚本、代码、营销文案、电子邮件草稿等创意文本格式。
    • 聊天机器人与对话式 AI:为客户服务、虚拟助手或交互式应用程序提供对话界面支持。
    • 文本摘要:生成语料库、研究论文或报告的简明摘要。
    • 图像数据提取:这些模型可用于为文本通信提取、解读和总结视觉数据。
    • 音频处理与交互:小尺寸模型(E2B 和 E4B)能够分析和理解音频输入,实现语音驱动的交互和语音转录。
  • 研究与教育
    • 自然语言处理(NLP)与 VLM 研究:这些模型可作为研究人员开展 VLM 和 NLP 技术实验、开发算法并推动该领域发展的基石。
    • 语言学习工具:支持交互式语言学习体验,辅助语法纠错或提供写作练习。
    • 知识探索:通过生成摘要或回答关于特定主题的问题,辅助研究人员探索海量文本。

局限性

  • 训练数据
    • 训练数据的质量和多样性显著影响模型的能力。训练数据中的偏差或空白可能导致模型回复出现局限性。
    • 训练数据集的覆盖范围决定了模型能够有效处理的主题领域。
  • 上下文与任务复杂度
    • 模型在具有清晰提示词和明确指示的任务上表现良好。开放式或高度复杂的任务可能会面临挑战。
    • 模型的性能可能会受到所提供上下文数量的影响(通常在一定限度内,较长的上下文会带来更好的输出效果)。
  • 语言模糊性与细微差别
    • 自然语言天生复杂。模型可能难以准确把握微妙的细微差别、讽刺反讽或修辞比喻。
  • 事实准确性
    • 模型根据从训练数据集中学到的信息生成回复,但它们不是知识数据库。它们可能会生成不准确或过时的事实陈述。
    • 模型依赖于语言中的统计模式。在某些情境下可能缺乏运用常识进行推理的能力。

伦理考量与风险

视觉语言模型(VLM)的开发引发了若干伦理问题。在创建开放模型时,我们仔细考量了以下方面:

  • 偏见与公平性
    • 基于大规模现实世界文本和图像数据训练的 VLM 可能会反映出嵌入在训练素材中的社会文化偏见。Gemma 4 系列模型经过了审慎审查、输入数据预处理以及正如本模型卡所述的训练后评估,以帮助减轻此类偏见风险。
  • 虚假信息与滥用
    • VLM 可能会被滥用于生成虚假、误导性或有害的文本。
    • 提供了与模型配套的负责任使用指南,详见 负责任的生成式 AI 工具包(Responsible Generative AI Toolkit)。
  • 透明度与问责制
    • 本模型卡总结了模型架构、能力、局限性以及评估流程的详细信息。
    • 负责任开发的开放模型为整个 AI 生态系统中的开发者和研究人员提供了共享创新的机会,使先进的 VLM 技术触手可及。

已识别的风险与缓解措施:

  • 生成有害内容:内容安全机制与准则至关重要。鼓励开发者保持谨慎,并根据其具体产品政策和应用场景部署适当的内容安全保护措施。
  • 恶意目的滥用:技术限制以及对开发者和最终用户的教育有助于防范 VLM 的恶意应用。提供了教育资源以及供用户举报滥用行为的反馈机制。
  • 隐私侵犯:模型在训练时对数据进行了过滤,以移除某些个人信息及其他敏感数据。鼓励开发者利用隐私保护技术严格遵守隐私法规。
  • 偏见持续存在:鼓励在模型训练、微调和其他使用场景中执行持续监控(使用评估指标、人工审核)并探索去偏技术。

益处

在发布之时,与同等规模的模型相比,该系列模型提供了从头开始专为负责任 AI 开发而设计的高性能开放视觉语言模型实现。

源站原文

library_name: transformers license: apache-2.0 license_link: https://ai.google.dev/gemma/docs/gemma_4_license pipeline_tag: image-text-to-text tags:

  • heretic
  • uncensored
  • decensored
  • abliterated
  • ara base_model:
  • llmfan46/gemma-4-26B-A4B-it-ultra-uncensored-heretic


97% fewer refusals (3/100 Uncensored vs 100/100 Original) while mostly preserving model quality (0.1237 KL divergence).

❤️ Support My Work

Creating these models takes significant time, work and compute. If you find them useful consider supporting me:

image/png

PlatformLinkWhat you get
🎉 PatreonMonthly supportPriority model requests
☕ Ko-fiOne-time tipMy eternal gratitude

Your help will motivate me and would go into further improving my workflow and coverings fees for storage, compute and may even help uncensoring bigger model with rental Cloud GPUs.


GGUF quantizations of llmfan46/gemma-4-26B-A4B-it-ultra-uncensored-heretic.

This is a decensored version of google/gemma-4-26B-A4B-it, made using Heretic v1.2.0 with the Arbitrary-Rank Ablation (ARA) method

Abliteration parameters

ParameterValue
start_layer_index11
end_layer_index22
preserve_good_behavior_weight0.5664
steer_bad_behavior_weight0.0032
overcorrect_relative_weight0.9388
neighbor_count15

Targeted components

  • attn.o_proj

Performance

MetricThis modelOriginal model (gemma-4-26B-A4B-it)
KL divergence0.12370 (by definition)
Refusals✅ 3/100❌ 100/100

PIQA test results:

Original:

  • Total questions: 1838
  • Correct: 1692
  • Accuracy: 0.9206 (92.06%)
  • Parse failures: 0

Heretic:

  • Total questions: 1838
  • Correct: 1678
  • Accuracy: 0.9129 (91.29%)
  • Parse failures: 0

Lower refusals indicate fewer content restrictions, while lower KL divergence indicates more closeness to the original model's baseline. Higher refusals cause more rejections, objections, pushbacks, lecturing, censorship, softening and deflections. PIQA (Physical Intuition Question Answering) a ~1,800 questions tests common-sense understanding of how the physical world works with benchmark scores to measure physical reasoning ability.

MMLU test results:

Original:

============================================================

  • Total questions: 7021

  • Correct: 5791

  • Accuracy: 0.8248 (82.48%)

  • Parse failures: 31

============================================================

Top subjects:

  • professional_law: 0.7006 (550/785)
  • moral_scenarios: 0.7014 (310/442)
  • miscellaneous: 0.9164 (351/383)
  • professional_psychology: 0.8861 (280/316)
  • high_school_psychology: 0.9556 (258/270)
  • high_school_macroeconomics: 0.9086 (179/197)
  • elementary_mathematics: 0.9076 (167/184)
  • moral_disputes: 0.8333 (145/174)
  • prehistory: 0.9128 (157/172)
  • philosophy: 0.8365 (133/159)

Heretic:

============================================================

  • Total questions: 7021

  • Correct: 5616

  • Accuracy: 0.7999 (79.99%)

  • Parse failures: 14

============================================================

Top subjects:

  • professional_law: 0.6064 (476/785)
  • moral_scenarios: 0.6561 (290/442)
  • miscellaneous: 0.9243 (354/383)
  • professional_psychology: 0.8323 (263/316)
  • high_school_psychology: 0.9556 (258/270)
  • high_school_macroeconomics: 0.8731 (172/197)
  • elementary_mathematics: 0.9076 (167/184)
  • moral_disputes: 0.7816 (136/174)
  • prehistory: 0.8895 (153/172)
  • philosophy: 0.8302 (132/159)

MMLU - Massive Multitask Language Understanding, ~14,000 multiple-choice questions across 57 subjects (math, history, law, medicine, etc.).


Quantizations

FilenameQuantDescription
gemma-4-26B-A4B-it-ultra-uncensored-heretic-BF16.ggufBF16Full precision
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q8_0.ggufQ8_0Near-lossless, recommended
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q6_K.ggufQ6_KExcellent quality
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q5_K_M.ggufQ5_K_MGood balance
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q5_K_S.ggufQ5_K_SSmaller Q5
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q4_K_M.ggufQ4_K_MGood for limited VRAM
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q4_K_S.ggufQ4_K_SSmaller Q4
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q3_K_L.ggufQ3_K_LLow VRAM, decent quality
gemma-4-26B-A4B-it-ultra-uncensored-heretic-Q3_K_M.ggufQ3_K_MLow VRAM, smaller

Vision Projector

FilenameQuantDescription
gemma-4-26B-A4B-it-mmproj-BF16.ggufBF16Native precision

A Vision Projector File is Required for vision/multimodal capabilities. Use alongside any quantization above.

Usage

Works with llama.cpp, LM Studio, Ollama, and other GGUF-compatible tools.


Gemma is a family of open models built by Google DeepMind. Gemma 4 models are multimodal, handling text and image input (with audio supported on small models) and generating text output. This release includes open-weights models in both pre-trained and instruction-tuned variants. Gemma 4 features a context window of up to 256K tokens and maintains multilingual support in over 140 languages.

Featuring both Dense and Mixture-of-Experts (MoE) architectures, Gemma 4 is well-suited for tasks like text generation, coding, and reasoning. The models are available in four distinct sizes: E2B, E4B, 26B A4B, and 31B. Their diverse sizes make them deployable in environments ranging from high-end phones to laptops and servers, democratizing access to state-of-the-art AI.

Gemma 4 introduces key capability and architectural advancements:

  • Reasoning – All models in the family are designed as highly capable reasoners, with configurable thinking modes.

  • Extended Multimodalities – Processes Text, Image with variable aspect ratio and resolution support (all models), Video, and Audio (featured natively on the E2B and E4B models).

  • Diverse & Efficient Architectures – Offers Dense and Mixture-of-Experts (MoE) variants of different sizes for scalable deployment.

  • Optimized for On-Device – Smaller models are specifically designed for efficient local execution on laptops and mobile devices.

  • Increased Context Window – The small models feature a 128K context window, while the medium models support 256K.

  • Enhanced Coding & Agentic Capabilities – Achieves notable improvements in coding benchmarks alongside native function-calling support, powering highly capable autonomous agents.

  • Native System Prompt Support – Gemma 4 introduces native support for the system role, enabling more structured and controllable conversations.

Models Overview

Gemma 4 models are designed to deliver frontier-level performance at each size, targeting deployment scenarios from mobile and edge devices (E2B, E4B) to consumer GPUs and workstations (26B A4B, 31B). They are well-suited for reasoning, agentic workflows, coding, and multimodal understanding.

The models employ a hybrid attention mechanism that interleaves local sliding window attention with full global attention, ensuring the final layer is always global. This hybrid design delivers the processing speed and low memory footprint of a lightweight model without sacrificing the deep awareness required for complex, long-context tasks. To optimize memory for long contexts, global layers feature unified Keys and Values, and apply Proportional RoPE (p-RoPE).

Dense Models

PropertyE2BE4B31B Dense
Total Parameters2.3B effective (5.1B with embeddings)4.5B effective (8B with embeddings)30.7B
Layers354260
Sliding Window512 tokens512 tokens1024 tokens
Context Length128K tokens128K tokens256K tokens
Vocabulary Size262K262K262K
Supported ModalitiesText, Image, AudioText, Image, AudioText, Image
Vision Encoder Parameters~150M~150M~550M
Audio Encoder Parameters~300M~300MNo Audio

The "E" in E2B and E4B stands for "effective" parameters. The smaller models incorporate Per-Layer Embeddings (PLE) to maximize parameter efficiency in on-device deployments. Rather than adding more layers or parameters to the model, PLE gives each decoder layer its own small embedding for every token. These embedding tables are large but are only used for quick lookups, which is why the effective parameter count is much smaller than the total.

Mixture-of-Experts (MoE) Model

Property26B A4B MoE
Total Parameters25.2B
Active Parameters3.8B
Layers30
Sliding Window1024 tokens
Context Length256K tokens
Vocabulary Size262K
Expert Count8 active / 128 total and 1 shared
Supported ModalitiesText, Image
Vision Encoder Parameters~550M

The "A" in 26B A4B stands for "active parameters" in contrast to the total number of parameters the model contains. By only activating a 4B subset of parameters during inference, the Mixture-of-Experts model runs much faster than its 26B total might suggest. This makes it an excellent choice for fast inference compared to the dense 31B model since it runs almost as fast as a 4B-parameter model.

Benchmark Results

These models were evaluated against a large collection of different datasets and metrics to cover different aspects of text generation. Evaluation results marked in the table are for instruction-tuned models.

Gemma 4 31BGemma 4 26B A4BGemma 4 E4BGemma 4 E2BGemma 3 27B (no think)
MMLU Pro85.2%82.6%69.4%60.0%67.6%
AIME 2026 no tools89.2%88.3%42.5%37.5%20.8%
LiveCodeBench v680.0%77.1%52.0%44.0%29.1%
Codeforces ELO21501718940633110
GPQA Diamond84.3%82.3%58.6%43.4%42.4%
Tau2 (average over 3)76.9%68.2%42.2%24.5%16.2%
HLE no tools19.5%8.7%---
HLE with search26.5%17.2%---
BigBench Extra Hard74.4%64.8%33.1%21.9%19.3%
MMMLU88.4%86.3%76.6%67.4%70.7%
Vision
MMMU Pro76.9%73.8%52.6%44.2%49.7%
OmniDocBench 1.5 (average edit distance, lower is better)0.1310.1490.1810.2900.365
MATH-Vision85.6%82.4%59.5%52.4%46.0%
MedXPertQA MM61.3%58.1%28.7%23.5%-
Audio
CoVoST--35.5433.47-
FLEURS (lower is better)--0.080.09-
Long Context
MRCR v2 8 needle 128k (average)66.4%44.1%25.4%19.1%13.5%

Core Capabilities

Gemma 4 models handle a broad range of tasks across text, vision, and audio. Key capabilities include:

  • Thinking – Built-in reasoning mode that lets the model think step-by-step before answering.
  • Long Context – Context windows of up to 128K tokens (E2B/E4B) and 256K tokens (26B A4B/31B).
  • Image Understanding – Object detection, Document/PDF parsing, screen and UI understanding, chart comprehension, OCR (including multilingual), handwriting recognition, and pointing. Images can be processed at variable aspect ratios and resolutions.
  • Video Understanding – Analyze video by processing sequences of frames.
  • Interleaved Multimodal Input – Freely mix text and images in any order within a single prompt.
  • Function Calling – Native support for structured tool use, enabling agentic workflows.
  • Coding – Code generation, completion, and correction.
  • Multilingual – Out-of-the-box support for 35+ languages, pre-trained on 140+ languages.
  • Audio (E2B and E4B only) – Automatic speech recognition (ASR) and speech-to-translated-text translation across multiple languages.

Getting Started

You can use all Gemma 4 models with the latest version of Transformers. To get started, install the necessary dependencies in your environment:

pip install -U transformers torch accelerate

Once you have everything installed, you can proceed to load the model with the code below:

from transformers import AutoProcessor, AutoModelForCausalLM

MODEL_ID = "google/gemma-4-26B-A4B-it"

# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    dtype="auto",
    device_map="auto"
)

Once the model is loaded, you can start generating output:

# Prompt
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Write a short joke about saving RAM."},
]

# Process input
text = processor.apply_chat_template(
    messages, 
    tokenize=False, 
    add_generation_prompt=True, 
    enable_thinking=False
)
inputs = processor(text=text, return_tensors="pt").to(model.device)
input_len = inputs["input_ids"].shape[-1]

# Generate output
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse output
processor.parse_response(response)

To enable reasoning, set enable_thinking=True and the parse_response function will take care of parsing the thinking output.

Below, you will also find snippets for processing audio (E2B and E4B only), images, and video alongside text:

Instead of using AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process audio. To use it, make sure to install the following packages:

pip install -U transformers torch librosa accelerate

You can then load the model with the code below:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-E2B-it"

# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

Once the model is loaded, you can start generating output by directly referencing the audio URL in the prompt:

# Prompt - add audio before text
messages = [
    {
        "role": "user",
        "content": [
            {"type": "audio", "audio": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/journal1.wav"},
            {"type": "text", "text": "Transcribe the following speech segment in its original language. Follow these specific instructions for formatting the answer:\n* Only output the transcription, with no newlines.\n* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three."},
        ]
    }
]

# Process input
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]

# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse output
processor.parse_response(response)

Instead of using AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process images. To use it, make sure to install the following packages:

pip install -U transformers torch torchvision accelerate

You can then load the model with the code below:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-26B-A4B-it"

# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

Once the model is loaded, you can start generating output by directly referencing the image URL in the prompt:

# Prompt - add image before text
messages = [
    {
        "role": "user", "content": [
            {"type": "image", "url": "https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/Demos/sample-data/GoldenGate.png"},
            {"type": "text", "text": "What is shown in this image?"}
        ]
    }
]

# Process input
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]

# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse output
processor.parse_response(response)

Instead of using AutoModelForCausalLM, you can use AutoModelForMultimodalLM to process videos. To use it, make sure to install the following packages:

pip install -U transformers torch torchvision torchcodec librosa accelerate

You can then load the model with the code below:

from transformers import AutoProcessor, AutoModelForMultimodalLM

MODEL_ID = "google/gemma-4-26B-A4B-it"

# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
    MODEL_ID, 
    dtype="auto", 
    device_map="auto"
)

Once the model is loaded, you can start generating output by directly referencing the video URL in the prompt:

# Prompt - add video before text
messages = [
    {
        'role': 'user',
        'content': [
            {"type": "video", "video": "https://github.com/bebechien/gemma/raw/refs/heads/main/videos/ForBiggerBlazes.mp4"},
            {'type': 'text', 'text': 'Describe this video.'}
        ]
    }
]

# Process input
inputs = processor.apply_chat_template(
    messages,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]

# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)

# Parse output
processor.parse_response(response)

Best Practices

For the best performance, use these configurations and best practices:

1. Sampling Parameters

Use the following standardized sampling configuration across all use cases:

  • temperature=1.0
  • top_p=0.95
  • top_k=64

2. Thinking Mode Configuration

Compared to Gemma 3, the models use standard system, assistant, and user roles. To properly manage the thinking process, use the following control tokens:

  • Trigger Thinking: Thinking is enabled by including the <|think|> token at the start of the system prompt. To disable thinking, remove the token.
  • Standard Generation: When thinking is enabled, the model will output its internal reasoning followed by the final answer using this structure:
    <|channel>thought\n[Internal reasoning]<channel|>
  • Disabled Thinking Behavior: For all models except for the E2B and E4B variants, if thinking is disabled, the model will still generate the tags but with an empty thought block:
    <|channel>thought\n<channel|>[Final answer]

[!Note] Note that many libraries like Transformers and llama.cpp handle the complexities of the chat template for you.

3. Multi-Turn Conversations

  • No Thinking Content in History: In multi-turn conversations, the historical model output should only include the final response. Thoughts from previous model turns must not be added before the next user turn begins.

4. Modality order

  • For optimal performance with multimodal inputs, place image and/or audio content before the text in your prompt.

5. Variable Image Resolution

Aside from variable aspect ratios, Gemma 4 supports variable image resolution through a configurable visual token budget, which controls how many tokens are used to represent an image. A higher token budget preserves more visual detail at the cost of additional compute, while a lower budget enables faster inference for tasks that don't require fine-grained understanding.

  • The supported token budgets are: 70, 140, 280, 560, and 1120.
    • Use lower budgets for classification, captioning, or video understanding, where faster inference and processing many frames outweigh fine-grained detail.
    • Use higher budgets for tasks like OCR, document parsing, or reading small text.

6. Audio

Use the following prompt structures for audio processing:

  • Audio Speech Recognition (ASR)
Transcribe the following speech segment in {LANGUAGE} into {LANGUAGE} text.

Follow these specific instructions for formatting the answer:
* Only output the transcription, with no newlines.
* When transcribing numbers, write the digits, i.e. write 1.7 and not one point seven, and write 3 instead of three.
  • Automatic Speech Translation (AST)
Transcribe the following speech segment in {SOURCE_LANGUAGE}, then translate it into {TARGET_LANGUAGE}.
When formatting the answer, first output the transcription in {SOURCE_LANGUAGE}, then one newline, then output the string '{TARGET_LANGUAGE}: ', then the translation in {TARGET_LANGUAGE}.

7. Audio and Video Length

All models support image inputs and can process videos as frames whereas the E2B and E4B models also support audio inputs. Audio supports a maximum length of 30 seconds. Video supports a maximum of 60 seconds assuming the images are processed at one frame per second.

Model Data

Data used for model training and how the data was processed.

Training Dataset

Our pre-training dataset is a large-scale, diverse collection of data encompassing a wide range of domains and modalities, which includes web documents, code, images, audio, with a cutoff date of January 2025. Here are the key components:

  • Web Documents: A diverse collection of web text ensures the model is exposed to a broad range of linguistic styles, topics, and vocabulary. The training dataset includes content in over 140 languages.
  • Code: Exposing the model to code helps it to learn the syntax and patterns of programming languages, which improves its ability to generate code and understand code-related questions.
  • Mathematics: Training on mathematical text helps the model learn logical reasoning, symbolic representation, and to address mathematical queries.
  • Images: A wide range of images enables the model to perform image analysis and visual data extraction tasks.

The combination of these diverse data sources is crucial for training a powerful multimodal model that can handle a wide variety of different tasks and data formats.

Data Preprocessing

Here are the key data cleaning and filtering methods applied to the training data:

  • CSAM Filtering: Rigorous CSAM (Child Sexual Abuse Material) filtering was applied at multiple stages in the data preparation process to ensure the exclusion of harmful and illegal content.
  • Sensitive Data Filtering: As part of making Gemma pre-trained models safe and reliable, automated techniques were used to filter out certain personal information and other sensitive data from training sets.
  • Additional methods: Filtering based on content quality and safety in line with our policies.

Ethics and Safety

As open models become central to enterprise infrastructure, provenance and security are paramount. Developed by Google DeepMind, Gemma 4 undergoes the same rigorous safety evaluations as our proprietary Gemini models.

Evaluation Approach

Gemma 4 models were developed in partnership with internal safety and responsible AI teams. A range of automated as well as human evaluations were conducted to help improve model safety. These evaluations align with Google’s AI principles, as well as safety policies, which aim to prevent our generative AI models from generating harmful content, including:

  • Content related to child sexual abuse material and exploitation
  • Dangerous content (e.g., promoting suicide, or instructing in activities that could cause real-world harm)
  • Sexually explicit content
  • Hate speech (e.g., dehumanizing members of protected groups)
  • Harassment (e.g., encouraging violence against people)

Evaluation Results

For all areas of safety testing, we saw major improvements in all categories of content safety relative to previous Gemma models. Overall, Gemma 4 models significantly outperform Gemma 3 and 3n models in improving safety, while keeping unjustified refusals low. All testing was conducted without safety filters to evaluate the model capabilities and behaviors. For both text-to-text and image-to-text, and across all model sizes, the model produced minimal policy violations, and showed significant improvements over previous Gemma models' performance.

Usage and Limitations

These models have certain limitations that users should be aware of.

Intended Usage

Multimodal models (capable of processing vision, language, and/or audio) have a wide range of applications across various industries and domains. The following list of potential uses is not comprehensive. The purpose of this list is to provide contextual information about the possible use-cases that the model creators considered as part of model training and development.

  • Content Creation and Communication
    • Text Generation: These models can be used to generate creative text formats such as poems, scripts, code, marketing copy, and email drafts.
    • Chatbots and Conversational AI: Power conversational interfaces for customer service, virtual assistants, or interactive applications.
    • Text Summarization: Generate concise summaries of a text corpus, research papers, or reports.
    • Image Data Extraction: These models can be used to extract, interpret, and summarize visual data for text communications.
    • Audio Processing and Interaction: The smaller models (E2B and E4B) can analyze and interpret audio inputs, enabling voice-driven interactions and transcriptions.
  • Research and Education
    • Natural Language Processing (NLP) and VLM Research: These models can serve as a foundation for researchers to experiment with VLM and NLP techniques, develop algorithms, and contribute to the advancement of the field.
    • Language Learning Tools: Support interactive language learning experiences, aiding in grammar correction or providing writing practice.
    • Knowledge Exploration: Assist researchers in exploring large bodies of text by generating summaries or answering questions about specific topics.

Limitations

  • Training Data
    • The quality and diversity of the training data significantly influence the model's capabilities. Biases or gaps in the training data can lead to limitations in the model's responses.
    • The scope of the training dataset determines the subject areas the model can handle effectively.
  • Context and Task Complexity
    • Models perform well on tasks that can be framed with clear prompts and instructions. Open-ended or highly complex tasks might be challenging.
    • A model's performance can be influenced by the amount of context provided (longer context generally leads to better outputs, up to a certain point).
  • Language Ambiguity and Nuance
    • Natural language is inherently complex. Models might struggle to grasp subtle nuances, sarcasm, or figurative language.
  • Factual Accuracy
    • Models generate responses based on information they learned from their training datasets, but they are not knowledge bases. They may generate incorrect or outdated factual statements.
  • Common Sense
    • Models rely on statistical patterns in language. They might lack the ability to apply common sense reasoning in certain situations.

Ethical Considerations and Risks

The development of vision-language models (VLMs) raises several ethical concerns. In creating an open model, we have carefully considered the following:

  • Bias and Fairness
    • VLMs trained on large-scale, real-world text and image data can reflect socio-cultural biases embedded in the training material. Gemma 4 models underwent careful scrutiny, input data pre-processing, and post-training evaluations as reported in this card to help mitigate the risk of these biases.
  • Misinformation and Misuse
    • VLMs can be misused to generate text that is false, misleading, or harmful.
    • Guidelines are provided for responsible use with the model, see the Responsible Generative AI Toolkit.
  • Transparency and Accountability
    • This model card summarizes details on the models' architecture, capabilities, limitations, and evaluation processes.
    • A responsibly developed open model offers the opportunity to share innovation by making VLM technology accessible to developers and researchers across the AI ecosystem.

Risks identified and mitigations:

  • Generation of harmful content: Mechanisms and guidelines for content safety are essential. Developers are encouraged to exercise caution and implement appropriate content safety safeguards based on their specific product policies and application use cases.
  • Misuse for malicious purposes: Technical limitations and developer and end-user education can help mitigate against malicious applications of VLMs. Educational resources and reporting mechanisms for users to flag misuse are provided.
  • Privacy violations: Models were trained on data filtered for removal of certain personal information and other sensitive data. Developers are encouraged to adhere to privacy regulations with privacy-preserving techniques.
  • Perpetuation of biases: It's encouraged to perform continuous monitoring (using evaluation metrics, human review) and the exploration of de-biasing techniques during model training, fine-tuning, and other use cases.

Benefits

At the time of release, this family of models provides high-performance open vision-language model implementations designed from the ground up for responsible AI development compared to similarly sized models.

HUGGING FACE

上游数据

HF 下载量3.1万
HF 点赞量162

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
llmfan46
最近更新
2026/05/25
最新创建
2026/04/07
HF 趋势
530
数据快照
2026/09/16
版本
未知
许可证
apache-2.0