Instructions to use netprojects/Qwen3.8-27B-LayerFit-MLX-3bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/Qwen3.8-27B-LayerFit-MLX-3bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("netprojects/Qwen3.8-27B-LayerFit-MLX-3bit") config = load_config("netprojects/Qwen3.8-27B-LayerFit-MLX-3bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use netprojects/Qwen3.8-27B-LayerFit-MLX-3bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen3.8-27B-LayerFit-MLX-3bit"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "netprojects/Qwen3.8-27B-LayerFit-MLX-3bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent
How to use netprojects/Qwen3.8-27B-LayerFit-MLX-3bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen3.8-27B-LayerFit-MLX-3bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default netprojects/Qwen3.8-27B-LayerFit-MLX-3bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netprojects/Qwen3.8-27B-LayerFit-MLX-3bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "netprojects/Qwen3.8-27B-LayerFit-MLX-3bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "netprojects/Qwen3.8-27B-LayerFit-MLX-3bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen3.8-27B LayerFit™ MLX 3-bit
Qwen/Qwen3.8-27B for Apple Silicon, built with LayerFit™: a per-layer search that spends the bits where this model needs them most. 13.1 GB on disk, for 24 GB Macs. Standard MLX format, so stock mlx-lm, mlx-vlm and LM Studio load it. Vision tower kept (bf16), 262K context. Bundles Qwen3.8-27B's own multi-token prediction (MTP) head at 8-bit for faster decoding.
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) (this build) |
| 32 GB | 4-bit (16.5 GB) |
| 48 GB and up | Uniform 6-bit / 8-bit builds from lmstudio-community or mlx-community are a good fit; LayerFit adds nothing there |
⚡ 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).
Why LayerFit
A uniform quant gives every layer the same bits. LayerFit first 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 a fixed size budget where it helps most. Same size as a standard build, better output:
| Same size, same test | Top-1 agreement with bf16 | Error (KL) | GSM8K-50 |
|---|---|---|---|
| Standard 3-bit (same bits in every layer) | 84.4% | baseline | 44/50 |
| LayerFit 3-bit | 88.6% | 38% lower | 45/50 |
Our harness: language-model weights only, 32 passages × 512 tokens across English, other languages, code, tool calls and math, against our MLX bf16 conversion; GSM8K-50 thinking off. The exact recipe is in layerfit-recipe.json.
This build
- Top-1 token agreement with bf16 on our 12-prompt card check: 93.5% (KL 0.061)
- GSM8K-50, thinking off: 43/50
- Tool calls, coding 3/3, thinking 2/2, image input: pass
- Peak memory with an 8K-token prompt: 15.0 GB
- Decode on an M5 Max (not a quiet machine, indicative): 41 tok/s, 51 tok/s with MTP
For Qwen's own benchmark results, see the Qwen3.8-27B card.
Usage
pip install -U mlx-vlm
python -m mlx_vlm.generate --model netprojects/Qwen3.8-27B-LayerFit-MLX-3bit \
--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-LayerFit-MLX-3bit --prompt "Hello"
Faster decoding with MTP
python -m mlx_vlm.generate --model netprojects/Qwen3.8-27B-LayerFit-MLX-3bit --draft-model netprojects/Qwen3.8-27B-LayerFit-MLX-3bit --draft-kind mtp \
--prompt "Write a Python function that checks for primes." --max-tokens 512
Licence
Apache-2.0, same as Qwen3.8-27B. See LICENSE and NOTICE.
Built by Paris Michalas, NetProjects. LayerFit™ is a NetProjects trademark. Not affiliated with Alibaba Cloud or the Qwen team.
- Downloads last month
- 21
Quantized
Model tree for netprojects/Qwen3.8-27B-LayerFit-MLX-3bit
Base model
Qwen/Qwen3.8-27B