Text Generation
MLX
Safetensors
Mixture of Experts
edge-inference
prerouter
lora
ssd-offload
conversational
custom_code
4-bit precision
Instructions to use Edge0/Edge0-8B-A1B-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Edge0/Edge0-8B-A1B-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-8B-A1B-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-8B-A1B-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-8B-A1B-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-8B-A1B-preview" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use Edge0/Edge0-8B-A1B-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-8B-A1B-preview"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Edge0/Edge0-8B-A1B-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-8B-A1B-preview", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use Edge0/Edge0-8B-A1B-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-8B-A1B-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-8B-A1B-preview
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Edge0/Edge0-8B-A1B-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-8B-A1B-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-8B-A1B-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"
|
Download README.md from Edge0/Edge0-8B-A1B-preview: direct link, hf CLI and curl.
- Browser
- Download file 7 kB
-
https://huggingface.co/Edge0/Edge0-8B-A1B-preview/resolve/main/README.md
- Command line
-
hf download hf://Edge0/Edge0-8B-A1B-preview/README.md
-
curl -L -o README.md https://huggingface.co/Edge0/Edge0-8B-A1B-preview/resolve/main/README.md
7 kB
| license: apache-2.0 | |
| library_name: mlx | |
| tags: | |
| - moe | |
| - edge-inference | |
| - prerouter | |
| - lora | |
| - ssd-offload | |
| base_model: | |
| - inclusionAI/Ling-3.0-tiny-base | |
| pipeline_tag: text-generation | |
| <div align="center"> | |
| <img src="20260908-223115.jpg" alt="edge0" width="100%"> | |
| <h1>Edge0-8b-a1b Preview</h1> | |
| **An 8B-class sparse MoE that runs in phone-class memory.** | |
| **1 GiB active memory Β· 25 tok/s Β· 4-bit** | |
| [](https://github.com/Edge0-AI/edge0) | |
| [](https://huggingface.co/Edge0/Edge0-35b-a3b-preview) | |
| [](https://huggingface.co/Edge0/Edge0-8b-a1b-preview) | |
| [](https://www.modelscope.cn/models/Edge0/Edge0-35B-A3B-preview) | |
| [](https://www.modelscope.cn/models/Edge0/Edge0-8B-A1B-preview) | |
| [](https://arxiv.org/abs/2609.18063) | |
| [](https://github.com/Edge0-AI/edge0/blob/main/LICENSE) | |
| </div> | |
| **Edge0-8b-a1b** β an 8B MoE LLM that runs at viable speed in under **1 GiB of active memory**, | |
| via the [edge0](https://github.com/Edge0-AI/edge0) streaming inference framework. | |
| > **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. | |
| <div align="center"> | |
| <video | |
| src="https://huggingface.co/Edge0/Edge0-35B-A3B-preview/resolve/main/20260910-105854.mp4" | |
| controls | |
| playsinline | |
| preload="metadata" | |
| width="80%"> | |
| </video> | |
| </div> | |
| ## Highlights | |
| - **Runs in phone-class memory**: the full 4-bit checkpoint stays on | |
| storage and experts are streamed on demand, so only the active | |
| weights are in RAM β under **1 GiB**, with no sharding and no | |
| upfront download of the weights into memory. | |
| - **Fast enough for interactive use**: 25 tok/s decode; | |
| long prompts fill in at 1400 tok/s. | |
| - **Quality kept after quantization**: Recover-LoRA distillation keeps | |
| the int4 model within **2.8 points** of its fp16 base (and above it | |
| on MMLU-Pro). | |
| - **Works out of the box**: base, LoRA and prerouter adapters ship | |
| together and load automatically via `edge0`. | |
| Three mechanisms make this work: | |
| - **SSD expert offload**: expert weights are streamed from storage on | |
| demand β fetched only as routed, so RAM holds just the active | |
| weights. Peak memory is bounded by the active set, not the | |
| parameter count. | |
| - **Prerouter**: a trained head predicts expert routing one step | |
| ahead, so expert loads overlap the forward pass instead of stalling | |
| it β **up to +59%** decode throughput; the gain grows with storage | |
| latency, model size, and routed width *K*. | |
| - **Recover-LoRA**: the int4 base is frozen and LoRA adapters are | |
| trained by distillation from the FP teacher, recovering most of the | |
| quantization loss at 4-bit (see Quality below). Adapters stay | |
| unmerged: one read-only base serves multiple adapter sets. | |
| ## Model summary | |
| | | | | |
| |---|---| | |
| | Base model | inclusionAI Ling 3.0 tiny (bailing hybrid, MLA + MoE, β7.9B total / β1.2B active) | | |
| | Quantization | 4-bit | | |
| | Layers | 24 | | |
| | Experts / active per token | 128 / 8 (K=8) | | |
| | Hidden size | 1536 | | |
| | Context | 128k | | |
| | Thinking mode | yes (chat template) | | |
| | License | Apache 2.0 | | |
| | Framework | [edge0](https://github.com/Edge0-AI/edge0) (MLX backend) | | |
| | Contents | base checkpoint + `lora_edge0_8b.safetensors` + `prerouter_edge0_8b.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 | |
| All benchmarks were run by us with [OpenCompass](https://github.com/open-compass/opencompass) | |
| under identical settings and parameters for both models. The loss of the | |
| edge0 pipeline (int4 + adapters) relative to the fp16 base model is | |
| small: **2.8 points on average**, with MMLU-Pro above the base. Max 100: | |
| | Benchmark | edge0-8b (int4) | Ling 3.0 tiny (fp16) | | |
| |---|---:|---:| | |
| | AIME 2026 | 63.3 | 73.3 | | |
| | HumanEval | 91.5 | 92.7 | | |
| | GPQA-Diamond | 70.7 | 71.2 | | |
| | MMLU-Pro | 70.1 | 65.8 | | |
| | IFBench | 53.9 | 60.6 | | |
| | **Average** | **69.9** | **72.7** | | |
| ## Performance | |
| Measured with `examples/bench.py` on a Mac mini M4 Pro, 24 GB: | |
| | Decode speed | Prefill throughput (cold / warm) | Peak active memory | | |
| |---|---|---| | |
| | 23.9β25.3 tok/s | 500 / 1428 tok/s | 1.0 GiB | | |
| ## Use cases | |
| - Edge / on-device inference where GPU VRAM is scarce and storage is | |
| fast (NVMe, internal flash). | |
| - Batch serving on a single commodity machine β one read-only base | |
| serves many LoRA adapter sets without re-quantization. | |
| - Multilingual chat and reasoning with thinking mode enabled by the | |
| bundled chat template. | |
| ## Limitations | |
| - Preview release: coverage and quality are still being extended; the | |
| model is primarily tuned for the languages of the base model. | |
| - Agent capability: this preview release is not yet optimized for | |
| agentic tasks β tool use, multi-step planning, and long-horizon | |
| autonomy are currently weak. The full release will substantially | |
| strengthen agent capability. | |
| - The MLX backend currently targets Apple Silicon; other backends are | |
| on the edge0 roadmap. | |
| ## 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-8b-a1b-preview --local-dir ./Edge0-8b-a1b-preview | |
| # Run it | |
| export EDGE0_8B_MODEL=$PWD/Edge0-8b-a1b-preview | |
| edge0 chat --name edge0-8b --prompt "Introduce yourself" | |
| # Or serve an OpenAI-compatible HTTP API | |
| edge0 serve --name edge0-8b --port 8083 | |
| ``` | |
| 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). | |
| ## Citation | |
| If you find Edge0 useful in your research, please cite our paper: | |
| ```bibtex | |
| @misc{lin2026halfmemorywallserving, | |
| title={The Other Half of the Memory Wall: Serving 35B MoEs from SSD with Trained Routing Prediction}, | |
| author={Yu Lin and Yiming Wang and Runyuan Cai and Hanze Liu and Xiaodong Zeng}, | |
| year={2026}, | |
| eprint={2609.18063}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.AI}, | |
| url={https://arxiv.org/abs/2609.18063}, | |
| } | |
| ``` | |