1.5× closer to the original BF16 model than lmstudio-community 4-bit (KL 0.048 vs 0.070), at the same 2.37 GB of language-model weights.
mlx_lm.generate --model nace-ai/Qwen3.5-4B-MLX \
--prompt "Hello" --max-tokens 2048
Orange diamonds: Nace (this repo). Grey markers: public MLX packs. Lower = closer to BF16.
This is an MLX pack for Apple silicon Macs, 3.1 GB of files. The inference examples below were tested on nace-ai/Qwen3.5-9B-MLX, not on this pack; this card swaps in its own repo name. The model thinks before it answers by default; each block below shows how to turn that off.
Kapitsa is Nace's engine for Qwen models on the Mac. It serves a chat page and OpenAI, Anthropic and Ollama APIs.
brew install nace-ai/tap/kapitsa
kapitsa pull nace-ai/Qwen3.5-4B-MLX
kapitsa serve --model nace-ai/Qwen3.5-4B-MLX --private
Open http://127.0.0.1:8000 to chat, or call the API. Thinking is on by default and comes back in reasoning_content:
curl -s http://127.0.0.1:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": "What is 17 * 23?"}],
"temperature": 1.0, "top_p": 0.95, "top_k": 20, "presence_penalty": 1.5
}'
Thinking off: add "reasoning_effort": "none" (or "chat_template_kwargs": {"enable_thinking": false}) and use the non-thinking settings:
curl -s http://127.0.0.1:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": "What is 17 * 23?"}],
"reasoning_effort": "none",
"temperature": 0.7, "top_p": 0.8, "top_k": 20, "presence_penalty": 1.5
}'
Images go in as OpenAI image_url parts, as an http(s) URL or a base64 data URL:
curl -s http://127.0.0.1:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"messages": [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://upload.wikimedia.org/wikipedia/commons/3/3a/Cat03.jpg"}},
{"type": "text", "text": "What is in this picture?"}
]}],
"reasoning_effort": "none"
}'
Kapitsa takes OpenAI tool definitions. A full round trip with the OpenAI SDK against kapitsa serve:
import json
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="none")
MODEL = "nace-ai/Qwen3.5-4B-MLX"
tools = [{"type": "function", "function": {
"name": "get_weather",
"description": "Current weather for a city",
"parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},
}}]
messages = [{"role": "user", "content": "What is the weather in Almaty right now?"}]
reply = client.chat.completions.create(model=MODEL, messages=messages, tools=tools)
call = reply.choices[0].message.tool_calls[0]
print("call:", call.function.name, call.function.arguments)
messages.append(reply.choices[0].message)
messages.append({"role": "tool", "tool_call_id": call.id,
"content": json.dumps({"city": "Almaty", "temp_c": 4, "sky": "clear"})})
final = client.chat.completions.create(model=MODEL, messages=messages, tools=tools)
print("answer:", final.choices[0].message.content)
From the Qwen/Qwen3.5-4B card:
| Mode | temperature | top_p | top_k | min_p | presence_penalty |
|---|---|---|---|---|---|
| Thinking | 1.0 | 0.95 | 20 | 0.0 | 1.5 |
| Thinking, precise coding | 0.6 | 0.95 | 20 | 0.0 | 0.0 |
| Thinking off | 0.7 | 0.8 | 20 | 0.0 | 1.5 |
Keep repetition_penalty at 1.0. Give answers room: up to 32,768 output tokens for most tasks with thinking on. A presence_penalty between 0 and 2 curbs endless repetition; high values can mix languages.
Qwen/Qwen3.5-4B in MLX Q4, quantized by Nace.AI: the same format as the lmstudio-community 4-bit pack and closer to the original model than that pack. It runs on Kapitsa, the local inference engine from Nace.AI for Apple silicon Macs.
Other sizes: Qwen3.5-9B, Qwen3.8-27B, Qwen3.6-35B-A3B, Qwen3.8-Flash-Next.
| Test | lmstudio-community pack | Nace (this repo) |
|---|---|---|
| KL from the bf16 model (lower is closer) | 0.070 | 0.048 |
| Agrees with the bf16 model on the next token | 88.1% | 89.9% |
| GSM8K, all 1,319 questions | 0.914 | 0.923 |
Question by question on GSM8K, 35 only the lmstudio-community pack gets right and 47 only the Nace quant: no difference we can measure (McNemar z 1.33).
On Q4, 20 of 20 thinking-off trials placed the call and completed the round trip; none added an extra call (MLX 0.32.4; mlx-lm 0.32.2, M5 Pro).
How measured| lmstudio-community pack | lmstudio-community/Qwen3.5-4B-MLX-4bit at c43ee1d, the pack Kapitsa served before this one |
| KL and agreement | next-token distributions over 32,768 tokens of WikiText-2, GSM8K chats and HumanEval code, against Qwen/Qwen3.5-4B @ 851bf6e8 (bf16) |
| GSM8K | zero-shot, greedy, thinking off, the last number in the answer |
| Scored with | mlx-lm 0.32.2, from the exact files in the two repos; every run is in the results record |
Nace quants come from our own quantization for MLX packs. An MLX pack ships only if it comes out closer to the original model than the lmstudio-community pack.
On this size the Nace quant takes the distance from the original bf16 model from 0.070 (lmstudio-community's pack) to 0.048 (KL, lower is closer) and moves GSM8K from 0.914 to 0.923, at the same size and in the same format.
How we checked it
Why it is closer
Use an MLX runtime with support for Qwen3.5-4B.
apache-2.0, as the base model Qwen/Qwen3.5-4B.
Q4/model.safetensors 3.0 GBmodel.safetensors 3.0 GBQwen/Qwen3.5-4B