Text Generation
MLX
Safetensors
English
qwen3_5_moe
quantized
4bit
mtp
qwen3
agents
conversational
4-bit precision
Instructions to use wang-yang/Agents-A1-MTPLX-Q4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use wang-yang/Agents-A1-MTPLX-Q4 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("wang-yang/Agents-A1-MTPLX-Q4") 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 wang-yang/Agents-A1-MTPLX-Q4 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "wang-yang/Agents-A1-MTPLX-Q4"
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": "wang-yang/Agents-A1-MTPLX-Q4" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use wang-yang/Agents-A1-MTPLX-Q4 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 "wang-yang/Agents-A1-MTPLX-Q4"
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 wang-yang/Agents-A1-MTPLX-Q4
Run Hermes
hermes
- MLX LM
How to use wang-yang/Agents-A1-MTPLX-Q4 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "wang-yang/Agents-A1-MTPLX-Q4"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "wang-yang/Agents-A1-MTPLX-Q4" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wang-yang/Agents-A1-MTPLX-Q4", "messages": [ {"role": "user", "content": "Hello"} ] }'
How to use from
MLX LMRun an OpenAI-compatible server
# Install MLX LM
uv tool install mlx-lm# Start the server
mlx_lm.server --model "wang-yang/Agents-A1-MTPLX-Q4"
# Calling the OpenAI-compatible server with curl
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "wang-yang/Agents-A1-MTPLX-Q4",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Quick Links
Agents-A1-MTPLX-Q4
4-bit quantized MLX version of InternScience/Agents-A1 with grafted MTP (Multi-Token Prediction) head for speculative decoding on Apple Silicon.
Model Details
- Base model: InternScience/Agents-A1 (Qwen3.5-MoE architecture, 35B total / 3B active parameters)
- Quantization: 4-bit affine (group size 64), router gates at 8-bit
- MTP head: Grafted from Qwen3.5-35B-A3B (4-bit quantized, 1 layer)
- Format: MLX safetensors
- Disk size: ~18 GB (model) + 1.6 GB (MTP sidecar)
Architecture
- Hidden size: 2048
- Layers: 40 (hybrid linear + full attention)
- Experts: 256 total, 8 active per token
- Vocab: 248,320
- Context: 262,144 tokens
Usage with MTPLX
mtplx start --model wang-yang/Agents-A1-MTPLX-Q4
Usage with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("wang-yang/Agents-A1-MTPLX-Q4")
prompt = "<|im_start|>user\nHello!<|im_end|>\n<|im_start|>assistant\n"
result = generate(model, tokenizer, prompt=prompt, max_tokens=200)
Notes
- EOS token:
<|im_end|>(id 248046) - MTP speculative decoding: ~1.33x speedup (D2 best, 101.8 tok/s vs AR 76.6 tok/s on M3 Max 128GB).
Files
| File | Description |
|---|---|
model-0000X-of-00004.safetensors |
Quantized model weights (4 shards) |
mtp.safetensors |
MTP draft head weights (4-bit quantized) |
config.json |
Model architecture + quantization config |
tokenizer.json |
Tokenizer vocabulary |
tokenizer_config.json |
Tokenizer settings |
chat_template.jinja |
Chat template (no thinking mode) |
- Downloads last month
- 128
Model size
35B params
Tensor type
BF16
路
U32 路
F32 路
Hardware compatibility
Log In to add your hardware
4-bit
Model tree for wang-yang/Agents-A1-MTPLX-Q4
Base model
InternScience/Agents-A1
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm# Interactive chat REPL mlx_lm.chat --model "wang-yang/Agents-A1-MTPLX-Q4"