Run Qwen3.8 27B on Apple Silicon
Qwen3.8 27B is a dense 27 billion parameter model with image input and a 256K context, released by Alibaba's Qwen team in August 2026 under Apache 2.0. At Q4_K_M the weights are about 17 GB, so a Mac with 32 GB of unified memory runs it and a Mac mini M4 Pro with 64 GB runs it with long context to spare. Three of every four layers use linear attention, so the KV cache stays small as the context grows.
How much memory does Qwen3.8 27B need?
Weight size is parameter count × bits per weight; recommended memory adds 15% runtime headroom plus a KV-cache allowance for the 262,144-token context window.
| Quantization | Weights | Recommended RAM | Cheapest fit | Notes |
|---|---|---|---|---|
| Q4_K_M | ~16.9 GB | 24 GB | M4 (Mac mini) | Best quality/size trade-off — the default for most deployments |
| Q8_0 | ~29.5 GB | 40 GB | M4 Pro (Mac mini) | Near-lossless; noticeably better on code and long reasoning |
| FP16 | ~55.6 GB | 72 GB | M4 Max (Mac Studio) | Full precision — research and eval baselines |
Which Mac should you pick?
Generation speed on Apple Silicon scales mostly with memory bandwidth, so the chip choice sets both whether the model fits and how fast it runs.
| Chip | Max RAM | Bandwidth | Fits Qwen3.8 27B? | From |
|---|---|---|---|---|
| M4 · Mac mini | 32 GB | 120 GB/s | Q4 | $99/mo |
| M4 Pro · Mac mini | 64 GB | 273 GB/s | Q4 + Q8 | $200/mo |
| M4 Max · Mac Studio | 128 GB | 546 GB/s | Q4 + Q8 + FP16 | $286/mo |
| M3 Ultra · Mac Studio | 256 GB | 819 GB/s | Q4 + Q8 + FP16 | $571/mo |
Deploy Qwen3.8 27B in about 5 minutes
- 1
Rent a Mac: pick an M4 with at least 24 GB of unified memory.
- 2
Log in as the administrator, install Ollama and pull Qwen3.8 27B with one command; Ollama serves it through an OpenAI compatible API.
- 3
Point your OpenAI SDK code at that endpoint, on the Mac or through an SSH tunnel.
# ssh -fN -L 11434:localhost:11434 tenant@your-mac
from openai import OpenAI
client = OpenAI(
api_key="ollama", # Ollama ignores the key
base_url="http://localhost:11434/v1",
)
response = client.chat.completions.create(
model="qwen-3-8-27b",
messages=[{"role": "user", "content": "Hello!"}],
)License and what it's good at
Apache 2.0 — Apache 2.0: commercial use is allowed under the standard license terms. Made by Alibaba (Qwen).
- Apache 2.0 license
- Text and image input with a 256K context
- Fits a 32 GB Mac at Q4
Typical workloads: a private daily assistant and coding helper on one mac; reading documents, screenshots and charts; a default model for agents that need a long context.
Frequently asked questions
What is the smallest Mac for Qwen3.8 27B?
A Mac with 32 GB runs the Q4_K_M build, about 17 GB of weights, with a moderate context. 64 GB leaves room for Q8 or a long context.
Why does long context cost so little memory?
Only 16 of its 64 layers use standard attention with a growing KV cache; the other 48 are Gated DeltaNet layers that keep a fixed size state.