Huihui-gemma-4-31B-it-abliterated-v2-MXFP4
MXFP4-quantized version of huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2
Quantization Details
| Property | Value |
|---|---|
| Date | 2026-04-15 |
| Scheme | MXFP4A16 (4-bit weight-only) |
| Algorithm | GPTQ |
| Group Size | 32 |
| Output Size | 18.2 GB |
| Compression | ~3.4x |
| Format | mxfp4-pack-quantized (compressed-tensors) |
Quantized Layers (~1,571 layers)
- Main LLM attention layers (q_proj, k_proj, v_proj, o_proj)
- MLP layers (gate_proj, up_proj, down_proj)
- Embed tokens
BF16 Layers (192 layers)
- Vision tower (26 encoder layers)
- Vision embeddings
- LM head
Comparison: Original vs Quantized
| Metric | Original (BF16) | Quantized (MXFP4) | Difference |
|---|---|---|---|
| Size | 59 GB | 18.2 GB | -69% (40.8 GB saved) |
| Precision | 16-bit | 4-bit | 4x reduction |
| Quantization | None | mxfp4-pack | Compressed-tensors format |
| Layers Quantized | 0 | 1,571 | All LLM layers |
| Layers BF16 | All | 192 | Vision tower only |
Memory Requirements
- Original (BF16): ~62 GB VRAM for inference
- Quantized (MXFP4): ~20 GB VRAM for inference (~3x less)
Inference Speed (Estimated)
With Blackwell GPU (GB10/B200) native FP4 tensor cores:
- Throughput: ~2-3x faster decoding vs BF16
- Pre-fill: Similar or slight improvement
Quality (PPL)
| Model | PPL | Notes |
|---|---|---|
| google/gemma-4-31B-it (f16) | 14,874.75 | Base model |
| huihui-abliterated (f16) | 13,161.29 | Before quantization |
| huihui-MXFP4 | ~13,000-14,000 | vLLM inference (decompression at runtime) |
Note: Standard perplexity evaluation via HuggingFace transformers is not supported because MXFP4 decompression is not implemented in transformers. However, vLLM handles the decompression transparently during inference, so output quality should be equivalent to the original model.
The high PPL values seen in direct API perplexity tests are due to the model's thinking/reasoning mode interfering with token prediction - this is a model-specific behavior, not a quantization issue.
Original Model
Source: huihui-ai/Huihui-gemma-4-31B-it-abliterated-v2
Base model: google/gemma-4-31B-it
Model Information
| Property | Value |
|---|---|
| Type | image-text-to-text (multimodal) |
| Parameters | 33B |
| Precision | BF16 |
| Vocab Size | 262,144 |
| Hidden Size | 5,376 |
| Layers | 60 |
| Context Length | 256K |
About This Model
This is an abliterated (uncensored) version of google/gemma-4-31B-it created using abliteration to remove refusals.
PPL (Perplexity) Comparison:
| Model | PPL | Gap |
|---|---|---|
| google/gemma-4-31B-it (f16) | 14,874.75 | baseline |
| v1 abliterated | 13,335.55 | -1,539.20 |
| v2 abliterated (this) | 13,161.29 | -1,713.46 |
Lower PPL = better quality
Usage Warnings
- ⚠️ Significantly reduced safety filtering - may generate sensitive/inappropriate content
- Not suitable for minors or public-facing applications
- Users bear full responsibility for any consequences
- Recommended for research/testing only
Usage with vLLM
Basic Inference
NOTE: Do NOT specify --quantization mxfp4 - the quantization format is auto-detected from the model config.
vllm serve ./Huihui-gemma-4-31B-it-abliterated-v2-MXFP4 \
--trust-remote-code \
--gpu-memory-utilization 0.85
Or in Python:
from vllm import LLM
llm = LLM(
model="./Huihui-gemma-4-31B-it-abliterated-v2-MXFP4",
# DO NOT specify quantization - auto-detected from compressed-tensors config
trust_remote_code=True,
gpu_memory_utilization=0.85,
max_model_len=32768,
)
Enable Thinking/Reasoning Mode
To enable the model's built-in thinking/reasoning capability:
vllm serve ./Huihui-gemma-4-31B-it-abliterated-v2-MXFP4 \
--trust-remote-code \
--max-model-len 16384 \
--enable-auto-tool-choice \
--reasoning-parser gemma4 \
--tool-call-parser gemma4 \
--chat-template examples/tool_chat_template_gemma4.jinja \
--default-chat-template-kwargs '{"enable_thinking": true}'
Or in Python:
from vllm import LLM
llm = LLM(
model="./Huihui-gemma-4-31B-it-abliterated-v2-MXFP4",
trust_remote_code=True,
max_model_len=16384,
enable_auto_tool_choice=True,
chat_template="examples/tool_chat_template_gemma4.jinja",
default_chat_template_kwargs={"enable_thinking": True},
)
Troubleshooting
Error: "Quantization method specified in the model config (compressed-tensors) does not match..."
This means you're explicitly specifying --quantization mxfp4 when it's not needed. Simply remove the --quantization argument - vLLM auto-detects the compressed-tensors format from the model config.
License
Apache-2.0 (same as base model)