Downloads · 30 days
67
8% of all-time downloads
nypswift/gemma-4-12b-coder-mlx-4bit
gemma-4-12b-coder-mlx-4bit is a text generation model from nypswift. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as apache-2.0.
Added a Jinja chat template so the model can format conversations correctly and work smoothly with mlx-lm chat-style inference.
Downloads · 30 days
67
8% of all-time downloads
All-time downloads
877
Public
Parameters
11.9B
13.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.7 GB · 100%
How the weights are stored.
U3211.9B · 100%
From the Hugging Face model README
Added a Jinja chat template so the model can format conversations correctly and work smoothly with mlx-lm chat-style inference.
This repository contains an 4-bit MLX-converted version of yuxinlu1/gemma-4-12B-coder-fable5-composer2.5-v1.
The model has been quantized to 4-bit to dramatically reduce memory requirements while retaining near-lossless reasoning and coding capabilities. It is optimized for local inference on Apple Silicon Macs using the mlx-lm library.
Install the required dependency:
pip install --upgrade mlx-lm
Run inference from Python:
from mlx_lm import load, generate
# Load the 8-bit quantized MLX model.
model, tokenizer = load("mlx-community/gemma-4-12b-coder-fable5-composer2.5-4bit")
prompt = "Write a Python script to sort a dictionary by its values."
messages = [{"role": "user", "content": prompt}]
formatted_prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
response = generate(
model,
tokenizer,
prompt=formatted_prompt,
verbose=True,
max_tokens=1024,
)
response = generate(
model,
tokenizer,
prompt=formatted_prompt,
verbose=True,
max_tokens=1024,
temp=0.0,
)
google/gemma-4-12B-ityuxinlu1/gemma-4-12B-coder-fable5-composer2.5-v1Free to use, modify, and redistribute under the Apache 2.0 license.