How to use from
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 SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
# Run inference directly in the terminal:
llama cli -hf SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
# Run inference directly in the terminal:
llama cli -hf SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
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 SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
# Run inference directly in the terminal:
./llama-cli -hf SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
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 SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
# Run inference directly in the terminal:
./build/bin/llama-cli -hf SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
Use Docker
docker model run hf.co/SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF:
Quick Links

⚡ Gemma 4 31B Heretic QAT — Extreme Quantization for 16GB VRAM

Heretic QAT · Q2_K + Q8_0 Embedding · 11.4 GB · Fits 16GB VRAM

📖 中文文档

Q2_K_L 31B Dense Heretic Uncensored 11.4 GB QAT Weights ⚠️ 16GB VRAM

Extreme quantization of coder3101/heretic-QAT using Unsloth's Q2_K_L recipe (Q2_K body + Q8_0 embedding/output). Compresses the 31B dense model to 11.4 GB, enabling it to run on 16GB VRAM consumer GPUs.

⚠️ Extreme Quantization Warning — Please Read

This quantization uses Q2_K (~2.9 BPW body) to compress the 31B model to 11.4 GB. This is an extreme solution for running 31B on 16GB VRAM, with known limitations:

  • Repetition loops — Model may get stuck outputting the same token or phrase repeatedly
  • Inaccurate arithmetic — Multi-digit math calculations are unreliable
  • Degraded complex reasoning — Multi-step logic, math proofs significantly worse than higher precision
  • Possible hallucinations — Factual QA accuracy is reduced

Suitable for (low-stakes tasks):

  • Creative writing, story generation, brainstorming
  • Casual conversation, chat, roleplay
  • Code assistance (simple functions, code explanation, comment generation)
  • Text summarization, translation, format conversion
  • Non-precise general knowledge Q&A, concept explanation

Not recommended for: Math, precise reasoning, fact-checking, production use, or any task requiring strict output accuracy.

✂️ Heretic ARA Abliteration Parameters

Base: coder3101/gemma-4-31B-it-qat-q4_0-unquantized-heretic · Heretic v1.2.0 · ARA + Row-Norm

Parameter Value
start_layer_index15
end_layer_index39
preserve_good_behavior_weight0.6649
steer_bad_behavior_weight0.0001
overcorrect_relative_weight1.0818
neighbor_count15
Metric Heretic Original QAT
KL Divergence0.05640 (by definition)
Refusals11/10099/100
🏗️ Architecture
Base Modelgoogle/gemma-4-31B-it
Parameters30.7B (dense, all parameters active)
ArchitectureHybrid: Gated DeltaNet linear attention + Softmax global attention (3:1 alternating)
Layers60
Context Length256K tokens (supported by this quantization)
Vocabulary262K, 140+ languages
ModalitiesText + Image (native multimodal)
QAT TrainingGoogle official QAT (quantization-aware), weights inherently robust to quantization
QuantizationQ2_K_L (Q2_K body + Q8_0 embedding/output), b9553 llama-quantize
⚙️ Recommended Sampling Parameters

Thinking mode (default):

Generaltemp=1.0, top_p=0.95, top_k=64
Codingtemp=0.6, top_p=0.95, top_k=64

Use --jinja flag with llama.cpp. Disable thinking: --chat-template-kwargs '{"enable_thinking":false}'.

📝 Usage

Compatible with llama.cpp, LM Studio, Jan, koboldcpp, and other GGUF runtimes. Use --jinja flag and -ngl 99 for GPU offload.

llama-cli -m gemma-4-31B-it-heretic-QAT-Q2_K_L.gguf \
  --jinja -ngl 99 -c 4096 \
  --repeat-penalty 1.3
📊 Quantization Details
FormatQ2_K_L (Unsloth recipe: Q2_K + Q8_0 embedding + Q8_0 output)
File Size11.4 GB
Effective BPW~3.16 (body ~2.9 + embedding/output ~8.0)
Toolllama-quantize (b9553, CUDA 13.3)
SourceF16 GGUF (converted from QAT heretic safetensors)
Context Length256K (set in GGUF metadata)
QAT AdvantageQAT weights significantly outperform regular BF16 at Q4_0; advantage diminishes but persists at Q2 level
🔗 Credits

Heretic Abliteration: coder3101 · Heretic v1.2.0 ARA + Row-Norm
QAT Weights: Google Gemma 4 QAT
Quantization Recipe: Unsloth Q2_K_L (Q2_K + Q8_0 embedding/output)
Quantization Tool: llama.cpp b9553 · GitHub
Original Model: Google Gemma 4 31B IT

Downloads last month
526
GGUF
Model size
31B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF

Collection including SC117/gemma-4-31B-it-heretic-QAT-For-Edge-16G-GGUF