Views
No views yet
Architecture note: Qwen3.6-27B uses theqwen3_5hybrid architecture — a mix of Gated DeltaNet (linear_attention) and full GQA layers in a 3:1 ratio across 64 layers. This is distinct from the standard Qwen3 transformer.
pip install mlx-lm1from mlx_lm import load, generate
2
3model, tokenizer = load("mlx-community/Qwen3.6-27B-4bit")
4
5prompt = "hello"
6
7if tokenizer.chat_template is not None:
8 messages = [{"role": "user", "content": prompt}]
9 prompt = tokenizer.apply_chat_template(
10 messages, add_generation_prompt=True
11 )
12
13response = generate(model, tokenizer, prompt=prompt, verbose=True)/think in your prompt (or using the chat template's thinking flag):1from mlx_lm import load, generate
2
3model, tokenizer = load("mlx-community/Qwen3.6-27B-4bit")
4
5messages = [{"role": "user", "content": "Think step by step: what is 17 × 23?"}]
6prompt = tokenizer.apply_chat_template(
7 messages,
8 add_generation_prompt=True,
9 enable_thinking=True,
10)
11
12response = generate(model, tokenizer, prompt=prompt, max_tokens=1024, verbose=True)| Precision | Approx. Size | Min Unified RAM |
|---|---|---|
| 4-bit (this model) | ~14 GB | 32 GB |
| 8-bit | ~28 GB | 64 GB |
| Metric | 4-bit | 8-bit |
|---|---|---|
| Load time | 1.8 s | 5.6 s |
| Prompt throughput | 16.5 tok/s | 5.7 tok/s |
| Generation throughput | 18.3 tok/s | 9.4 tok/s |
| Peak memory | 15.4 GB | 30.5 GB |