Image-Text-to-Text
MLX
Safetensors
qwen3_5_moe
vision-language
Mixture of Experts
agent
conversational
Instructions to use mlx-community/Agents-A1-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Agents-A1-bf16 with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("mlx-community/Agents-A1-bf16") config = load_config("mlx-community/Agents-A1-bf16") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use mlx-community/Agents-A1-bf16 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Agents-A1-bf16"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mlx-community/Agents-A1-bf16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/Agents-A1-bf16 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 "mlx-community/Agents-A1-bf16"
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 mlx-community/Agents-A1-bf16
Run Hermes
hermes
- OpenClaw new
How to use mlx-community/Agents-A1-bf16 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/Agents-A1-bf16"
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 "mlx-community/Agents-A1-bf16" \ --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,421 Bytes
4455b23 33ab198 4455b23 33ab198 4455b23 33ab198 a13eccf 33ab198 4455b23 33ab198 4455b23 33ab198 a13eccf 33ab198 4455b23 33ab198 4455b23 33ab198 4455b23 33ab198 4455b23 | 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 | ---
base_model: InternScience/Agents-A1
library_name: mlx
pipeline_tag: image-text-to-text
license: apache-2.0
tags:
- mlx
- vision-language
- moe
- agent
---
# Agents-A1 β MLX (bf16)
[MLX](https://github.com/ml-explore/mlx) conversion of [InternScience/Agents-A1](https://huggingface.co/InternScience/Agents-A1), in **bf16**. The source checkpoint is already bf16, so this is a lossless format conversion β not a quantization.
Agents-A1 is a Qwen3.5-MoE **vision-language** agent model (`qwen3_5_moe`, `Qwen3_5MoeForConditionalGeneration`): 40 decoder layers, 256 routed experts per layer + a shared expert, hidden size 2048, with a vision tower and video preprocessing.
## Running it
Multimodal (VLM) β load with **mlx-vlm** (mlx-lm can't load multimodal architectures):
```bash
pip install mlx-vlm
python -m mlx_vlm.generate --model mlx-community/Agents-A1-bf16 \
--prompt "What is 17 * 24? Think step by step." --max-tokens 512
# with an image:
python -m mlx_vlm.generate --model mlx-community/Agents-A1-bf16 --image img.jpg --prompt "Describe this image."
```
Loads and runs in **stock mlx-vlm** β no patched code needed at inference.
## Throughput
Measured with oMLX's benchmark harness on a Macbook Pro M5 Max 128GB 40 GPU β gen 128 tokens,
cold prefill (unique prompt prefix per request, no cache reuse).
### Single request (batch 1) β decode tok/s by context
| Context | bf16 | 8-bit | 6-bit | 5-bit | 4-bit | 3-bit |
|--------:|-----:|------:|------:|------:|------:|------:|
| 1,024 | 67.6 | 95.4 | 95.2 | 98.2 | 117.4 | 133.0 |
| 4,096 | 67.6 | 94.0 | 97.3 | 102.8 | 119.5 | 130.4 |
| 8,192 | 66.8 | 91.7 | 95.3 | 103.1 | 115.7 | 126.9 |
| 16,384 | 64.7 | 88.0 | 91.5 | 80.5 | 105.8 | 119.8 |
| 32,768 | 60.9 | 80.6 | 88.6 | 80.2 | 95.6 | 104.2 |
| 65,536 | 53.5 | 68.4 | 67.6 | 66.6 | 75.4 | 83.5 |
| 131,072 | 40.7 | 48.7 | 50.9 | 48.2 | 50.3 | 52.5 |
| **Peak RAM (GB)** | 66β69 | 35β39 | 27β31 | 23β26 | 19β22 | 15β18 |
TTFT (cold prefill) is ~precision-independent β β0.3 s @1k, 3 s @8k, 21 s @32k, 63 s @64k,
~225 s @128k β prefill is compute-bound, not weight-bound.
### Continuous batching (1k context) β aggregate decode tok/s
| Batch | bf16 | 8-bit | 6-bit | 5-bit | 4-bit | 3-bit |
|------:|-----:|------:|------:|------:|------:|------:|
| 1 | 67.6 | 95.4 | 95.2 | 98.2 | 117.4 | 133.0 |
| 2 | 62.5 | 151.0 | 156.5 | 160.6 | 190.9 | 188.7 |
| 4 | 107.1 | 202.0 | 185.1 | 195.7 | 239.9 | 230.2 |
| 8 | 129.6 | 252.4 | 223.4 | 238.7 | 289.0 | 276.1 |
Aggregate across the batch; per-request rate is that value divided by the batch size.
## Smoke test
`17 x 24` -> correct (`408`), coherent, no repetition.
## Other precisions
| Precision | Repo | Size on disk |
|---|---|---|
| bf16 (full) | [Agents-A1-bf16](https://huggingface.co/mlx-community/Agents-A1-bf16) | ~65 GB |
| 8-bit | [Agents-A1-8bit](https://huggingface.co/mlx-community/Agents-A1-8bit) | ~35 GB |
| 6-bit | [Agents-A1-6bit](https://huggingface.co/mlx-community/Agents-A1-6bit) | ~27 GB |
| 5-bit | [Agents-A1-5bit](https://huggingface.co/mlx-community/Agents-A1-5bit) | ~23 GB |
| 4-bit | [Agents-A1-4bit](https://huggingface.co/mlx-community/Agents-A1-4bit) | ~19 GB |
| 3-bit | [Agents-A1-3bit](https://huggingface.co/mlx-community/Agents-A1-3bit) | ~15 GB |
## License
apache-2.0, inherited from the base model.
|