Alibaba's Qwen3.8-27B on a Mac: four LayerFit™ MLX builds, from 9.1 GB to 16.5 GB
NetProjects™
Qwen3.8-27B is the 27-billion-parameter dense model of Alibaba Cloud's Qwen3.8 generation, released with open weights under the Apache-2.0 licence. It is a native vision-language model: it reads images and video as well as text, it thinks before it answers by default (you can turn thinking off per request), and its context window is 262,144 tokens, which Qwen says can be extended to about 1 million. It has 64 layers, in which three Gated DeltaNet linear-attention layers alternate with one full-attention layer, and it was trained with multi-token prediction.
For the full-precision model, Qwen reports 73.0 on Terminal Bench 2.1, 61.7 on SWE-bench Pro, 90.3 on LiveCodeBench v6 and 89.2 on GPQA Diamond. These are Qwen's figures for its original weights; we have not reproduced them.
We publish four LayerFit™ MLX builds of Qwen3.8-27B: 4-bit, 3-bit, 2.5-bit and 2-bit, sized for Macs with 16 GB to 32 GB of memory. We publish no 6-bit or 8-bit build of the original model, because at those sizes a standard build already stays close to the original and LayerFit™ adds little. The coding-agent adaptations of Qwen3.8-27B by harness-hub have their own articles and are listed on https://netprojects.com/ai.
Always up to date. We keep these builds current on Hugging Face. When Alibaba Cloud's Qwen team releases a new version of the model, or LayerFit™ finds a better recipe, we rebuild, re-test and publish it there, so the links on this page always point to the latest version. The numbers in this article were measured from the model cards on 3 December 2026; the model cards on Hugging Face carry the current figures.
- Hugging Face: https://huggingface.co/netprojects
- LayerFit™ MLX builds collection, one pick per model: https://huggingface.co/collections/netprojects/layerfit-mlx-builds-6b0ad24ace6f450872d036e5
What we released
LayerFit™ is NetProjects™' own method for building small MLX models for Macs with Apple Silicon. It measures how much each part of a model suffers when squeezed to few bits (such as the attention, MLP or expert blocks of every layer, the embeddings and the output head), then spends the bits where they matter. A standard build gives every layer the same bits; a LayerFit™ recipe is only published if it beats a standard build of the same size. The recipe ships in each repository as layerfit-recipe.json, so anyone can see which bits went where, and the result is a normal MLX build that stock mlx-lm, mlx-vlm and LM Studio load. How it works: https://netprojects.com/layerfit.
| Hugging Face | Size | Suggested Mac memory | What it keeps |
|---|---|---|---|
| netprojects/Qwen3.8-27B-LayerFit-MLX-4bit | 16.5 GB | 32 GB | Vision, multi-token prediction head at 8-bit |
| netprojects/Qwen3.8-27B-LayerFit-MLX-3bit | 13.1 GB | 24 GB | Vision, multi-token prediction head at 8-bit |
| netprojects/Qwen3.8-27B-LayerFit-MLX-2.5bit | 11.5 GB | 16 GB (a stretch) | Vision, multi-token prediction head at 4-bit |
| netprojects/Qwen3.8-27B-LayerFit-MLX-2bit | 9.1 GB | 16 GB | Text only: no vision, no multi-token prediction head |
The 2-bit build leaves out the vision tower to fit a 16 GB Mac, and leaves out the multi-token prediction head because at 2-bit it made decoding slower. For the 2.5-bit build on a 16 GB Mac, the model card advises closing other apps, keeping prompts to a few thousand tokens and raising the GPU memory limit with sudo sysctl iogpu.wired_limit_mb=12800, which lasts until restart.
Same size, closer to the original
Qwen3.8-27B, LayerFit™ against a standard build of exactly the same size. Our harness uses the language-model weights only, 32 passages of 512 tokens across English, other languages, code, tool calls and maths, scored against our own MLX bf16 conversion; GSM8K-50 is 50 grade-school maths questions with thinking off.
| Size | Standard build | LayerFit™ build |
|---|---|---|
| 4-bit, 16.5 GB | 92.7% top-1, 44/50 | 94.0% top-1, 38% lower error, 46/50 |
| 3-bit, 13.1 GB | 84.4% top-1, 44/50 | 88.6% top-1, 38% lower error, 45/50 |
| 2.5-bit, 11.5 GB | 75.9% top-1, 41/50 | 83.4% top-1, 52% lower error, 46/50 |
| 2-bit, 9.1 GB | 68.2% top-1, 30/50 | 76.7% top-1, 46% lower error, 46/50 |
Top-1 is how often the build picks the same next token as the bf16 model; error is the KL divergence from it. The headline: at 2-bit, a 27B model that fits a 16 GB Mac scores 46/50 on GSM8K-50, against 30/50 for a standard 2-bit build of the same size.
Each build also went through a separate card check on 12 prompts, with tool calls, coding (3 of 3), thinking (2 of 2) and, where the vision tower is kept, image input all passing:
| Build | Same next token as bf16 | Error (KL) | GSM8K-50 | Peak memory, 8K-token prompt |
|---|---|---|---|---|
| 4-bit | 96.5% | 0.015 | 44 to 46/50 over two runs | 18.2 GB |
| 3-bit | 93.5% | 0.061 | 43/50 | 15.0 GB |
| 2.5-bit | 90.6% | 0.103 | 44 to 46/50 over two runs | 13.7 GB |
| 2-bit | 84.8% | 0.297 | 42/50 | 11.7 GB |
Try it
On a Mac with Apple Silicon, install mlx-vlm for text and images, or mlx-lm for text only. In thinking mode Qwen recommends temperature 1.0, top_p 0.95 and top_k 20.
pip install -U mlx-vlm
python -m mlx_vlm.generate --model netprojects/Qwen3.8-27B-LayerFit-MLX-4bit \
--prompt "Describe this image." --image photo.jpg --max-tokens 512
# text only
pip install -U mlx-lm
mlx_lm.generate --model netprojects/Qwen3.8-27B-LayerFit-MLX-4bit --prompt "Hello"The 4-bit, 3-bit and 2.5-bit builds bundle Qwen3.8-27B's own multi-token prediction head, which mlx-vlm can use as a draft model for speculative decoding; the model cards give the command.
Honest limits
- The Qwen benchmark figures above are Qwen's, for the original full-precision model. We did not run them on our builds.
- Our measure is closeness to our own bf16 MLX conversion of Qwen3.8-27B, on the language-model weights only. Being close to the original is not the same as being better at a task.
- GSM8K-50 is 50 questions, so a gap of a few questions is small. The 2-bit build scored 46/50 in the same-size comparison and 42/50 in the 12-prompt card check, which are different test sets and runs.
- The 2-bit build is text only, and 76.7% top-1 agreement means it picks a different next token from the original about one time in four. Choose the 4-bit build if your Mac has room.
- The 2.5-bit build is a stretch on a 16 GB Mac: close other apps and keep prompts short.
- We give no speed figures, and we publish no 6-bit or 8-bit build of the original model.
Licence
Qwen3.8-27B and our builds are under the Apache-2.0 licence. Each of our repositories carries Qwen's licence text, and a notice that describes the conversion.
Links
- LayerFit™ 4-bit build: https://huggingface.co/netprojects/Qwen3.8-27B-LayerFit-MLX-4bit
- LayerFit™ 3-bit build: https://huggingface.co/netprojects/Qwen3.8-27B-LayerFit-MLX-3bit
- LayerFit™ 2.5-bit build: https://huggingface.co/netprojects/Qwen3.8-27B-LayerFit-MLX-2.5bit
- LayerFit™ 2-bit build: https://huggingface.co/netprojects/Qwen3.8-27B-LayerFit-MLX-2bit
- Qwen's original model: https://huggingface.co/Qwen/Qwen3.8-27B
- LayerFit™ MLX builds collection: https://huggingface.co/collections/netprojects/layerfit-mlx-builds-6b0ad24ace6f450872d036e5
- How LayerFit™ works: https://netprojects.com/layerfit
- Our LayerFit™ launch article: https://netprojects.com/insights/layerfit-bits-where-they-matter-small-mlx-builds
- All our AI ports: https://netprojects.com/ai
Credits
Qwen3.8-27B is by Alibaba Cloud's Qwen team, under the Apache-2.0 licence. The MLX builds are by NetProjects™ (Internet Projects Ltd), made with LayerFit™. Not affiliated with Alibaba Cloud or the Qwen team.
NetProjects™ and LayerFit™ are trade marks of Internet Projects Ltd.
This article was drafted with AI assistance, then edited and approved by people on our team. You can read more about how we use AI at https://netprojects.com/standards/ai.