nsfwapis.com
// Guide / Models

Gemma abliterated models: sizes, hardware and hosted options

Gemma abliterated models are Google’s open-weight Gemma releases with the refusal direction removed from their weights, so they stop declining most requests. Gemma is a mid-sized family: the largest models are 27B (Gemma 3) and 31B (Gemma 4), which makes every size runnable on a single consumer GPU or a Mac. This guide covers the builds that exist, the memory each one needs, how Gemma’s license carries over, and what to use when you want an abliterated model behind an API.

What is a Gemma abliterated model?

A Gemma abliterated model is a copy of one of Google’s open Gemma models, edited so it no longer refuses the requests it was trained to decline. The edit finds the direction in the model’s activations that carries refusal and removes it from the weights. Nothing is retrained, so the model keeps Gemma’s knowledge, its chat template and, on most sizes, its image input.

Gemma is a common base for abliteration because of where its sizes sit. The largest Gemma 3 model is 27B and the largest Gemma 4 dense model is 31B. Both fit on one 24 GB GPU at 4-bit, and both are strong writers for their size. That makes Gemma a natural pick for people who want a capable uncensored model on their own hardware, rather than a 300B model they can only rent.

If abliteration is new to you, read what abliterated models are first. For other families, see the guides to Qwen abliterated and GLM abliterated models. This post covers what is specific to Gemma.

Which Gemma versions have abliterated builds?

Abliterated builds exist for Gemma 3 and Gemma 4, the two current generations. The table lists the open-weight sizes from the Gemma 3 technical report and the Gemma 4 model cards.

Open-weight Gemma 3 and Gemma 4 releases, per the Gemma 3 technical report and the Gemma 4 model cards
GenerationReleasedSizesContextNotes
Gemma 3March 20251B, 4B, 12B, 27B (dense); 270M added later32K on 1B, 128K on 4B and up4B, 12B and 27B accept images. Trained on 2T (1B) to 14T (27B) tokens.
Gemma 4April 2, 2026E2B, E4B, 31B (dense); 26B A4B (MoE). Google’s model card also lists a 12B.128K on E2B and E4B, 256K on the larger modelsAll sizes accept images. E2B and E4B also accept audio. Apache 2.0 license.

Two naming details matter when you pick a build. The “E” in E2B and E4B stands for effective parameters: these on-device models carry extra embedding weights, so their files are larger than the name suggests. “A4B” in 26B A4B means about 4B parameters are active per token. The Hugging Face card gives 25.2B total parameters, and Google describes roughly 3.8B active during inference.

The search terms people use mix the two generations. “Gemma 4-abliterated” almost always means one of the huihui-ai Gemma 4 builds. “Gemma 3 27B abliterated” and “Gemma 3 12B abliterated” usually point to the instruction-tuned gemma-3-27b-it and gemma-3-12b-it models edited by huihui-ai or mlabonne.

Gemma 3 27B and 12B abliterated: which build to pick

For Gemma 3, the two most used abliterated builds come from huihui-ai and Maxime Labonne (mlabonne), and they were made in different ways.

  • huihui-ai publishes gemma-3-1b-it-abliterated, gemma-3-4b-it-abliterated, and gemma-3-12b-it-abliterated on Hugging Face, and packages them on Ollama as huihui_ai/gemma3-abliterated with tags from 270m to 27b. The Ollama page lists Ollama 0.6 or later as a requirement.
  • mlabonne publishes gemma-3-4b-it-abliterated, gemma-3-12b-it-abliterated and gemma-3-27b-it-abliterated, each with a GGUF version. The cards describe a layerwise variant of abliteration: instead of one refusal direction for the whole model, a direction is computed for each layer independently, with a refusal weight of 1.5 on the 27B model. The 27B card reports an acceptance rate above 90% with coherent output.

The two methods can behave differently on the same prompts. The layerwise approach is more aggressive, which tends to remove more refusals and can also change the writing style more. If you have the memory, download both 12B builds and compare them on 20 to 50 of your own prompts before settling on the 27B size.

Sampling matters with Gemma. mlabonne’s cards recommend temperature=1.0, top_k=64 and top_p=0.95, the same values Google recommends for Gemma. Very low temperatures can make an abliterated Gemma repeat itself, so start from these values and adjust from there.

One trap with the Ollama package: the huihui-ai card notes that gemma3-abliterated tags default to f16 rather than a 4-bit quantization. The default 4B tag is listed at 8.6 GB, about twice what a 4-bit file needs. Pick a quantized tag, or import a GGUF quantization, if memory is tight.

Gemma 4 abliterated: 26B A4B or 31B?

For Gemma 4, huihui-ai again leads. Its Hugging Face collection includes Huihui-gemma-4-26B-A4B-it-abliterated, a Huihui-gemma-4-31B-it-abliterated-v2, and builds made from Google’s quantization-aware (QAT) checkpoints. Other uploaders have published their own 31B and E4B abliterations, so check the base model and method on each card.

The Ollama package huihui_ai/gemma-4-abliterated lists these main tags, all at Q4_K_M quantization at the time of writing:

Main tags of the huihui_ai/gemma-4-abliterated Ollama package, as listed on Ollama. Sizes change as tags are updated.
Ollama tagListed sizeContextBest for
e2b7.2 GB128KLaptops and small GPUs, quick tests
e4b9.6 GB128KA 12 GB GPU or a 16 GB Mac
26b18 GB256KFast chat on a 24 GB GPU (about 4B active)
31b20 GB256KBest quality that fits a 24 GB GPU

The choice between the two large models is speed against depth. The 26B A4B model needs almost as much memory as the 31B, but only about 4B parameters work on each token, so it generates text several times faster. The dense 31B is slower and usually better at long, detailed instructions, such as a long character card with many rules. Run it with ollama run huihui_ai/gemma-4-abliterated:31b and compare it with the 26b tag on the same prompts.

Gemma 4 also has a thinking mode, switched on by a special token in the system prompt. As with any reasoning model, the thinking text costs time, and an abliterated model can still argue itself into a toned-down answer while thinking. For roleplay and creative writing, test with thinking off first.

How much memory does a Gemma abliterated model need?

Plan for a little over half a gigabyte per billion parameters at 4-bit quantization, plus room for the context cache. Abliteration doesn’t change a model’s size, so the abliterated build needs exactly what the original needs.

Approximate memory to run Gemma models at 4-bit quantization, before the long-context cache. Gemma 3 figures are estimates from parameter counts.
ModelParametersApproximate memory at 4-bitPractical setup
Gemma 3 1B1B (dense)Under 1 GBAny computer, even a phone
Gemma 3 4B4B (dense)About 3 GBAny recent laptop
Gemma 3 12B12B (dense)About 8 GBA 12 GB GPU or a 16 GB Mac
Gemma 3 27B27B (dense)About 17 GBA 24 GB GPU or a 32 GB Mac
Gemma 4 E2B / E4B2B / 4B effectiveAbout 7 to 10 GB (Ollama listing)A 12 GB GPU or a 16 GB Mac
Gemma 4 26B A4B25.2B / about 4B active (MoE)About 18 GB (Ollama listing)A 24 GB GPU or a 32 GB Mac
Gemma 4 31B31B (dense)About 20 GB (Ollama listing)A 24 GB GPU or a 32 GB Mac

Long context is where these numbers break down. A 24 GB GPU holds the 31B weights, but not 256K tokens of cache next to them. Most local setups run Gemma at 8K to 32K tokens. Ollama’s default context is often shorter than that, so raise num_ctx when a long chat starts forgetting its beginning. The SillyTavern setup guide covers matching the context setting on the client side.

Does the Gemma license still apply to an abliterated model?

Yes. An abliterated model is a modified copy of the original, so it carries the original license. For Gemma that means two different sets of terms.

  • Gemma 3 is covered by the Gemma Terms of Use. They incorporate Google’s Gemma Prohibited Use Policy, and anyone who redistributes Gemma or a model derivative must pass those use restrictions on and give recipients a copy of the agreement. An abliterated Gemma 3 build is a model derivative under those terms. Removing refusals from the weights doesn’t remove the policy.
  • Gemma 4 is released under Apache 2.0, a standard open-source license without a separate use policy. Your own use is limited by the law and by the terms of any service you deploy on.

Whatever the license, some content is illegal everywhere it matters for an app like this. Sexual content involving minors, and intimate images of real people made without their consent, are illegal whichever model produces them. Read the license on the exact card you download before you ship weights or a product, and get legal advice for a commercial launch.

Can you use a Gemma abliterated model through an API?

Not from the providers in this directory at the time of writing. None of them lists a Gemma abliterated model by name. Hosted abliterated models tend to be large mixture-of-experts models like GLM and DeepSeek, which are expensive to run yourself. Gemma is small enough that most people run it locally instead.

If what you need is an abliterated model behind an API, and Gemma itself isn’t a requirement, these are the options with published prices. Costs are for 1,000 turns of the roleplay chat turn workload used across this site (6,000 input and 300 output tokens per turn):

Hosted abliterated models in this directory, cheapest first. Cost per 1,000 turns of 6,000 input and 300 output tokens, at published USD rates before caching.
ProviderModelInput / output per 1MPer 1,000 roleplay turns
RefuselessDeepSeek V4.1 Flash 1017 Abliterated$0.12 / $0.45$0.855
RefuselessGLM 5.3 Flash Abliterated$0.12 / $0.50$0.87
RefuselessGLM 5.3 Abliterated$1.00 / $2.00$6.60
NanoGPTAbliterated Large Flash$1.00 / $2.00$6.60
UnalignedGLM-5.3 Abliterated$2.00 / $3.20$12.96
UncensoredLLMGLM-5.3 Abliterated$2.183 / $4.365$14.405
NanoGPTAbliterated Model Large V2$3.00 / $5.00$19.50

DeepSeek V4.1 Flash 1017 Abliterated on Refuseless is the cheapest here, at $0.855 per 1,000 roleplay turns. The list covers 4 providers: Refuseless, NanoGPT, Unaligned and UncensoredLLM. These models are much larger than Gemma 4 31B, so expect stronger long-context recall and reasoning than a local Gemma, at a per-token cost. The best abliterated models guide compares them on more than price.

A practical split: run a Gemma abliterated model locally while you write prompts and character cards, then move live traffic to a hosted model when you have real users. Ollama serves an OpenAI-compatible endpoint under /v1, and so do these providers, so the switch is a base URL, key and model ID change. The OpenAI-compatible API guide shows the code.

Checklist before you pick a Gemma abliterated model

  1. Pick the generation first. Gemma 4 has longer context, image input on every size and an Apache 2.0 license. Gemma 3 has more abliterated builds and quantizations to choose from.
  2. Confirm the base model. Check that the card links to an instruction-tuned (“-it”) checkpoint and note whether it was built from a QAT checkpoint.
  3. Check the method and version. Layerwise and single-direction builds behave differently, and some uploads have a v2. Prefer the newest version from an uploader you trust.
  4. Match the file to your memory. Use the tables above, avoid f16 tags unless you have the room, and leave space for the context you need.
  5. Start from Gemma’s sampling settings. Temperature 1.0, top_k 64 and top_p 0.95, then adjust on your own prompts.
  6. Read the license on the card. Gemma 3 derivatives carry the Gemma Terms of Use and its Prohibited Use Policy. Abliteration changes the model, not the law.

Frequently asked questions

What is Gemma abliterated?

It is one of Google’s open Gemma models with the refusal direction removed from its weights, so it declines far fewer requests while keeping Gemma’s knowledge and image input. The best-known builds come from huihui-ai and mlabonne on Hugging Face.

Is there a Gemma 4 abliterated model?

Yes. huihui-ai publishes Gemma 4 abliterated builds, including Huihui-gemma-4-26B-A4B-it-abliterated and a 31B v2, and packages them on Ollama as huihui_ai/gemma-4-abliterated with e2b, e4b, 26b and 31b tags.

Which Gemma 3 27B abliterated build should I use?

The two common choices are mlabonne/gemma-3-27b-it-abliterated, which uses a layerwise method, and the 27b tag of huihui-ai’s Ollama package. They behave differently, so compare both on your own prompts, ideally at the 12B size first if you are short on memory.

What GPU do I need for a Gemma 3 12B abliterated model?

At 4-bit quantization Gemma 3 12B needs about 8 GB, so a 12 GB GPU or a 16 GB Mac runs it with room for context. At f16, which some Ollama tags use by default, it needs about three times as much.

Does the Gemma license apply to abliterated models?

Yes. Gemma 3 abliterated builds are model derivatives under the Gemma Terms of Use, including its Prohibited Use Policy. Gemma 4 is Apache 2.0 licensed, so its abliterated builds carry Apache 2.0.

Can I call a Gemma abliterated model through an API?

None of the providers in this directory lists a Gemma abliterated model at the time of writing. They host larger GLM and DeepSeek abliterated models behind OpenAI-compatible APIs, which you can use instead if any abliterated model will do.

Sources

Prices and offers come from each provider’s published information, checked . They can change, so confirm them on the provider’s site. Found something out of date? Tell us.