gemma-4
Collection
in mxfp4, mxfp8, and Deckard(qx) • 28 items • Updated • 2
How to use nightmedia/gemma-4-26B-A4B-it-mxfp4-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-26B-A4B-it-mxfp4-mlx")
config = load_config("nightmedia/gemma-4-26B-A4B-it-mxfp4-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-26B-A4B-it-mxfp4-mlx with Pi:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "nightmedia/gemma-4-26B-A4B-it-mxfp4-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-26B-A4B-it-mxfp4-mlx"
}
]
}
}
}# Start Pi in your project directory: pi
How to use nightmedia/gemma-4-26B-A4B-it-mxfp4-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-26B-A4B-it-mxfp4-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-26B-A4B-it-mxfp4-mlx
hermes
Brainwaves
arc arc/e boolq hswag obkqa piqa wino
mxfp8 0.454,0.598,0.871,0.582,0.394,0.723,0.645
mxfp4 0.462,0.596,0.855,0.578,0.378,0.723,0.637
qx86-hi 0.472,0.605,0.873,0.565,0.386,0.712,0.644
qx64-hi 0.472,0.621,0.866,0.564,0.382,0.717,0.637
Perplexity Peak Memory Tokens/sec
mxfp8 103.904 ± 1.765 33.28 GB 880
mxfp4 123.621 ± 2.121 20.66 GB 1266
qx86-hi 75.542 ± 1.247 29.23 GB 1145
qx64-hi 98.161 ± 1.645 22.92 GB 1135
Based on this model
arc arc/e boolq hswag obkqa piqa wino
TeichAI/gemma-4-26B-A4B-it-Claude-Opus-Distill
qx86-hi 0.433,0.522,0.468,0.506,0.370,0.687,0.612
Instruct
qx86-hi 0.564,0.763,0.861,0.657,0.450,0.771,0.680
See parent model for instructions on install and use with Transformers.
Metrics will be available soon.
-G
4-bit