--- 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: - google/gemma-4-31B-it --- π¨β οΈ I HAVE REACHED HUGGING FACE'S FREE STORAGE LIMIT β οΈπ¨ I can no longer upload new models unless I can cover the cost of additional storage. I host 70+ free models as an independent contributor and this work is unpaid. Without your support, no more new models can be uploaded. π Patreon (Monthly) | β Ko-fi (One-time) Every contribution goes directly toward Hugging Face storage fees to keep models free for everyone. --- ### **90% fewer refusals** (10/100 Uncensored vs 99/100 Original) while preserving model quality (0.0541 KL divergence). ## β€οΈ Support My Work Creating these models takes significant time, work and compute. If you find them useful consider supporting me:  | Platform | Link | What you get | |----------|------|--------------| | π Patreon | [Monthly support](https://patreon.com/LLMfan46) | Priority model requests | | β Ko-fi | [One-time tip](https://ko-fi.com/llmfan46) | My 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. ----- # This is a decensored version of [google/gemma-4-31B-it](https://huggingface.co/google/gemma-4-31B-it), made using [Heretic](https://github.com/p-e-w/heretic) v1.2.0 with the [Arbitrary-Rank Ablation (ARA)](https://github.com/p-e-w/heretic/pull/211) method ## Abliteration parameters | Parameter | Value | | :-------- | :---: | | **start_layer_index** | 30 | | **end_layer_index** | 48 | | **preserve_good_behavior_weight** | 0.5437 | | **steer_bad_behavior_weight** | 0.0005 | | **overcorrect_relative_weight** | 0.9949 | | **neighbor_count** | 15 | ## Targeted components * attn.o_proj ## Performance | Metric | This model | Original model ([gemma-4-31B-it](https://huggingface.co/google/gemma-4-31B-it)) | | :----- | :--------: | :---------------------------: | | **KL divergence** | 0.0541 | 0 *(by definition)* | | **Refusals** | β
10/100 | β 99/100 | 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. ## MMLU test results: Original: ============================================================ - Total questions: 7021 - Correct: 6073 - **Accuracy: 0.8650 (86.50%)** - Parse failures: 52 ============================================================ **Tested subject scores:** - professional_law: 0.7682 (603/785) - moral_scenarios: 0.8348 (369/442) - miscellaneous: 0.9243 (354/383) - professional_psychology: 0.9051 (286/316) - high_school_psychology: 0.9630 (260/270) - high_school_macroeconomics: 0.9289 (183/197) - elementary_mathematics: 0.9348 (172/184) - moral_disputes: 0.8448 (147/174) - prehistory: 0.9360 (161/172) - philosophy: 0.8491 (135/159) - high_school_biology: 0.9539 (145/152) - professional_accounting: 0.8392 (120/143) - clinical_knowledge: 0.9143 (128/140) - high_school_microeconomics: 0.9706 (132/136) - nutrition: 0.9259 (125/135) - professional_medicine: 0.9328 (125/134) - conceptual_physics: 0.9219 (118/128) - high_school_mathematics: 0.5354 (68/127) - human_aging: 0.8448 (98/116) - security_studies: 0.8750 (98/112) - high_school_statistics: 0.8739 (97/111) - marketing: 0.9725 (106/109) - high_school_world_history: 0.9528 (101/106) - sociology: 0.8932 (92/103) - high_school_government_and_politics: 0.9703 (98/101) - high_school_geography: 0.9293 (92/99) - high_school_chemistry: 0.7732 (75/97) - high_school_us_history: 0.9368 (89/95) - virology: 0.5169 (46/89) - college_medicine: 0.8523 (75/88) - world_religions: 0.9205 (81/88) - high_school_physics: 0.7976 (67/84) - electrical_engineering: 0.8642 (70/81) - astronomy: 0.9494 (75/79) - logical_fallacies: 0.8816 (67/76) - high_school_european_history: 0.9041 (66/73) - anatomy: 0.8732 (62/71) - college_biology: 0.9688 (62/64) - human_sexuality: 0.9219 (59/64) - formal_logic: 0.7969 (51/64) - public_relations: 0.7377 (45/61) - international_law: 0.9167 (55/60) - college_physics: 0.6842 (39/57) - college_mathematics: 0.7455 (41/55) - econometrics: 0.7963 (43/54) - jurisprudence: 0.8679 (46/53) - high_school_computer_science: 0.9808 (51/52) - machine_learning: 0.8462 (44/52) - medical_genetics: 0.9608 (49/51) - global_facts: 0.6078 (31/51) - management: 0.9200 (46/50) - us_foreign_policy: 0.9200 (46/50) - college_chemistry: 0.5745 (27/47) - abstract_algebra: 0.7660 (36/47) - business_ethics: 0.8261 (38/46) - college_computer_science: 0.9333 (42/45) - computer_security: 0.8372 (36/43) Heretic: ============================================================ - Total questions: 7021 - Correct: 6031 - **Accuracy: 0.8590 (85.90%)** - Parse failures: 37 ============================================================ **Tested subject scores:** - professional_law: 0.7490 (588/785) - moral_scenarios: 0.8281 (366/442) - miscellaneous: 0.9243 (354/383) - professional_psychology: 0.8861 (280/316) - high_school_psychology: 0.9667 (261/270) - high_school_macroeconomics: 0.9188 (181/197) - elementary_mathematics: 0.9511 (175/184) - moral_disputes: 0.8563 (149/174) - prehistory: 0.9360 (161/172) - philosophy: 0.8365 (133/159) - high_school_biology: 0.9539 (145/152) - professional_accounting: 0.8182 (117/143) - clinical_knowledge: 0.9214 (129/140) - high_school_microeconomics: 0.9632 (131/136) - nutrition: 0.9037 (122/135) - professional_medicine: 0.9254 (124/134) - conceptual_physics: 0.8984 (115/128) - high_school_mathematics: 0.5276 (67/127) - human_aging: 0.8448 (98/116) - security_studies: 0.8482 (95/112) - high_school_statistics: 0.8739 (97/111) - marketing: 0.9725 (106/109) - high_school_world_history: 0.9717 (103/106) - sociology: 0.9029 (93/103) - high_school_government_and_politics: 0.9505 (96/101) - high_school_geography: 0.9293 (92/99) - high_school_chemistry: 0.7835 (76/97) - high_school_us_history: 0.9263 (88/95) - virology: 0.5056 (45/89) - college_medicine: 0.8523 (75/88) - world_religions: 0.9318 (82/88) - high_school_physics: 0.7976 (67/84) - electrical_engineering: 0.8519 (69/81) - astronomy: 0.9494 (75/79) - logical_fallacies: 0.9079 (69/76) - high_school_european_history: 0.8767 (64/73) - anatomy: 0.8732 (62/71) - college_biology: 0.9688 (62/64) - human_sexuality: 0.8906 (57/64) - formal_logic: 0.7969 (51/64) - public_relations: 0.7541 (46/61) - international_law: 0.9167 (55/60) - college_physics: 0.7018 (40/57) - college_mathematics: 0.7455 (41/55) - econometrics: 0.7778 (42/54) - jurisprudence: 0.8491 (45/53) - high_school_computer_science: 0.9808 (51/52) - machine_learning: 0.7692 (40/52) - medical_genetics: 0.9412 (48/51) - global_facts: 0.6078 (31/51) - management: 0.9200 (46/50) - us_foreign_policy: 0.9200 (46/50) - college_chemistry: 0.5745 (27/47) - abstract_algebra: 0.7660 (36/47) - business_ethics: 0.8478 (39/46) - college_computer_science: 0.9333 (42/45) - computer_security: 0.8372 (36/43) MMLU - Massive Multitask Language Understanding, multiple-choice questions across 57 subjects (math, history, law, medicine, etc.). ## GGUF Version GGUF quantizations available here [llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF](https://huggingface.co/llmfan46/gemma-4-31B-it-uncensored-heretic-GGUF). ## NVFP4 Version NVFP4 quantizarion available here [llmfan46/gemma-4-31B-it-uncensored-heretic-NVFP4](https://huggingface.co/llmfan46/gemma-4-31B-it-uncensored-heretic-NVFP4). ## NVFP4 GGUF Version NVFP4 GGUF quantizarions available here [llmfan46/gemma-4-31B-it-uncensored-heretic-NVFP4-GGUF](https://huggingface.co/llmfan46/gemma-4-31B-it-uncensored-heretic-NVFP4-GGUF). ----- Hugging Face | GitHub | Launch Blog | Documentation License : Apache 2.0 | Authors : Google DeepMind 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 | Property | E2B | E4B | 31B Dense | | :---- | :---- | :---- | :---- | | **Total Parameters** | 2.3B effective (5.1B with embeddings) | 4.5B effective (8B with embeddings) | 30.7B | | **Layers** | 35 | 42 | 60 | | **Sliding Window** | 512 tokens | 512 tokens | 1024 tokens | | **Context Length** | 128K tokens | 128K tokens | 256K tokens | | **Vocabulary Size** | 262K | 262K | 262K | | **Supported Modalities** | Text, Image, Audio | Text, Image, Audio | Text, Image | | **Vision Encoder Parameters** | *~150M* | *~150M* | *~550M* | | **Audio Encoder Parameters** | *~300M* | *~300M* | No 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 | Property | 26B...