Run Jiunsong/supergemma4-e4b-abliterated-mlx locally on Apple Silicon with mlx-lm, and use it from pi via a local OpenAI-compatible endpoint.
- Apple Silicon Mac
- Python 3.10+
- internet access for the first model download
python3 -m venv .venv
source .venv/bin/activate
pip install -U pip mlx-lm./start.shThis runs:
python -m mlx_lm server \
--model Jiunsong/supergemma4-e4b-abliterated-mlx \
--host 127.0.0.1 \
--port 7860 \
--chat-template-args '{"enable_thinking": true}' \
--prompt-cache-size 8The first run will automatically download and cache the model from Hugging Face.
curl http://127.0.0.1:7860/v1/modelsAdd this to ~/.pi/agent/models.json:
{
"providers": {
"local-mlx": {
"baseUrl": "http://127.0.0.1:7860/v1",
"api": "openai-completions",
"apiKey": "local",
"compat": {
"supportsDeveloperRole": false,
"supportsReasoningEffort": false,
"maxTokensField": "max_tokens"
},
"models": [
{
"id": "Jiunsong/supergemma4-e4b-abliterated-mlx",
"name": "SuperGemma MLX Local",
"reasoning": true,
"input": ["text"],
"contextWindow": 128000,
"maxTokens": 8192,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
]
}
}
}Then run pi with:
pi --model local-mlx/Jiunsong/supergemma4-e4b-abliterated-mlxSupported:
- Apple Silicon Macs
- MacBook Air / Pro
- Mac mini
- iMac
- Mac Studio
- Mac Pro with Apple Silicon
In practice, this is for:
- M1 / M2 / M3 / M4 families
- unified memory systems
- MLX on macOS
- Apple Silicon Mac
- 16 GB unified memory
- ~10 GB free disk space for model cache + environment
- 24 GB+ unified memory
- 20+ GB free disk space
- M2 Pro / M3 Pro / M4 Pro or better for a smoother experience
- 32 GB+ unified memory
- Mac Studio or higher-end Apple Silicon laptop/desktop
- especially if you want longer pi sessions, tool use, and better responsiveness
Model creator / release:
Original source release line:
Upstream base model:
- Google Gemma 4 E4B IT: https://huggingface.co/google/gemma-4-E4B-it