Views
No views yet
google/gemma-4-12B-it
converted to MLX for Apple Silicon and quantized to 8-bit
(group size 64, ~8.5 bits per weight, ~12 GB on disk). It is the near-lossless companion to the
full-precision jedisct1/gemma-4-12B-it-txt-mlx.gemma4_unified any-to-any model: text, vision and audio in, text out. This
conversion keeps the language model only — the vision and audio towers are dropped, which is why the
name carries a txt marker. If you need image or audio understanding, use the original model with a
multimodal runtime. If you want a fast, local, text-and-tool-calling model that runs on stock
mlx_lm, this is it.mlx_lm CLI and server — nothing custom to install.<|tool_call>call:name{arg:<|"|>value<|"|>}<tool_call|>); mlx_lm's built-in gemma4 tool
parser turns that back into standard OpenAI tool_calls JSON, so OpenAI-compatible clients work
out of the box.mlx_lm turns it on by default for this model; see below if
you want it off.1mlx_lm.generate --model jedisct1/gemma-4-12B-it-txt-mlx-8bit \
2 --prompt "Explain the Monty Hall problem in three sentences." --temp 0.01from mlx_lm import load, generate
2
3model, tokenizer = load("jedisct1/gemma-4-12B-it-txt-mlx-8bit")
4messages = [{"role": "user", "content": "Write a haiku about pointers."}]
5prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
6print(generate(model, tokenizer, prompt=prompt, max_tokens=256))mlx_lm.server --model jedisct1/gemma-4-12B-it-txt-mlx-8bit --port 8080tools array; the response comes back with
finish_reason: "tool_calls" and a normal tool_calls list:1curl http://127.0.0.1:8080/v1/chat/completions -H 'Content-Type: application/json' -d '{
2 "model": "jedisct1/gemma-4-12B-it-txt-mlx-8bit",
3 "messages": [{"role": "user", "content": "What is the weather in Paris in celsius?"}],
4 "tools": [{"type": "function", "function": {
5 "name": "get_weather",
6 "description": "Get the current weather for a city.",
7 "parameters": {"type": "object",
8 "properties": {"city": {"type": "string"}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}},
9 "required": ["city"]}}}],
10 "temperature": 0.0
11}'temperature 0.0 — greedy decoding is markedly more reliable for tool arguments and
code than the model's creative defaults (temperature 1.0, top_k 64, top_p 0.95).mlx_lm enables Gemma 4's thinking channel by default. To turn it off:mlx_lm.server --model jedisct1/gemma-4-12B-it-txt-mlx-8bit --chat-template-args '{"enable_thinking": false}'--chat-template-config '{"enable_thinking": false}' with mlx_lm.generate. Tool calling is
correct either way.mlx_lm:1mlx_lm.generate \
2 --model jedisct1/gemma-4-12B-it-txt-mlx-8bit \
3 --draft-model jedisct1/gemma-4-E2B-it-txt-mlx-4bit \
4 --num-draft-tokens 4 \
5 --prompt "Explain speculative decoding in two sentences." --temp 0.0--num-draft-tokens 3–4 and keep it only if it's faster on your machine. Output and tool calls are
unchanged. Drafts: gemma-4-E2B-it-txt-mlx-4bit,
gemma-4-E2B-it-txt-mlx-8bit.google/gemma-4-12B-it.mlx_lm.convert, mlx_lm 0.31.3 / mlx 0.31.2.vision_embedder, embed_vision, embed_audio) were removed; only the
language model is kept. model_type set to gemma4.