Text Generation
MLX
Safetensors
English
Chinese
qwen3_5
agnes
4bit
hybrid-attention
gated-delta-net
conversational
4-bit precision
Instructions to use hermitdave/Agnes-3.0-Flash-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use hermitdave/Agnes-3.0-Flash-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("hermitdave/Agnes-3.0-Flash-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 hermitdave/Agnes-3.0-Flash-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 "hermitdave/Agnes-3.0-Flash-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": "hermitdave/Agnes-3.0-Flash-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use hermitdave/Agnes-3.0-Flash-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 "hermitdave/Agnes-3.0-Flash-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "hermitdave/Agnes-3.0-Flash-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": "hermitdave/Agnes-3.0-Flash-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use hermitdave/Agnes-3.0-Flash-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 "hermitdave/Agnes-3.0-Flash-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 hermitdave/Agnes-3.0-Flash-MLX-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use hermitdave/Agnes-3.0-Flash-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 "hermitdave/Agnes-3.0-Flash-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 "hermitdave/Agnes-3.0-Flash-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"
Add oMLX DFlash note: shipped MTP drafter fails (nested config), use z-lab/Qwen3.8-27B-DFlash2 (+45% tok/s)
Browse files
README.md
CHANGED
|
@@ -72,6 +72,32 @@ mtp.bind(base_model)
|
|
| 72 |
The drafter is architecture-compatible with Qwen3.5's gated attention and was extracted from the original Agnes-3.0-Flash model. See the [MTP drafter repo](https://huggingface.co/hermitdave/Agnes-3.0-Flash-MTP-drafter) for details.
|
| 73 |
|
| 74 |
**Note:** oMLX does not yet support MTP for text-only models. Use `mlx_vlm.server` or the Python API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
## Attribution
|
| 76 |
|
| 77 |
This conversion was produced by [Hermes Agent](https://hermes-agent.nousresearch.com) (Nous Research) — the autonomous research and conversion pipeline that identified the correct quantization parameters, fixed one-centered norm conversion, and validated output quality. Verified against the reference verison/Agnes-3.0-Flash-MLX-4bit model.
|
|
|
|
| 72 |
The drafter is architecture-compatible with Qwen3.5's gated attention and was extracted from the original Agnes-3.0-Flash model. See the [MTP drafter repo](https://huggingface.co/hermitdave/Agnes-3.0-Flash-MTP-drafter) for details.
|
| 73 |
|
| 74 |
**Note:** oMLX does not yet support MTP for text-only models. Use `mlx_vlm.server` or the Python API.
|
| 75 |
+
|
| 76 |
+
### ⚠️ oMLX users: the shipped MTP drafter does not work as a DFlash drafter
|
| 77 |
+
|
| 78 |
+
The companion Agnes MTP drafter **cannot be paired with this model for oMLX DFlash speculative decoding**. Its `config.json` nests the model fields under `text_config` (qwen3_5_mtp convention), so oMLX's drafter construction fails and it **silently falls back to plain batched decoding** — no error in the UI, no speedup:
|
| 79 |
+
|
| 80 |
+
```
|
| 81 |
+
DFlash start failed: DFlashDraftModelArgs.__init__() missing 11 required
|
| 82 |
+
positional arguments: 'hidden_size', 'num_hidden_layers', ...
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
**Use [z-lab/Qwen3.8-27B-DFlash2](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2) as the oMLX DFlash drafter instead** — same tokenizer (vocab 248,320), same hidden size (5,120), same qwen3_5-family architecture. Download it via the oMLX model browser (lands in `~/.omlx/models/z-lab/Qwen3.8-27B-DFlash2`), then enable DFlash in the model's settings, or via the admin API:
|
| 86 |
+
|
| 87 |
+
```bash
|
| 88 |
+
curl -X PUT http://127.0.0.1:8000/admin/api/models/<model_id>/settings \
|
| 89 |
+
-H "Content-Type: application/json" \
|
| 90 |
+
-H "X-Api-Key: <your-api-key>" \
|
| 91 |
+
-d '{
|
| 92 |
+
"dflash_enabled": true,
|
| 93 |
+
"dflash_draft_model": "~/.omlx/models/z-lab/Qwen3.8-27B-DFlash2"
|
| 94 |
+
}'
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
**Measured** (M3 Max 64 GB, oMLX, temp 0, 500-token code generations): plain batched 16.5–17.2 tok/s → DFlash with the Qwen3.8 drafter **24.3–24.6 tok/s (+45%)**.
|
| 98 |
+
|
| 99 |
+
Verify engagement in `~/.omlx/logs/server.log`: you want `DFlashEngine loaded`, not `DFlash start failed ... fallback from DFlash`.
|
| 100 |
+
|
| 101 |
## Attribution
|
| 102 |
|
| 103 |
This conversion was produced by [Hermes Agent](https://hermes-agent.nousresearch.com) (Nous Research) — the autonomous research and conversion pipeline that identified the correct quantization parameters, fixed one-centered norm conversion, and validated output quality. Verified against the reference verison/Agnes-3.0-Flash-MLX-4bit model.
|