Instructions to use mlx-community/context-1-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/context-1-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("mlx-community/context-1-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
- LM Studio
- Pi new
How to use mlx-community/context-1-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 "mlx-community/context-1-MLX-4bit"
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/context-1-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mlx-community/context-1-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 "mlx-community/context-1-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 mlx-community/context-1-MLX-4bit
Run Hermes
hermes
- MLX LM
How to use mlx-community/context-1-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 "mlx-community/context-1-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/context-1-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": "mlx-community/context-1-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Context-1 — MLX 4-bit
MLX quantization of chromadb/context-1 for Apple Silicon.
- Converted with mlx-lm version 0.31.2
- Also available: context-1-MLX-6bit
Key Specs
| Detail | Value |
|---|---|
| Architecture | Mixture-of-Experts (MoE) Decoder-only Transformer |
| Base Model | gpt-oss-20b |
| Total Parameters | 20B |
| Experts | 32 routed, 4 active per token |
| Context Length | Up to 131,072 tokens |
| Attention | Alternating sliding window (128 tokens) + full attention |
| Quantization | 4-bit affine, group size 64 |
| Original Precision | BF16 |
| Disk Size | ~11 GB |
| Peak Memory | ~12 GB |
| Chat Template | Supported |
What is Context-1?
Context-1 is a 20B parameter agentic search model designed to retrieve supporting documents for complex, multi-hop queries. It works as a retrieval subagent alongside frontier reasoning models.
Key capabilities:
- Query decomposition — breaks complex multi-constraint questions into targeted subqueries
- Parallel tool calling — averages 2.56 tool calls per turn
- Self-editing context — prunes irrelevant documents mid-search (0.94 prune accuracy)
- Cross-domain generalization — trained on web, legal, and finance tasks
Performance: comparable to frontier LLMs at a fraction of the cost, up to 10x faster inference.
Performance on Apple Silicon
| Metric | Value |
|---|---|
| Prompt Processing | 227 tokens/sec |
| Generation | 172 tokens/sec |
| Peak Memory | 12 GB |
Requirements
- Apple Silicon Mac with 16GB+ unified memory
mlx-lm >= 0.31.2
pip install mlx-lm
Usage
CLI
mlx_lm.generate \
--model mlx-community/context-1-MLX-4bit \
--prompt "Your prompt here" \
--max-tokens 256
Python
from mlx_lm import load, generate
model, tokenizer = load("mlx-community/context-1-MLX-4bit")
response = generate(model, tokenizer, prompt="Your prompt here", max_tokens=256)
print(response)
LM Studio
This model is compatible with LM Studio on Apple Silicon. Search for context-1-MLX-4bit in the model browser and download directly.
Important: Agent Harness
Context-1 is designed to work with a specific agent harness that manages tool execution, token budgets, context pruning, and deduplication. The harness is not yet publicly released by Chroma. Running the model without it will not reproduce the reported benchmark results.
See the technical report for details on the agent harness design.
License
Credits
Citation
@techreport{bashir2026context1,
title = {Chroma Context-1: Training a Self-Editing Search Agent},
author = {Bashir, Hammad and Hong, Kelly and Jiang, Patrick and Shi, Zhiyi},
year = {2026},
month = {March},
institution = {Chroma},
url = {https://trychroma.com/research/context-1},
}
- Downloads last month
- 23
4-bit