gemma-4
Collection
in mxfp4, mxfp8, and Deckard(qx) • 28 items • Updated • 2
How to use nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx with MLX:
# Make sure mlx-vlm is installed
# pip install --upgrade mlx-vlm
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_config
# Load the model
model, processor = load("nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx")
config = load_config("nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx")
# Prepare input
image = ["http://images.cocodataset.org/val2017/000000039769.jpg"]
prompt = "Describe this image."
# Apply chat template
formatted_prompt = apply_chat_template(
processor, config, prompt, num_images=1
)
# Generate output
output = generate(model, processor, formatted_prompt, image)
print(output)How to use nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx with Pi:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx"
# 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": "nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx"
}
]
}
}
}# Start Pi in your project directory: pi
How to use nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx with Hermes Agent:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx"
# 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 nightmedia/gemma-4-31B-it-Claude-Opus-Distill-v2-mxfp8-mlx
hermes
Brainwaves
arc arc/e boolq hswag obkqa piqa wino
mxfp8 0.532,0.667,0.900,0.694,0.384,0.765,0.676
Perplexity Peak memory Tokens/sec
mxfp8 11.160 ± 0.124 39.69 GB 170
Previous version
mxfp8 0.540,0.708,0.891,0.733,0.434,0.788,0.686
Perplexity Peak memory Tokens/sec
mxfp8 32.665 ± 0.472 39.54 GB 146
Base model
gemma-4-31B-it
qx86-hi 0.496,0.653,0.901,0.624,0.380,0.732,0.653
Previous model
gemma-3-27b-it-heretic
q8 0.557,0.711,0.868,0.533,0.452,0.706,0.695
Similar models
arc arc/e boolq hswag obkqa piqa wino
DavidAU/gemma-4-31B-it-Mystery-Fine-Tune-HERETIC-UNCENSORED-Thinking
Instruct
mxfp8 0.583,0.747,0.894,0.734,0.430,0.787,0.719
DavidAU/gemma-4-31B-it-The-DECKARD-HERETIC-UNCENSORED-Thinking
qx86-hi 0.431,0.505,0.426,0.670,0.376,0.766,0.710
8-bit