Instructions to use netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit 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-opencode-adapted-LayerFit-MLX-2bit"
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-opencode-adapted-LayerFit-MLX-2bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit 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-opencode-adapted-LayerFit-MLX-2bit"
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-opencode-adapted-LayerFit-MLX-2bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit 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-opencode-adapted-LayerFit-MLX-2bit"
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-opencode-adapted-LayerFit-MLX-2bit" \ --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"
|
Download README.md from netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit: direct link, hf CLI and curl.
- Browser
- Download file 3.72 kB
-
https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit/resolve/main/README.md
- Command line
-
hf download hf://netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit/README.md
-
curl -L -o README.md https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit/resolve/main/README.md
3.72 kB
| license: apache-2.0 | |
| base_model: harness-hub/Qwen3.8-27B-opencode-adapted | |
| base_model_relation: quantized | |
| library_name: mlx | |
| pipeline_tag: text-generation | |
| tags: | |
| - mlx | |
| - mlx-lm | |
| - qwen3_5 | |
| - layerfit | |
| - agent | |
| - coding | |
| - 2bit | |
| # Qwen3.8-27B opencode-adapted LayerFit MLX 2-bit | |
| [harness-hub/Qwen3.8-27B-opencode-adapted](https://huggingface.co/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. 9.1 GB on disk, for 16 GB Macs. Standard MLX format, so stock mlx-lm, mlx-vlm and LM Studio load it. **Text-only** (vision tower removed to fit a 16 GB Mac), 262K context. No MTP head in this build (at 2-bit it does not help). | |
| <!-- mac-picker:start --> | |
| ## 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?](https://huggingface.co/netprojects). | |
| | Your Mac | Build | | |
| |---|---| | |
| | 16 GB | **[2-bit](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit) (9.1 GB, text-only)** (this build) | | |
| | 16 GB ⚡ stretch | [2.5-bit](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2.5bit) (11.5 GB) | | |
| | 24 GB | [3-bit](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-3bit) (13.1 GB) | | |
| | 32 GB | [4-bit](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-4bit) (16.5 GB) | | |
| | 48 GB and up | Our standard [6-bit](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-MLX-6bit) · [8-bit](https://huggingface.co/netprojects/Qwen3.8-27B-opencode-adapted-MLX-8bit) 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). | |
| <!-- mac-picker:end --> | |
| ## 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 2-bit (same bits in every layer) | 68.0% | 0.6795 | | |
| | **LayerFit 2-bit** | **76.7%** | **0.3722 (45% 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: 43/50 | |
| - Tool call and coding 2/3: pass | |
| - Thinking 2/2: pass | |
| - Text only | |
| For the publisher's own benchmark results, see the [Qwen3.8-27B-opencode-adapted card](https://huggingface.co/harness-hub/Qwen3.8-27B-opencode-adapted). | |
| ## Usage | |
| ```bash | |
| pip install -U mlx-lm | |
| mlx_lm.generate --model netprojects/Qwen3.8-27B-opencode-adapted-LayerFit-MLX-2bit --prompt "Hello" | |
| ``` | |
| ## Licence | |
| Apache-2.0, same as harness-hub/Qwen3.8-27B-opencode-adapted and Qwen3.8-27B. See LICENSE and NOTICE. | |
| <!-- lfcoll -->All LayerFit builds, one pick per model: [LayerFit MLX builds](https://huggingface.co/collections/netprojects/layerfit-mlx-builds-6b0ad24ace6f450872d036e5). | |
| Built by Paris Michalas, [NetProjects](https://netprojects.com). LayerFit™ is a NetProjects trademark. Not affiliated with Alibaba Cloud, the Qwen team or harness-hub. | |