Instructions to use leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx 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("leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx") 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 leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx"
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": "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx 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 "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx"
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 leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx"
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 "leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx" \ --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"
leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx
This model was converted to MLX format from Qwen/Qwen-AgentWorld-35B-A3B using BaseQuant_XL 6/8-bit mixed quantization optimized for Apple Silicon.
BaseQuant_XL keeps the most routing-critical layers in full bf16 precision — the MoE router gate, shared expert gate, shared expert, and lm_head — while applying aggressive quantization to the bulk parameters. This preserves routing accuracy and output quality where it matters most.
About the Source Model
Qwen-AgentWorld-35B-A3B is the first language world model — a model that simulates agentic environments via long chain-of-thought reasoning. Instead of executing actions, it predicts the next environment state given an agent's action and interaction history.
Key facts:
- Architecture: Qwen3.5-35B-A3B-Base MoE (35B total / 3B active, 256 experts, 8 active + 1 shared)
- Training: CPT → SFT → RL (GSPO) — environment modeling is the core training objective, not a post-hoc adaptation
- Domains: 7 unified agent interaction domains — MCP (tool calling), Search, Terminal, SWE, Android, Web, OS
- Context: 262,144 tokens
- Output: Predicts next environment observation using
<think>...</think>reasoning
Use with mlx
pip install -U mlx-vlm
python -m mlx_vlm.generate --model leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx --max-tokens 4096 --temperature 0.6 --top-p 0.95 --top-k 20 --prompt "Hello"
BaseQuant_XL Quantization Strategy
| Bit Depth | Layers | Rationale |
|---|---|---|
| bf16 (unquantized) | mlp.gate (router), shared_expert_gate, lm_head, shared_expert |
Routing decisions and shared computation path — errors here are qualitatively different from precision loss |
| 8-bit | embed_tokens, self_attn (full attention), linear_attn (DeltaNet) |
Every-token layers with moderate sensitivity — 8-bit is near-lossless |
| 6-bit | switch_mlp (routed experts) |
Bulk of parameters, only 8 of 256 experts active per token — natural redundancy tolerates lower precision |
Quantization Details
| Layer | Bits | Group Size |
|---|---|---|
mlp.gate (router) |
bf16 | — |
shared_expert_gate |
bf16 | — |
lm_head |
bf16 | — |
shared_expert |
bf16 | — |
embed_tokens |
8 | 64 |
self_attn (full attention) |
8 | 64 |
linear_attn (DeltaNet) |
8 | 64 |
switch_mlp (routed experts) |
6 | 64 |
| Default fallback | 8 | 64 |
- Quantization type: BaseQuant_XL mixed (text-only, vision tower absent)
- Bits per weight: 6.892
- Total size: ~28 GB (6 shards)
- Group size: 64
- Framework:
mlx_vlmwithstrict=False(text-only checkpoint with VLM architecture — same pattern as KAT-Coder-V2.5-Dev)
Recommended Inference Parameters
| Parameter | Value |
|---|---|
temperature |
0.6 |
top_p |
0.95 |
top_k |
20 |
max_tokens |
32,768 (increase for multi-step trajectories) |
reasoning_parser |
qwen3 |
enable_thinking |
true (default) |
Preserve thinking: This is a Qwen3.5 model. In LM Studio, enable
preserve_thinkingto capture reasoning content separately from output. Setchat_template_kwargs: {"preserve_thinking": true}in API payloads.
Text-only note: Although the config includes
vision_config, the checkpoint contains only language model weights (no vision tower). Use withstrict=Falseor--language-model-onlyin frameworks that check for vision components.
Flight Simulator Demo
AgentWorld-35B-A3B coding a flight simulator from scratch.
MLX Benchmarks (n=50, instruct mode)
| Benchmark | AgentWorld 6bit-XL | Qwen3.6-35B 6bit-XL | Agents-A1 6bit-XL | Ornith-35B 6bit-XL | Huihui-Qwen3.6 6bit-XL | Gemma-4 26B 6bit-XL |
|---|---|---|---|---|---|---|
| MMLU | 76% | 68% | 66% | 64% | 74% | 76% |
| MMLU_PRO | 66% | 60% | 58% | 66% | 66% | 82% |
| ARC_CHALLENGE | 74% | 90% | 90% | 92% | 92% | 90% |
| HUMANEVAL | 82% | 74% | 90% | 78% | 84% | 98% |
| MBPP | 78% | 80% | 70% | 78% | 78% | 82% |
| Average | 75.2% | 74.4% | 74.8% | 75.6% | 78.8% | 85.6% |
AgentWorld leads the Qwen3.6 family on MMLU (+8 over base) and MMLU_PRO (+6), reflecting its deep training on agent interaction domains that overlap with knowledge and reasoning tasks. The ARC_CHALLENGE drop (74% vs 90%) is notable — the world-model fine-tuning trades commonsense reasoning strength for environment simulation capability. Coding benchmarks (HUMANEVAL 82%, MBPP 78%) are strong, consistent with its SWE/Terminal domain coverage.
About XL Quantization
BaseQuant_XL is a data-agnostic (static) quantization method — it allocates precision based on layer role in the architecture, not calibration data. Unlike data-dependent methods (iMatrix, AWQ, GPTQ, oQ, oQ4e) which use calibration datasets that can skew representation toward well-represented domains, XL quantization treats all tokens equally. This makes it suitable for general-purpose use without domain bias.
- Downloads last month
- 133
6-bit
Model tree for leonsarmiento/Qwen-AgentWorld-35B-A3B-6bit-XL-mlx
Base model
Qwen/Qwen3.5-35B-A3B-Base