Skip to content
NetProjects™
Menu

Insights

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.

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 FaceSizeSuggested Mac memoryWhat it keeps
netprojects/Qwen3.8-27B-LayerFit-MLX-4bit16.5 GB32 GBVision, multi-token prediction head at 8-bit
netprojects/Qwen3.8-27B-LayerFit-MLX-3bit13.1 GB24 GBVision, multi-token prediction head at 8-bit
netprojects/Qwen3.8-27B-LayerFit-MLX-2.5bit11.5 GB16 GB (a stretch)Vision, multi-token prediction head at 4-bit
netprojects/Qwen3.8-27B-LayerFit-MLX-2bit9.1 GB16 GBText 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.

SizeStandard buildLayerFit™ build
4-bit, 16.5 GB92.7% top-1, 44/5094.0% top-1, 38% lower error, 46/50
3-bit, 13.1 GB84.4% top-1, 44/5088.6% top-1, 38% lower error, 45/50
2.5-bit, 11.5 GB75.9% top-1, 41/5083.4% top-1, 52% lower error, 46/50
2-bit, 9.1 GB68.2% top-1, 30/5076.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:

BuildSame next token as bf16Error (KL)GSM8K-50Peak memory, 8K-token prompt
4-bit96.5%0.01544 to 46/50 over two runs18.2 GB
3-bit93.5%0.06143/5015.0 GB
2.5-bit90.6%0.10344 to 46/50 over two runs13.7 GB
2-bit84.8%0.29742/5011.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

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.