Summary

Gemma 4 31B is Google DeepMind's largest Gemma 4 model, a dense model with 30.7B parameters, 256K context and image input, released under Apache 2.0. Its refusal-reduced variants include llmfan46's Heretic build, which publishes refusal, KL divergence and MMLU figures, huihui-ai's abliterated v2 with the first five layers left unedited, and a HauhauCS QAT GGUF with an undisclosed method.

Lineage

Each node is a catalogued repo whose card names Gemma 4 31B (instruction-tuned) as its base. Select one to see its record; the dashed ring marks a repo that an API serves by name.

Lineage

3 catalogued variants of Gemma 4 31B (instruction-tuned)

  • Abliterated
  • Heretic
  • Fine-tuned
  • Undisclosed
  • API, exact repo
llmfan46HauhauCShuihui-ai30.7BGemma 4 31B (instruction-tuned)
Base modelby Google DeepMind

Gemma 4 31B (instruction-tuned)

google/gemma-4-31B-it

  • 30.7B
  • 256K context
  • Apache 2.0
  • Safetensors

0 API providers list a refusal-reduced build of this base.

What the base model is

Gemma 4 31B is the largest model in Google DeepMind’s Gemma 4 family, and a dense one. The card gives 30.7B parameters and 60 layers; Hugging Face counts 31.3B because its total includes a vision encoder of about 550M parameters. It takes text and images (audio is limited to the E2B, E4B and 12B models), supports a configurable thinking mode and native function calling, and has a 256K-token context window.

Being dense is the main difference from its sibling, Gemma 4 26B A4B. Every parameter is used for every token, so it generates more slowly than the mixture-of-experts model, which Google’s card says “runs almost as fast as a 4B-parameter model”. In return, the card reports better results for the 31B than for the 26B A4B on every benchmark where it lists both. Those are Google’s results for the original model, not measurements of the variants below.

Attention is hybrid, as in the rest of the family: 50 of the 60 layers use a sliding window of 1,024 tokens and 10 keep the full context, with the final layer always global. The card adds that the global layers use unified keys and values to save memory at long context. The VRAM estimator models the KV cache from the configuration file.

Google publishes Gemma 4 under the Apache License 2.0, linked from the card as its Gemma 4 license page. Earlier Gemma generations used the Gemma Terms of Use, and one variant below still carries that older tag.

The variants at a glance

Variant Method (per card) What the card reports
llmfan46 uncensored heretic Heretic 1.2.0, ARA method 10/100 refusals vs 99/100; KL divergence 0.0541; MMLU 85.90% vs 86.50%
huihui-ai abliterated v2 Abliteration; first 5 layers left unedited Lower llama.cpp perplexity than the original and than v1
HauhauCS QAT Balanced (GGUF) Not disclosed “0/465 refusals” on an unpublished test; MTP draft head

llmfan46’s build is the most thoroughly documented of the three. It was made with Heretic, a tool that searches abliteration settings automatically and reports how many test prompts the model still refuses and how far its predictions moved from the original (KL divergence). The card says the edit touched only the attention output projections in layers 30 to 48, and it adds an MMLU run of 7,021 questions before and after. All three figures were produced by the creator, not by Atlas.

huihui-ai’s v2 is a classic abliteration, which the creator calls “a crude, proof-of-concept implementation”. The first version edited both thinking and non-thinking modes; v2 leaves the first five layers alone, which the card says gives “fewer warnings and rejections”. Its evidence is a llama.cpp perplexity test on the wiki.test.raw file, where v2 scores 13,161 against 14,875 for the original. Values that high suggest the test is useful only as a comparison between these three builds.

HauhauCS does not say how its build was made, so Atlas files it as undisclosed; uncensored vs abliterated explains why that label matters. The card says it starts from Google’s quantization-aware-trained (QAT) weights and ships one Q4_K_M file, a vision projector and a multi-token-prediction (MTP) draft head taken from Unsloth’s Gemma 4 release. The creator reports “roughly 53% faster generation” with the draft head in llama.cpp.

Which one for which need

  • For measured tradeoffs: llmfan46’s Heretic build. It is the only one of the three that reports refusals, KL divergence and a knowledge benchmark before and after the edit. It ships BF16 safetensors and a separate GGUF repository from Q3_K_M to Q8_0, with a vision projector.
  • For one 4-bit file with speculative decoding: the HauhauCS GGUF. The text model is 18.7 GB, plus 1.2 GB for the vision projector and 280 MB for the MTP head. The creator recommends its own sampling settings rather than Google’s defaults.
  • For full BF16 weights and an Ollama build: huihui-ai’s v2, with GGUF files published separately by mradermacher.

For local use, the weights alone take about 62.5 GB in Google’s BF16 release, 32.6 GB at Q8_0 and 18.7 GB at Q4_K_M, going by the file sizes in the repositories. The KV cache and runtime overhead come on top and grow with context length, so enter your own context in the VRAM estimator rather than going by file size. The GGUF quantization guide explains what each level trades away. Hosted options and rates, where Atlas tracks any, are listed below, and the compare page shows these records side by side.

Limits and open questions

The HauhauCS repo is tagged with the Gemma Terms of Use license although Gemma 4 is Apache 2.0, and its metadata names the standard instruction-tuned model as its base even though the card says it was built from the QAT weights. Its “0/465 refusals” figure comes from a prompt set that is not published, and a footnote says some edge-case prompts still deflect.

The Hugging Face API reports two different parameter totals for huihui-ai’s v2 (31.27B by data type, 32.68B in its total field), while its configuration file is identical to Google’s. It is probably a metadata quirk, but it is the kind of mismatch to note when a card is your only documentation.

No variant reports how image input behaves after the edit. Test it before relying on it, because editing the language layers can change how the model describes what it sees.

Base model

Gemma 4 31B (instruction-tuned)

google/gemma-4-31B-it

  • Base model
  • Open download
Creator
Google DeepMind
Input
Text, ImageSource: google/gemma-4-31B-it model cardThe card lists text and image for the 31B model; audio is for the E2B, E4B and 12B models only.
Architecture
DenseSource: google/gemma-4-31B-it model cardListed among the card's dense models, with 60 layers.
Parameters
30.7BSource: google/gemma-4-31B-it model cardHugging Face counts 31,273,088,876, which includes the ~550M vision encoder.
Active per token
Not applicableDense model: every parameter is used for each token.
Configured context
262,144 tokensSource: google/gemma-4-31B-it config.json
Stated context
256K tokensSource: google/gemma-4-31B-it model card
License tag
Apache 2.0Source: google/gemma-4-31B-it (Hugging Face model API)The license link on the card is Google's Gemma 4 license page, which is the Apache License 2.0.
Languages
Not statedThe card metadata does not list languages.
Weights
Hosted API
No provider in our data serves this exact repo.
  • Reasoning mode
  • Image input
  • Tool use
  • Hybrid attention: local sliding-window layers interleaved with full global layers, and the final layer is always global (card).
  • The card says the global layers use unified keys and values to save memory at long context.

Read from the model card and Hugging Face metadata on 14 November 2026.

Refusal-reduced variants

Ordered as catalogued. Method, layers and claims are as each creator states them; Atlas has not tested any of these variants.

Gemma 4 31B uncensored heretic (llmfan46)

llmfan46/gemma-4-31B-it-uncensored-heretic

  • Heretic (automated abliteration)
  • Open download
Creator
llmfan46
Derived from
google/gemma-4-31B-it
Method
Heretic (automated abliteration)Source: llmfan46/gemma-4-31B-it-uncensored-heretic model cardHeretic v1.2.0 with the Arbitrary-Rank Ablation (ARA) method.Automated abliteration with Heretic's ARA method. The card says the edit targeted the attention output projections in layers 30 to 48, and publishes the parameters Heretic chose.
Input
Text, ImageSource: llmfan46/gemma-4-31B-it-uncensored-heretic (Hugging Face model API)
Architecture
DenseSource: google/gemma-4-31B-it model card
Parameters
31.3BSource: llmfan46/gemma-4-31B-it-uncensored-heretic (Hugging Face model API)
Active per token
Not applicable
Configured context
262,144 tokensSource: llmfan46/gemma-4-31B-it-uncensored-heretic config.json
Stated context
Not stated
License tag
Apache 2.0Source: llmfan46/gemma-4-31B-it-uncensored-heretic (Hugging Face model API)
Languages
Not stated
Weights
Hosted API
No provider in our data serves this exact repo.
  • Reasoning mode
  • Image input

Creator claims (reported on the card, not tested by Atlas)

  • The creator reports 10/100 refusals versus 99/100 for the original, with a KL divergence of 0.0541.
  • The creator reports MMLU accuracy of 85.90% versus 86.50% for the original on 7,021 questions, run by the creator, not by Atlas.
  • The card links NVFP4 builds of the same model in separate repositories.

Read from the model card and Hugging Face metadata on 14 November 2026.

Gemma4-31B-QAT Uncensored HauhauCS Balanced (GGUF)

HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP

  • Not disclosed
  • Open download
Creator
HauhauCS
Derived from
google/gemma-4-31B-it
Method
Not disclosedSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP model cardThe card does not describe how refusals were removed.Built from the official QAT weights according to the card. Ships a single Q4_K_M text file, a vision projector and a multi-token-prediction (MTP) draft file for speculative decoding; the card credits the MTP file to Unsloth's Gemma 4 release.
Input
Text, ImageSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP model card
Architecture
DenseSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP model cardThe card lists "31B dense".
Parameters
30.7BSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP (Hugging Face model API)Parameter count in the GGUF metadata.
Active per token
Not applicable
Configured context
262,144 tokensSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP (Hugging Face model API)context_length in the GGUF metadata.
Stated context
256K (262144)Source: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP model card
License tag
Gemma Terms of UseSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP (Hugging Face model API)The repo is tagged "gemma", but Google publishes Gemma 4 under the Apache License 2.0; the Gemma Terms of Use cover earlier Gemma generations. The base model's license is the one that applies to its weights.
Languages
EnglishSource: HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP (Hugging Face model API)
Weights
Hosted API
No provider in our data serves this exact repo.
  • Reasoning mode
  • Image input
  • Coding (claimed)
  • MTP draft head

Creator claims (reported on the card, not tested by Atlas)

  • The creator reports "0/465 refusals" on an unpublished prompt set; a footnote says a small number of edge-case prompts still deflect.
  • The creator reports "roughly 53% faster generation" with the MTP draft head, tested in llama.cpp.
  • The card says the Balanced variant is tuned "especially for agentic coding, reasoning, creative writing".
  • The creator recommends its own sampling settings (temperature 0.6, top_k 64, top_p 0.9, min_p 0.05, repeat_penalty 1.1) rather than Google's defaults.
  • The card reports that Gemma 4 can crash under LM Studio's tensor-split mode on several GPUs, and suggests a single GPU.

Read from the model card and Hugging Face metadata on 14 November 2026.

Huihui Gemma 4 31B abliterated v2

huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2

  • Abliteration
  • Open download
Creator
huihui-ai
Derived from
google/gemma-4-31B-it
Method
AbliterationSource: huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2 model cardAbliteration with the remove-refusals-with-transformers approach, without TransformerLens. In this second version the first 5 layers were not abliterated, which the card says gives "fewer warnings and rejections". The first version, huihui-ai/Huihui-gemma-4-31B-it-abliterated, abliterated both thinking and non-thinking modes.
Input
Text, ImageSource: google/gemma-4-31B-it model cardInherited from the base model; this repo's config.json is identical to Google's.
Architecture
DenseSource: google/gemma-4-31B-it model card
Parameters
31.3BSource: huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2 (Hugging Face model API)BF16 parameter count in the Hugging Face API. The API's "total" field reports 32,682,372,656, which does not match that breakdown.
Active per token
Not applicable
Configured context
262,144 tokensSource: huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2 config.json
Stated context
Not stated
License tag
Apache 2.0Source: huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2 (Hugging Face model API)
Languages
Not stated
Weights
Hosted API
No provider in our data serves this exact repo.
  • Reasoning mode
  • Image input

Creator claims (reported on the card, not tested by Atlas)

  • The creator calls it "a crude, proof-of-concept implementation to remove refusals".
  • The creator reports llama.cpp perplexity on wiki.test.raw of 13,161 for v2, 13,336 for v1 and 14,875 for the original, and says a smaller value means higher model quality.
  • All three perplexity values are very high in absolute terms, which suggests the figures are useful only as a comparison between these three builds.
  • The card links an Ollama build, huihui_ai/gemma-4-abliterated:31b-v2.

Read from the model card and Hugging Face metadata on 14 November 2026.

Hosted API access

Rows marked names the exact repo serve a specific variant from the list above. A provider's own build is refusal-reduced by its own statement but does not name its weights, so you cannot check which variant it is.

No provider in our data serves a refusal-reduced build of this model.

Memory to run it yourself

Estimate for Gemma 4 31B (instruction-tuned) with 32,768 tokens of context, one sequence, FP16 KV cache and 10% overhead. Variants of the same architecture need about the same.

WeightsWeightsKV cache (32K)Total with overhead
Q4_K_M (4.8944 bits/weight)17.5 GiB3.28 GiB22.9 GiB
Q8_0 (or FP8) (8.5008 bits/weight)30.4 GiB3.28 GiB37.0 GiB
BF16 / FP16 (16.0005 bits/weight)57.2 GiB3.28 GiB66.5 GiB
50 sliding-window layers cache at most 1,024 tokens. Adjust in the VRAM estimator.

Sources

  1. google/gemma-4-31B-it model card, Hugging Face. Checked 14 November 2026.
  2. google/gemma-4-31B-it config.json, Hugging Face. Checked 14 November 2026.
  3. llmfan46/gemma-4-31B-it-uncensored-heretic model card, Hugging Face. Checked 14 November 2026.
  4. HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP model card, Hugging Face. Checked 14 November 2026.
  5. huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2 model card, Hugging Face. Checked 14 November 2026.
  6. Gemma 4 license (Apache License 2.0), Google AI for Developers
  7. Heretic, GitHub (p-e-w)