Instructions to use barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit 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("barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit") 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 barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit"
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": "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit 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 "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit"
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 barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit"
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 "barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit" \ --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-Whittle-MoE-27B-MLX-4bit
MLX 4-bit conversion of logic65/Qwen3.8-Whittle-MoE-27B-A17.8B -- a post-hoc MoE carved from Qwen/Qwen3.8-27B (64 routed expert slivers + 1 shared expert per layer, top-16 routing, 17.8B active of 27B total, router-healed + anti-loop trained, v2.1) -- for Apple Silicon. Sibling formats:
- bf16 safetensors source (v2.1): logic65/Qwen3.8-Whittle-MoE-27B-A17.8B
- GGUF quantizations: logic65/Qwen3.8-Whittle-MoE-27B-A17.8B-GGUF
Converted straight from the v2.1 bf16 safetensors weights (not from any GGUF quant).
Note: the source ships without an MTP head (mtp_layers: 0) -- this MLX build is
autoregressive only; MTPLX speculative decoding does not apply.
Conversion details
- Bits: 4 (
group_size=64, affine) - Command:
python -m mlx_lm.convert --hf-path logic65/Qwen3.8-Whittle-MoE-27B-A17.8B --mlx-path <out> --quantize --q-bits 4 --q-group-size 64 - Tooling: mlx 0.32.1 · mlx-lm 0.31.3 · hub 1.27.0; source commit
08741134dbc3 - Converter: mlx-lm
- Environment: Google Colab G4 (RTX PRO 6000 Blackwell 96 GB), MLX cuda12 backend
- Full conversion log ships in this repo as
conversion_log.txt
Usage
pip install -U mlx-lm
# text-only chat
python -m mlx_lm.generate \
--model barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit \
--prompt "Explain the Monty Hall problem briefly." \
--max-tokens 512
# OpenAI-compatible local server
python -m mlx_lm.server \
--model barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit
About the source model
A post-hoc MoE carved from Qwen3.8-27B: each layer's dense FFN (17408) was partitioned into 64 routed expert slivers of width 192 + one shared expert of width 5120; a small router picks 16 of 64 slivers per token (17.8B active / 27B total). Freshly carved it scored 4/39 on the knowledge battery; training only the 64 routers recovered 27/39. The v2.1 lineage adds anti-loop training (245 complete teacher answers with top-32 logprobs) and a balancing epoch: single-turn loop rate 8% (from 69%), structured-output failures 22% (from ~75%), knowledge battery 28/39. Full method and failure log: WHITTLE_FINDINGS.md.
Source chain
Qwen/Qwen3.8-27B (dense base) -> logic65/Qwen3.8-Whittle-MoE-27B-A17.8B (post-hoc MoE carve + router healing + v2.1 anti-loop) -> this repo (MLX 4-bit conversion)
- Downloads last month
- 2,258
4-bit
Model tree for barozp/Qwen3.8-Whittle-MoE-27B-MLX-4bit
Base model
Qwen/Qwen3.8-27B