Instructions to use divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text"
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 divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text
Run Hermes
hermes
- MLX LM
How to use divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text", "messages": [ {"role": "user", "content": "Hello"} ] }'
Gemma 4 12B IT — Abliterated — 4-bit MLX (text-only)
A text-only 4-bit MLX build of Gemma 4 12B (abliterated) that loads directly
under mlx_lm — the same way divinetribe/gemma-4-31b-it-abliterated-4bit-mlx does.
Why this exists
Google ships google/gemma-4-12B-it with model_type: gemma4_unified (text + vision +
audio in one checkpoint), while the 31B ships as plain model_type: gemma4. mlx_lm
has a gemma4 loader but no gemma4_unified loader, so every standard 12B MLX
build (including the 4-bit/8-bit/bf16 mlx-community ones) fails with:
ValueError: Model type gemma4_unified not supported.
Switching the loader to mlx_vlm then hangs, because it tries to spin up vision and
audio towers a text-only server never feeds.
This repo fixes that by stripping the multimodal towers (vision_embedder,
embed_vision, embed_audio, …) and relabeling model_type: gemma4, leaving only the
language_model.* tensors. The 4-bit abliterated weights are preserved byte-for-byte —
nothing is re-quantized. The result loads in plain mlx_lm like any text model.
Use
pip install mlx-lm
from mlx_lm import load, generate
model, tok = load("divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text")
print(generate(model, tok, prompt="Hello", max_tokens=128))
Or point an MLX server at it:
MLX_MODEL=divinetribe/gemma-4-12B-it-abliterated-4bit-mlx-text
Runs comfortably on a 32 GB Apple-Silicon Mac (≈7 GB weights, 4-bit).
Provenance
Derived from divinetribe/gemma-4-12B-it-abliterated-4bit-mlx — same abliteration,
text tower only. Base: google/gemma-4-12B-it.
- Downloads last month
- 445
4-bit