Qwen3.8-27B opencode-adapted LayerFitโ„ข MLX 4-bit

harness-hub/Qwen3.8-27B-opencode-adapted (harness-hub's Qwen3.8-27B adapted for OpenCode) for Apple Silicon, built with LayerFitโ„ข: a per-layer search that spends the bits where this model needs them most. 16.5 GB on disk, for 32 GB Macs. Standard MLX format, so stock mlx-lm, mlx-vlm and LM Studio load it. Vision tower kept (bf16), 262K context. Bundles the model's own multi-token prediction (MTP) head at 8-bit.

Which build fits my Mac?

Each pick leaves room for macOS and a long prompt (the download is at most about 60% of your memory). Other models for your Mac: which build fits my Mac?.

Your Mac Build
16 GB 2-bit (9.1 GB, text-only)
16 GB โšก stretch 2.5-bit (11.5 GB)
24 GB 3-bit (13.1 GB)
32 GB 4-bit (16.5 GB) (this build)
48 GB and up Our standard 6-bit ยท 8-bit builds; LayerFit adds little at 6 bits and above

โšก Stretch: close other apps, keep prompts to a few thousand tokens, and let the GPU use more memory with sudo sysctl iogpu.wired_limit_mb=12800 (lasts until restart).

LayerFitโ„ข: same size, closer to the original

A standard quant gives every layer the same bits. LayerFitโ„ข measures how much each part of the model suffers at low bits (every layer's MLP, attention and linear-attention blocks, plus the embeddings and output head), then fills the same size budget where it helps most:

Same size, same test Top-1 agreement with bf16 Error (KL)
Standard 4-bit (same bits in every layer) 92.5% 0.0357
LayerFitโ„ข 4-bit 94.0% 0.0232 (35% lower)

Our harness: language-model weights only, against our bf16 merge of harness-hub/Qwen3.8-27B-opencode-adapted; passages in English, other languages, code, tool calls and math. The bit recipe is the one LayerFitโ„ข found for the Qwen3.8-27B base, re-checked on this model. The exact recipe is in layerfit-recipe.json.

This build

  • GSM8K-50, thinking off: 45/50
  • Tool call and coding 3/3: pass
  • Thinking 2/2: pass
  • Image input: pass

For the publisher's own benchmark results, see the Qwen3.8-27B-opencode-adapted card.

Usage

pip install -U mlx-vlm
python -m mlx_vlm.generate --model netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit \
  --prompt "Describe this image." --image photo.jpg --max-tokens 512

Text with mlx-lm:

pip install -U mlx-lm
mlx_lm.generate --model netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit --prompt "Hello"

Multi-token prediction

python -m mlx_vlm.generate --model netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit --draft-model netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit --draft-kind mtp \
  --prompt "Write a Python function that checks for primes." --max-tokens 512

Licence

Apache-2.0, same as harness-hub/Qwen3.8-27B-opencode-adapted and Qwen3.8-27B. See LICENSE and NOTICE.

Built by Paris Michalas, NetProjects. LayerFitโ„ข is a NetProjects trademark. Not affiliated with Alibaba Cloud, the Qwen team or harness-hub.

Downloads last month
9
Safetensors
Model size
28B params
Tensor type
U32
ยท
BF16
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit

Base model

Qwen/Qwen3.8-27B
Quantized
(12)
this model

Collection including netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit