Text Generation
MLX
Safetensors
qwen3_5_moe
Mixture of Experts
edge-inference
prerouter
lora
ssd-offload
conversational
4-bit precision
Instructions to use Edge0/Edge0-35B-A3B-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Edge0/Edge0-35B-A3B-preview 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("Edge0/Edge0-35B-A3B-preview") 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 Edge0/Edge0-35B-A3B-preview with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Edge0/Edge0-35B-A3B-preview"
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": "Edge0/Edge0-35B-A3B-preview" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Edge0/Edge0-35B-A3B-preview with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Edge0/Edge0-35B-A3B-preview"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Edge0/Edge0-35B-A3B-preview" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Edge0/Edge0-35B-A3B-preview", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use Edge0/Edge0-35B-A3B-preview 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 "Edge0/Edge0-35B-A3B-preview"
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 Edge0/Edge0-35B-A3B-preview
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Edge0/Edge0-35B-A3B-preview with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Edge0/Edge0-35B-A3B-preview"
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 "Edge0/Edge0-35B-A3B-preview" \ --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"
File size: 3,808 Bytes
a4705b4 7d373fe a4705b4 7d373fe a2bf13d 7d373fe 8c5b623 7d373fe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | ---
license: apache-2.0
library_name: mlx
tags:
- moe
- edge-inference
- prerouter
- lora
- ssd-offload
base_model:
- Qwen/Qwen3.5-MoE-35B-A3B
pipeline_tag: text-generation
---
<div align="center">
<img src="20260908-223115.jpg" alt="edge0" width="100%">
# Edge0-35b-a3b Preview
**A 35B-class sparse MoE that runs on a phone — 2.9 GiB of active memory, experts streamed from SSD.**
[](https://github.com/Edge0-AI/edge0)
[](https://huggingface.co/Edge0/Edge0-35b-a3b-preview)
[](https://huggingface.co/Edge0/Edge0-8b-a1b-preview)
[](https://github.com/Edge0-AI/edge0/blob/main/LICENSE)
</div>
**Edge0-35b-a3b** — an 35B MoE LLM that runs at viable speed on portable devices in under **2.9 GiB of active memory** (1/8 of its 23 GB weight footprint),
via the [edge0](https://github.com/Edge0-AI/edge0) streaming inference framework.
The key is streaming: experts are memory-mapped and fetched from SSD only as routed,
so RAM holds just the active weights. What makes that viable — instead of stalling like plain parameter offloading —
is a trained prerouter head that **predicts the next token's expert routing one step ahead**, hiding storage latency behind compute.
> **Preview status:** this is an early preview release of the edge0
> pipeline. The checkpoint ships as int4 quantization plus LoRA and
> prerouter adapters trained for this framework.
## Model summary
| | |
|---|---|
| Base model | Qwen3.5-MoE 35B-A3B |
| Quantization | 4-bit |
| Layers | 40 |
| Experts / active per token | 256 / 4 (K=4) |
| Framework | [edge0](https://github.com/Edge0-AI/edge0) (MLX backend) |
| Contents | base checkpoint + `lora_edge0_35b.safetensors` + `prerouter_edge0_35b.safetensors` |
The LoRA and prerouter adapters are co-located with the base checkpoint
and load automatically — this repository is a complete, ready-to-run
model directory for `edge0`.
## Quality (self-evaluation)
Internal self-evaluation of this checkpoint (int4 + adapters) relative to
the fp16 base model — the loss of the edge0 pipeline is small: **3.9
points on average** (max 100, all self-run):
| Benchmark | edge0-35b (int4) | Qwen3.5-MoE 35B-A3B (fp16) |
|---|---:|---:|
| AIME 2026 | 86.6 | 92.7 |
| HumanEval | 90.9 | 95.1 |
| GPQA-Diamond | 79.8 | 81.8 |
| MMLU-Pro | 81.0 | 84.6 |
| IFBench | 57.9 | 61.7 |
| **Average** | **79.2** | **83.2** |
## Performance
Measured with `examples/bench.py` on a Mac mini M4 Pro, 24 GB:
| Decode speed | Prefill throughput (cold / warm) | Peak active memory* |
|---|---|---|
| 14.9–17.7 tok/s | 113 / 140 tok/s | 2.9 GiB |
*Short contexts; long contexts add KV cache. Expert weights stream from
SSD via mmap and are not resident.
## Quick start
```bash
pip install -e 'git+https://github.com/Edge0-AI/edge0.git#egg=edge0[fetch]'
# Download this repository into a local directory
huggingface-cli download Edge0/Edge0-35b-a3b-preview --local-dir ./Edge0-35b-a3b-preview
# Run it
export EDGE0_35B_MODEL=$PWD/Edge0-35b-a3b-preview
edge0 chat --name edge0-35b --prompt "Introduce yourself"
# Or serve an OpenAI-compatible HTTP API
edge0 serve --name edge0-35b --port 8085
```
For full usage (Python API, streaming options, prerouter details), see the
[edge0 documentation](https://github.com/Edge0-AI/edge0#documentation).
## License
Apache 2.0. See [LICENSE](https://github.com/Edge0-AI/edge0/blob/main/LICENSE).
|