# AI use cases for Edge0 (Edge0-AI/Edge0)

Repo: [Edge0-AI/Edge0](https://github.com/Edge0-AI/Edge0) | Use cases: 3 | Page: https://dedupedai.com/use-cases/edge0-ai-edge0/

edge0 is an open-source streaming MoE inference framework that runs large sparse mixture-of-experts models on consumer hardware. It streams expert weights from SSD, uses a trained prerouter to predict routing one step ahead, and recovers 4-bit quality with Recover-LoRA adapters. It ships two models, Edge0-35B-A3B-preview and Edge0-8B-A1B-preview, a Python framework on Apple Silicon (MLX), an OpenAI-style server and apps for macOS, iOS, Android and Windows.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Serve a 35B MoE model locally behind an OpenAI-style API: https://dedupedai.com/use-cases/edge0-ai-edge0/serve-a-35b-moe-locally-with-edge0/
- Chat with a local MoE model from the terminal in one command: https://dedupedai.com/use-cases/edge0-ai-edge0/chat-with-edge0-from-the-terminal/
- Embed a streaming MoE engine in your Python app: https://dedupedai.com/use-cases/edge0-ai-edge0/embed-edge0-in-a-python-app/

## How to serve a 35B MoE model locally behind an OpenAI-style API with Edge0

Repo: [Edge0-AI/Edge0](https://github.com/Edge0-AI/Edge0) | Difficulty: Intermediate | Time: 1 hour | Basis: From the README

Install edge0, download the 35B checkpoint and start a local chat completions server.

**Who it is for:** A Mac developer who wants a strong local model for apps and agents without a big GPU.

**The problem:** 35B-class models usually need far more memory than a laptop has.

**The outcome:** A local server at 127.0.0.1:8000 answering chat completions from Edge0-35B, with memory bounded by the active experts.

### Steps

1. Create the environment: `python3.12 -m venv .venv && .venv/bin/pip install -e '.[dev,fetch]'`
2. Fetch the model: `.venv/bin/python scripts/fetch_models.py --tier edge0-35b --target-dir models`
3. Export EDGE0_35B_MODEL to the model folder and start the server with `edge0 serve edge0-35b` (or `edge0 serve models/edge0-8b` for the small tier)
4. Send a request to http://127.0.0.1:8000/v1/chat/completions with curl as in the README
5. Point your app or agent at the local endpoint

### Prompt to paste into your agent

```text
Set up Edge0-AI/Edge0 on this Mac, fetch the edge0-35b tier, start the local server, send a test chat completion with curl, and report decode speed and peak memory.
```

### Caveat

The released models are previews, and the Python framework currently targets Apple Silicon with MLX; a CUDA backend is a reserved slot.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/edge0-ai-edge0/serve-a-35b-moe-locally-with-edge0/

## How to chat with a local MoE model from the terminal in one command with Edge0

Repo: [Edge0-AI/Edge0](https://github.com/Edge0-AI/Edge0) | Difficulty: Beginner | Time: 45 minutes | Basis: From the README

Run the edge0 demo or a one-shot chat prompt to try the model before wiring it into anything.

**Who it is for:** Someone curious whether a local 35B or 8B model is good enough for their tasks.

**The problem:** Evaluating a local model usually means building a server or app first.

**The outcome:** Quick answers from Edge0 in the terminal so you can judge quality and speed.

### Steps

1. Install edge0 and download a tier as in the README
2. Run `edge0 demo models/edge0-35b` for an interactive demo
3. Or ask one question: `edge0 chat edge0-35b --prompt "Explain streaming inference in one sentence."`
4. Try the 8B tier for faster answers on smaller machines
5. Run the benchmark with `python examples/bench.py edge0-35b` to compare tiers

### Prompt to paste into your agent

```text
Using Edge0-AI/Edge0, run the same five prompts from <list> on edge0-35b and edge0-8b with edge0 chat, and give me a table of answer quality and time per answer so I can pick a tier.
```

### Caveat

This card is written from the Edge0-AI/Edge0 README, not from a test run by Deduped. Before you start, make sure you have Python 3.12 on macOS with Apple Silicon for the Python framework. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/edge0-ai-edge0/chat-with-edge0-from-the-terminal/

## How to embed a streaming MoE engine in your Python app with Edge0

Repo: [Edge0-AI/Edge0](https://github.com/Edge0-AI/Edge0) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Use AutoEngine and ChatSession to run Edge0 inside your own code instead of a separate server.

**Who it is for:** A Python developer building a local assistant or tool on Apple Silicon.

**The problem:** Calling a separate server adds moving parts when you only need inference inside one app.

**The outcome:** Your app loading an Edge0 model with AutoEngine, running chat requests and releasing memory cleanly.

### Steps

1. Install edge0 in your environment
2. Load a model with `AutoEngine.from_pretrained("/path/to/model")`; the tier is detected automatically
3. Build a ChatRequest with your messages and max_tokens
4. Run it with ChatSession and decode the tokens
5. Call `engine.close()` to release mmaps and the expert cache

### Prompt to paste into your agent

```text
Write a small Python CLI with Edge0-AI/Edge0's AutoEngine and ChatSession that answers questions about files in <folder>, streams the answer, and always closes the engine on exit.
```

### Caveat

This card is written from the Edge0-AI/Edge0 README, not from a test run by Deduped. Before you start, make sure you have Python 3.12 on macOS with Apple Silicon for the Python framework. Check the repo for newer instructions before you rely on these steps.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/edge0-ai-edge0/embed-edge0-in-a-python-app/
