Text Generation
MLX
Safetensors
English
gpt_oss
mixture-of-experts
6bit
quantized
apple-silicon
conversational
agentic
retrieval
search
tool-calling
lm-studio
6-bit
Instructions to use mlx-community/context-1-MLX-6bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/context-1-MLX-6bit 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-6bit") 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 mlx-community/context-1-MLX-6bit 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-6bit"
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-6bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/context-1-MLX-6bit 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-6bit"
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-6bit" # 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-6bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use mlx-community/context-1-MLX-6bit 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-6bit"
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-6bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/context-1-MLX-6bit 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/context-1-MLX-6bit"
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/context-1-MLX-6bit" \ --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"
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
library_name: mlx
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
base_model: chromadb/context-1
|
| 7 |
+
tags:
|
| 8 |
+
- mlx
|
| 9 |
+
- safetensors
|
| 10 |
+
- gpt_oss
|
| 11 |
+
- mixture-of-experts
|
| 12 |
+
- 6bit
|
| 13 |
+
- quantized
|
| 14 |
+
- apple-silicon
|
| 15 |
+
- text-generation
|
| 16 |
+
- conversational
|
| 17 |
+
- agentic
|
| 18 |
+
- retrieval
|
| 19 |
+
- search
|
| 20 |
+
- tool-calling
|
| 21 |
+
- lm-studio
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
# Context-1 — MLX 6-bit
|
| 25 |
+
|
| 26 |
+
MLX quantization of [chromadb/context-1](https://huggingface.co/chromadb/context-1) for Apple Silicon.
|
| 27 |
+
|
| 28 |
+
- Converted with [mlx-lm](https://github.com/ml-explore/mlx-lm) version 0.31.2
|
| 29 |
+
- Also available: [context-1-MLX-4bit](https://huggingface.co/mlx-community/context-1-MLX-4bit)
|
| 30 |
+
|
| 31 |
+
## Key Specs
|
| 32 |
+
|
| 33 |
+
| Detail | Value |
|
| 34 |
+
|---|---|
|
| 35 |
+
| Architecture | Mixture-of-Experts (MoE) Decoder-only Transformer |
|
| 36 |
+
| Base Model | gpt-oss-20b |
|
| 37 |
+
| Total Parameters | 20B |
|
| 38 |
+
| Experts | 32 routed, 4 active per token |
|
| 39 |
+
| Context Length | Up to 131,072 tokens |
|
| 40 |
+
| Attention | Alternating sliding window (128 tokens) + full attention |
|
| 41 |
+
| Quantization | 6-bit affine, group size 64 |
|
| 42 |
+
| Original Precision | BF16 |
|
| 43 |
+
| Disk Size | ~16 GB |
|
| 44 |
+
| Peak Memory | ~17 GB |
|
| 45 |
+
| Chat Template | Supported |
|
| 46 |
+
|
| 47 |
+
## What is Context-1?
|
| 48 |
+
|
| 49 |
+
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.
|
| 50 |
+
|
| 51 |
+
Key capabilities:
|
| 52 |
+
- **Query decomposition** — breaks complex multi-constraint questions into targeted subqueries
|
| 53 |
+
- **Parallel tool calling** — averages 2.56 tool calls per turn
|
| 54 |
+
- **Self-editing context** — prunes irrelevant documents mid-search (0.94 prune accuracy)
|
| 55 |
+
- **Cross-domain generalization** — trained on web, legal, and finance tasks
|
| 56 |
+
|
| 57 |
+
Performance: comparable to frontier LLMs at a fraction of the cost, up to **10x faster inference**.
|
| 58 |
+
|
| 59 |
+
## Performance on Apple Silicon
|
| 60 |
+
|
| 61 |
+
| Metric | Value |
|
| 62 |
+
|---|---|
|
| 63 |
+
| Prompt Processing | 186 tokens/sec |
|
| 64 |
+
| Generation | 127 tokens/sec |
|
| 65 |
+
| Peak Memory | 17 GB |
|
| 66 |
+
|
| 67 |
+
## Requirements
|
| 68 |
+
|
| 69 |
+
- Apple Silicon Mac with 24GB+ unified memory
|
| 70 |
+
- `mlx-lm >= 0.31.2`
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
pip install mlx-lm
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
## Usage
|
| 77 |
+
|
| 78 |
+
### CLI
|
| 79 |
+
|
| 80 |
+
```bash
|
| 81 |
+
mlx_lm.generate \
|
| 82 |
+
--model mlx-community/context-1-MLX-6bit \
|
| 83 |
+
--prompt "Your prompt here" \
|
| 84 |
+
--max-tokens 256
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
### Python
|
| 88 |
+
|
| 89 |
+
```python
|
| 90 |
+
from mlx_lm import load, generate
|
| 91 |
+
|
| 92 |
+
model, tokenizer = load("mlx-community/context-1-MLX-6bit")
|
| 93 |
+
response = generate(model, tokenizer, prompt="Your prompt here", max_tokens=256)
|
| 94 |
+
print(response)
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### LM Studio
|
| 98 |
+
|
| 99 |
+
This model is compatible with [LM Studio](https://lmstudio.ai) on Apple Silicon. Search for `context-1-MLX-6bit` in the model browser and download directly.
|
| 100 |
+
|
| 101 |
+
## Important: Agent Harness
|
| 102 |
+
|
| 103 |
+
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.
|
| 104 |
+
|
| 105 |
+
See the [technical report](https://trychroma.com/research/context-1) for details on the agent harness design.
|
| 106 |
+
|
| 107 |
+
## License
|
| 108 |
+
|
| 109 |
+
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
| 110 |
+
|
| 111 |
+
## Credits
|
| 112 |
+
|
| 113 |
+
- Base model by [Chroma](https://trychroma.com)
|
| 114 |
+
- MLX quantization by [FF-01](https://huggingface.co/FF-01)
|
| 115 |
+
|
| 116 |
+
## Citation
|
| 117 |
+
|
| 118 |
+
```bibtex
|
| 119 |
+
@techreport{bashir2026context1,
|
| 120 |
+
title = {Chroma Context-1: Training a Self-Editing Search Agent},
|
| 121 |
+
author = {Bashir, Hammad and Hong, Kelly and Jiang, Patrick and Shi, Zhiyi},
|
| 122 |
+
year = {2026},
|
| 123 |
+
month = {March},
|
| 124 |
+
institution = {Chroma},
|
| 125 |
+
url = {https://trychroma.com/research/context-1},
|
| 126 |
+
}
|
| 127 |
+
```
|