Instructions to use baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use baa-ai/Qwen3.5-35B-A3B-RAM-21GB-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("baa-ai/Qwen3.5-35B-A3B-RAM-21GB-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
- LM Studio
- Pi new
How to use baa-ai/Qwen3.5-35B-A3B-RAM-21GB-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 "baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX"
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": "baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use baa-ai/Qwen3.5-35B-A3B-RAM-21GB-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 "baa-ai/Qwen3.5-35B-A3B-RAM-21GB-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 baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX
Run Hermes
hermes
- MLX LM
How to use baa-ai/Qwen3.5-35B-A3B-RAM-21GB-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 "baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }'
Qwen3.5-35B-A3B — 21GB (MLX)
Mixed-precision quantized version of Qwen/Qwen3.5-35B-A3B optimised by baa.ai using a proprietary Black Sheep AI method.
Per-tensor bit-width allocation via advanced sensitivity analysis and budget-constrained optimisation — no calibration data required.
Metrics
| Metric | Value |
|---|---|
| Size on disk | 21.27 GB |
| Average bits (LLM body) | 4.43 |
| Bit distribution (LLM body) | 0% 2-bit, 5% 3-bit, 70% 4-bit, 18% 5-bit, 3% 6-bit, 3% 8-bit, 1% 16-bit |
| Embeddings + lm_head | 4-bit |
| WikiText-2 PPL (median, 256×2048, seed 42) | 6.623 |
| WikiText-2 PPL (mean) | 6.680 |
Usage
from mlx_lm import load, generate
model, tokenizer = load("baa-ai/Qwen3.5-35B-A3B-RAM-21GB-MLX")
response = generate(model, tokenizer, prompt="Hello!", max_tokens=256)
print(response)
For chat applications, apply the chat template:
prompt = tokenizer.apply_chat_template(
[{"role": "user", "content": "Write a Python function that reverses a string."}],
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
response = generate(model, tokenizer, prompt=prompt, max_tokens=2048)
Hardware
Apple Silicon Mac with ~28 GB unified memory recommended for inference.
Variants
Other size points in this collection:
Quantized by baa.ai
Black Sheep AI Products
Shepherd — Private AI deployment platform that shrinks frontier models by 50-60% through RAM compression, enabling enterprises to run sophisticated AI on single GPU instances or Apple Silicon hardware. Deploy in your VPC with zero data leaving your infrastructure. Includes CI/CD pipeline integration, fleet deployment across Apple Silicon clusters, air-gapped and sovereign deployment support, and multi-format export (MLX, GGUF). Annual cloud costs from ~$2,700 — or run on a Mac Studio for electricity only.
Watchman — Capability audit and governance platform for compressed AI models. Know exactly what your quantized model can do before it goes live. Watchman predicts which capabilities survive compression in minutes — replacing weeks of benchmarking. Includes compliance-ready reporting for regulated industries, quality valley warnings for counterproductive memory allocations, instant regression diagnosis tracing issues to specific tensors, and 22 adversarial security probes scanning for injection, leakage, hallucination, and code vulnerabilities.
Learn more at baa.ai — Sovereign AI.
- Downloads last month
- 206
4-bit