Image-Text-to-Text
Transformers
Safetensors
PyTorch
English
gemma4
text-generation-inference
uncensored
abliterated
unfiltered
unredacted
refusal-ablated
vllm
bf16
max
alignment-modified
reasoning
agent
conversational
Eval Results (legacy)
Instructions to use prithivMLmods/gemma-4-31B-it-Uncensored-MAX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/gemma-4-31B-it-Uncensored-MAX with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/gemma-4-31B-it-Uncensored-MAX") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("prithivMLmods/gemma-4-31B-it-Uncensored-MAX") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/gemma-4-31B-it-Uncensored-MAX") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prithivMLmods/gemma-4-31B-it-Uncensored-MAX with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/gemma-4-31B-it-Uncensored-MAX" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/gemma-4-31B-it-Uncensored-MAX", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/gemma-4-31B-it-Uncensored-MAX
- SGLang
How to use prithivMLmods/gemma-4-31B-it-Uncensored-MAX with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/gemma-4-31B-it-Uncensored-MAX" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/gemma-4-31B-it-Uncensored-MAX", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/gemma-4-31B-it-Uncensored-MAX" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/gemma-4-31B-it-Uncensored-MAX", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use prithivMLmods/gemma-4-31B-it-Uncensored-MAX with Docker Model Runner:
docker model run hf.co/prithivMLmods/gemma-4-31B-it-Uncensored-MAX
Update README.md
Browse files
README.md
CHANGED
|
@@ -33,12 +33,13 @@ model-index:
|
|
| 33 |
|
| 34 |

|
| 35 |
|
|
|
|
| 36 |
# **gemma-4-31B-it-Uncensored-MAX**
|
| 37 |
|
| 38 |
-
> **gemma-4-31B-it-Uncensored-MAX** is an
|
| 39 |
|
| 40 |
> [!IMPORTANT]
|
| 41 |
-
> This model is
|
| 42 |
|
| 43 |
---
|
| 44 |
|
|
@@ -46,33 +47,48 @@ model-index:
|
|
| 46 |
|
| 47 |

|
| 48 |
|
| 49 |
-
> Note: The
|
| 50 |
|
| 51 |
---
|
| 52 |
|
| 53 |
## Key Highlights
|
| 54 |
|
| 55 |
-
* **
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
* **
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
---
|
| 62 |
|
| 63 |
-
# Base Model Signatures:
|
| 64 |
|
| 65 |
-
This model has been re-sharded and optimized for the latest Transformers version from the base model:
|
|
|
|
| 66 |
|
| 67 |
---
|
| 68 |
|
| 69 |
## Quick Start with Transformers
|
| 70 |
|
| 71 |
-
```
|
| 72 |
-
pip install transformers==5.5.3
|
|
|
|
|
|
|
| 73 |
```
|
| 74 |
|
| 75 |
-
```python
|
| 76 |
from transformers import Gemma4ForConditionalGeneration, AutoProcessor
|
| 77 |
import torch
|
| 78 |
|
|
@@ -96,7 +112,9 @@ messages = [
|
|
| 96 |
]
|
| 97 |
|
| 98 |
text = processor.apply_chat_template(
|
| 99 |
-
messages,
|
|
|
|
|
|
|
| 100 |
)
|
| 101 |
|
| 102 |
inputs = processor(
|
|
@@ -120,24 +138,36 @@ output_text = processor.batch_decode(
|
|
| 120 |
print(output_text)
|
| 121 |
```
|
| 122 |
|
|
|
|
|
|
|
| 123 |
## Intended Use
|
| 124 |
|
| 125 |
-
* **
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
* **
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
## Limitations & Risks
|
| 131 |
|
| 132 |
-
> **Important Note**: This model
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
-
* **
|
| 135 |
-
|
| 136 |
-
* **Compute Requirements**: A **31B model** requires significant GPU memory or optimized inference strategies such as quantization or tensor parallelism.
|
| 137 |
|
| 138 |
-
|
|
|
|
| 139 |
|
| 140 |
-
* **
|
| 141 |
-
|
| 142 |
-
* **Remove Refusals with Transformers** (a proof-of-concept implementation to remove refusals from an LLM without using TransformerLens) – by [Sumandora](https://github.com/Sumandora/remove-refusals-with-transformers)
|
| 143 |
-
* **[LLM-LAT/harmful-dataset](https://huggingface.co/datasets/LLM-LAT/harmful-dataset)** – by [LLM Latent Adversarial Training](https://huggingface.co/LLM-LAT)
|
|
|
|
| 33 |
|
| 34 |

|
| 35 |
|
| 36 |
+
|
| 37 |
# **gemma-4-31B-it-Uncensored-MAX**
|
| 38 |
|
| 39 |
+
> **gemma-4-31B-it-Uncensored-MAX** is an optimized release built on top of **huihui-ai/Huihui-gemma-4-31B-it-abliterated**. This version focuses on **updated shard sizing, repository optimization, and compatibility improvements for the latest Transformers releases**, while preserving the reasoning and instruction-following strengths of the original Gemma architecture. The result is a powerful **31B parameter language model** designed for stable inference, efficient deployment, and modern ecosystem integration.
|
| 40 |
|
| 41 |
> [!IMPORTANT]
|
| 42 |
+
> This model is intended for research and learning purposes only. Any content generated by this model is used at the user's own risk. The authors and hosting page disclaim any liability for outputs produced by this model. Users are responsible for ensuring safe, ethical, and lawful usage.
|
| 43 |
|
| 44 |
---
|
| 45 |
|
|
|
|
| 47 |
|
| 48 |

|
| 49 |
|
| 50 |
+
> Note: The evaluation was conducted using 2,000 harmful test prompts to measure model refusal behavior. These results are self-reported and may vary depending on benchmark setup and evaluation strategy.
|
| 51 |
|
| 52 |
---
|
| 53 |
|
| 54 |
## Key Highlights
|
| 55 |
|
| 56 |
+
* **Latest Transformers Compatibility**
|
| 57 |
+
Re-sharded and optimized for improved compatibility with recent Transformers releases.
|
| 58 |
+
|
| 59 |
+
* **Optimized Model Sharding**
|
| 60 |
+
Updated shard structure for better storage handling, download reliability, and inference efficiency.
|
| 61 |
+
|
| 62 |
+
* **Stable Inference Pipeline**
|
| 63 |
+
Improved packaging for consistent loading and generation behavior.
|
| 64 |
+
|
| 65 |
+
* **31B Architecture**
|
| 66 |
+
Built on **gemma-4-31B-it**, providing strong reasoning and general language understanding capabilities.
|
| 67 |
+
|
| 68 |
+
* **Improved Deployment Stability**
|
| 69 |
+
Designed for smoother inference across different hardware configurations and runtimes.
|
| 70 |
+
|
| 71 |
+
* **Preserved Model Behavior**
|
| 72 |
+
No modifications to weights or architecture; behavior remains consistent with the base model lineage.
|
| 73 |
|
| 74 |
---
|
| 75 |
|
| 76 |
+
## Base Model Signatures:
|
| 77 |
|
| 78 |
+
This model has been re-sharded and optimized for the latest Transformers version from the base model:
|
| 79 |
+
https://huggingface.co/huihui-ai/Huihui-gemma-4-31B-it-abliterated
|
| 80 |
|
| 81 |
---
|
| 82 |
|
| 83 |
## Quick Start with Transformers
|
| 84 |
|
| 85 |
+
```bash id="g4p2lm"
|
| 86 |
+
pip install transformers==5.5.3
|
| 87 |
+
# or
|
| 88 |
+
pip install git+https://github.com/huggingface/transformers.git
|
| 89 |
```
|
| 90 |
|
| 91 |
+
```python id="c9v7qa"
|
| 92 |
from transformers import Gemma4ForConditionalGeneration, AutoProcessor
|
| 93 |
import torch
|
| 94 |
|
|
|
|
| 112 |
]
|
| 113 |
|
| 114 |
text = processor.apply_chat_template(
|
| 115 |
+
messages,
|
| 116 |
+
tokenize=False,
|
| 117 |
+
add_generation_prompt=True
|
| 118 |
)
|
| 119 |
|
| 120 |
inputs = processor(
|
|
|
|
| 138 |
print(output_text)
|
| 139 |
```
|
| 140 |
|
| 141 |
+
---
|
| 142 |
+
|
| 143 |
## Intended Use
|
| 144 |
|
| 145 |
+
* **Multimodal and Language Research**
|
| 146 |
+
Studying large-scale transformer behavior and inference characteristics.
|
| 147 |
+
|
| 148 |
+
* **Red-Teaming & Evaluation**
|
| 149 |
+
Testing robustness across challenging prompts and edge cases.
|
| 150 |
+
|
| 151 |
+
* **High-Performance Deployment**
|
| 152 |
+
Running large models on optimized GPU or distributed inference setups.
|
| 153 |
+
|
| 154 |
+
* **Research Prototyping**
|
| 155 |
+
Experimentation with scalable transformer architectures.
|
| 156 |
+
|
| 157 |
+
---
|
| 158 |
|
| 159 |
## Limitations & Risks
|
| 160 |
|
| 161 |
+
> **Important Note**: This model inherits the behavior and limitations of its base model.
|
| 162 |
+
|
| 163 |
+
* **Output Variability**
|
| 164 |
+
Responses may vary depending on sampling configuration and prompt structure.
|
| 165 |
|
| 166 |
+
* **Resource Requirements**
|
| 167 |
+
A 31B model requires significant GPU memory or optimized inference strategies such as quantization or tensor parallelism.
|
|
|
|
| 168 |
|
| 169 |
+
* **Deployment Constraints**
|
| 170 |
+
Performance depends heavily on hardware configuration and runtime optimization.
|
| 171 |
|
| 172 |
+
* **General Model Limitations**
|
| 173 |
+
May produce incorrect, incomplete, or inconsistent outputs in complex scenarios.
|
|
|
|
|
|