Instructions to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP", filename="Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-Q4_K_M.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M # Run inference directly in the terminal: llama cli -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M # Run inference directly in the terminal: llama cli -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Use Docker
docker model run hf.co/HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP", "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/HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
- Ollama
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with Ollama:
ollama run hf.co/HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
- Unsloth Studio
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP to start chatting
- Pi
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with Docker Model Runner:
docker model run hf.co/HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
- Lemonade
How to use HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull HauhauCS/Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP:Q4_K_M
Run and chat with the model
lemonade run user.Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP-Q4_K_M
List all available models
lemonade list
initial commit
Browse files|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
mmproj-Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-BF16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
mtp-gemma-4-31B-it.gguf filter=lfs diff=lfs merge=lfs -text
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71667f9e601a4b914a98425c59150b731f6e15d260d661dbd1f1ee07469fc7db
|
| 3 |
+
size 18687062176
|
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
tags:
|
| 4 |
+
- uncensored
|
| 5 |
+
- gemma4
|
| 6 |
+
- gguf
|
| 7 |
+
- vision
|
| 8 |
+
- multimodal
|
| 9 |
+
- agentic
|
| 10 |
+
- coding
|
| 11 |
+
- creative-writing
|
| 12 |
+
- roleplay
|
| 13 |
+
- rp
|
| 14 |
+
- conversational
|
| 15 |
+
language:
|
| 16 |
+
- en
|
| 17 |
+
pipeline_tag: image-text-to-text
|
| 18 |
+
base_model: google/gemma-4-31B-it
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-MTP
|
| 22 |
+
|
| 23 |
+
> **[Join the Discord](https://discord.gg/SZ5vacTXYf)** for updates, roadmaps, projects, or just to chat.
|
| 24 |
+
|
| 25 |
+
Gemma4-31B (QAT) uncensored by HauhauCS. **0/465 Refusals***
|
| 26 |
+
|
| 27 |
+
## About
|
| 28 |
+
|
| 29 |
+
No changes to datasets or capabilities β fully functional, 100% of what the original authors intended, just without the refusals. Built from the official QAT weights, so the 4-bit quant stays close to full-precision quality.
|
| 30 |
+
|
| 31 |
+
## Balanced
|
| 32 |
+
|
| 33 |
+
The **Balanced** variant (recommended β 99%+ of users will be happy here) uses optimized full uncensoring tuned especially for agentic coding, reasoning, creative writing and reliability-critical tasks. It reasons before answering and stays dependable and on-instruction. An **Aggressive** variant, for cases where Balanced still deflects too much, after current testing is not required.
|
| 34 |
+
|
| 35 |
+
## ~53% faster with MTP
|
| 36 |
+
|
| 37 |
+
Ships with an MTP (multi-token-prediction) draft head for **speculative decoding** β roughly **53% faster generation with identical output** (the model verifies every drafted token, so quality is unchanged β pure speed). This release is tuned to pair well with the included MTP head.
|
| 38 |
+
|
| 39 |
+
llama.cpp:
|
| 40 |
+
```bash
|
| 41 |
+
llama-server \
|
| 42 |
+
-m Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-Q4_K_M.gguf \
|
| 43 |
+
-md mtp-gemma-4-31B-it.gguf --spec-type draft-mtp \
|
| 44 |
+
-ngl 99 -fa on
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
**Note:** the MTP speedup was currently tested by me through **llama.cpp** (`llama-server` / `llama-cli`).
|
| 48 |
+
|
| 49 |
+
## Downloads
|
| 50 |
+
|
| 51 |
+
| File | Type | Size |
|
| 52 |
+
|------|------|------|
|
| 53 |
+
| `Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-Q4_K_M.gguf` | Q4_K_M (text) | 18.7 GB |
|
| 54 |
+
| `mmproj-Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-BF16.gguf` | mmproj (vision) | 1.2 GB |
|
| 55 |
+
| `mtp-gemma-4-31B-it.gguf` | MTP speculative drafter | 280 MB |
|
| 56 |
+
|
| 57 |
+
> **Why only Q4_K_M?** Gemma 4 is quantization-aware-trained for ~4-bit, so Q4_K_M is the sweet spot β higher-precision quants add size with no real quality gain. Carefully quantized for best quality at 4-bit.
|
| 58 |
+
|
| 59 |
+
## Vision
|
| 60 |
+
|
| 61 |
+
Load the mmproj alongside the model for image input:
|
| 62 |
+
```bash
|
| 63 |
+
llama-server -m Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-Q4_K_M.gguf \
|
| 64 |
+
--mmproj mmproj-Gemma4-31B-QAT-Uncensored-HauhauCS-Balanced-BF16.gguf -ngl 99 -fa on
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
## Recommended sampling
|
| 68 |
+
|
| 69 |
+
These are dialed in specifically for this HauhauCS build β use them for the intended behaviour and quality:
|
| 70 |
+
|
| 71 |
+
- `temperature 0.6`
|
| 72 |
+
- `top_k 64`
|
| 73 |
+
- `top_p 0.9`
|
| 74 |
+
- `min_p 0.05`
|
| 75 |
+
- `repeat_penalty 1.1`
|
| 76 |
+
|
| 77 |
+
This release is tuned end-to-end as its own thing; the settings above are part of that and aren't the stock Gemma defaults.
|
| 78 |
+
|
| 79 |
+
## Specs
|
| 80 |
+
|
| 81 |
+
- 31B dense Β· 256K (262144) context
|
| 82 |
+
- Vision (image input) via mmproj
|
| 83 |
+
- Based on [Gemma 4 31B](https://huggingface.co/google/gemma-4-31B-it) by Google DeepMind
|
| 84 |
+
|
| 85 |
+
## Compatibility
|
| 86 |
+
|
| 87 |
+
- Works with llama.cpp, LM Studio, Jan, koboldcpp, and other GGUF runtimes.
|
| 88 |
+
- **Multi-GPU + LM Studio:** I've personally noticed Gemma 4 can crash under LM Studio's *tensor-split* mode β use a single GPU (layer-split or priority order) for this model.
|
| 89 |
+
|
| 90 |
+
## Acknowledgements
|
| 91 |
+
|
| 92 |
+
- **Google DeepMind** β Gemma 4.
|
| 93 |
+
- The included `mtp-gemma-4-31B-it.gguf` speculative draft head comes from **Unsloth**'s Gemma 4 release β many thanks to the Unsloth team for it.
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
\* _Tested with both automated and manual refusal benchmarks β none have been found in standard use. A small number of edge-case prompts deflect on the first ask but comply on a re-ask or strategic framing. If you hit one that's actually obstructive to your use case, [join the Discord](https://discord.gg/SZ5vacTXYf) and flag it so I can work on it in a future revision._
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7bef0d0fb3e85fc2941ec5f1c375febf3742645f158132a43ced557093aea841
|
| 3 |
+
size 1200726016
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b5c4e583fc5982439080114bbc1b7edaec361f9d4c9193d6bed606a3de401b62
|
| 3 |
+
size 279954368
|