Views
No views yet
<think> state where it:Tested on Apple M4 Pro, 64 GB ·mlx-lm 0.30.7· macOS 15
| Metric | Result |
|---|---|
| Model load time | 2.4 seconds |
| Prompt ingestion | 86.5 tokens/sec |
| Generation speed | 15.7 tokens/sec |
| Peak RAM usage | 15.6 GB |
| Bit-rate | 4.501 bits/weight |
| Final size | 14 GB (3 shards) |
| Hardware | Apple Silicon Mac (M1, M2, M3, M4 or later) |
| Minimum RAM | 24 GB Unified Memory |
| Recommended RAM | 32 GB+ (headroom for long-context reasoning) |
| OS | macOS 13.5 or later |
| Python | 3.10+ (Homebrew Python 3.12 recommended) |
pip install mlx-lm1python -m mlx_lm.chat \
2 --model BeastCode/Qwen3.5-27B-Claude-4.6-Opus-Distilled-MLX-4bitapply_chat_template with enable_thinking=True. This is the idiomatic way to trigger the reasoning mode — no manual prompt construction needed.1from mlx_lm import load, generate
2
3model, tokenizer = load("BeastCode/Qwen3.5-27B-Claude-4.6-Opus-Distilled-MLX-4bit")
4
5messages = [
6 {
7 "role": "user",
8 "content": (
9 "A farmer needs to cross a river with a wolf, a goat, and a cabbage. "
10 "The boat can only hold the farmer and one other item. "
11 "If left alone, the wolf eats the goat, and the goat eats the cabbage. "
12 "How can he get everything across safely?"
13 ),
14 }
15]
16
17# enable_thinking=True inserts the <think> prefix automatically
18prompt = tokenizer.apply_chat_template(
19 messages,
20 tokenize=False,
21 add_generation_prompt=True,
22 enable_thinking=True,
23)
24
25response = generate(model, tokenizer, prompt=prompt, max_tokens=2048, verbose=True)
26print(response)Tip: Setenable_thinking=False(or omit it) for fast, direct answers without the reasoning block — useful for simple lookups or chat where latency matters.
<think> token yourself. The two approaches produce identical results.1prompt = (
2 "<|im_start|>system\n"
3 "You are a highly analytical assistant.\n"
4 "<|im_end|>\n"
5 "<|im_start|>user\n"
6 "A farmer needs to cross a river with a wolf, a goat, and a cabbage. "
7 "The boat can only hold the farmer and one other item. "
8 "If left alone, the wolf eats the goat, and the goat eats the cabbage. "
9 "How can he get everything across safely?\n"
10 "<|im_end|>\n"
11 "<|im_start|>assistant\n"
12 "<think>\n"
13)
14
15response = generate(model, tokenizer, prompt=prompt, max_tokens=2048, verbose=True)
16print(response)| Property | Value |
|---|---|
| Method | 4-bit group-wise quantization |
| Precision | Mixed (embeddings/heads kept at higher precision for stability) |
| Tooling | mlx-lm.convert |
| Base model | Qwen 3.5 27B (Dense Architecture) |
1python -m mlx_lm.convert \
2 --hf-path Jackrong/Qwen3.5-27B-Claude-4.6-Opus-Reasoning-Distilled \
3 --mlx-path ./Qwen3.5-27B-Claude-4.6-MLX \
4 --quantize \
5 --q-bits 4<think> block is invaluable for verifying logic, but you may want to strip it for a cleaner UI:1import re
2
3def strip_thinking(text: str) -> str:
4 """Remove the internal <think> process, returning only the final answer."""
5 return re.sub(r'<think>.*?</think>\s*', '', text, flags=re.DOTALL).strip()| Model | Size | Reasoning style | Hardware target |
|---|---|---|---|
| This model (27B) | 14 GB | Claude 4.6 distilled | 24 GB+ Macs |
| Qwen3.5-9B | ~5 GB | Fast / intuitive | Base 8 GB / 16 GB Macs |
| Qwen3.5-72B | ~42 GB | Deep / exhaustive | 64 GB+ Ultra/Max |