Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

supergemma4b-mlx

Run Jiunsong/supergemma4-e4b-abliterated-mlx locally on Apple Silicon with mlx-lm, and use it from pi via a local OpenAI-compatible endpoint.

1. Setup

Prerequisites

  • Apple Silicon Mac
  • Python 3.10+
  • internet access for the first model download

Install

python3 -m venv .venv
source .venv/bin/activate
pip install -U pip mlx-lm

Start the server

./start.sh

This 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 8

The first run will automatically download and cache the model from Hugging Face.

Check that it is up

curl http://127.0.0.1:7860/v1/models

1.5 Add it to pi

Add 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-mlx

2. Supported hardware

Supported:

  • 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

3. Minimum / recommended specs

Minimum

  • Apple Silicon Mac
  • 16 GB unified memory
  • ~10 GB free disk space for model cache + environment

Recommended

  • 24 GB+ unified memory
  • 20+ GB free disk space
  • M2 Pro / M3 Pro / M4 Pro or better for a smoother experience

Best 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

4. Credits

Model creator / release:

Original source release line:

Upstream base model:

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages