Instructions to use AtomicChat/Laguna-S-2.1-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AtomicChat/Laguna-S-2.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("AtomicChat/Laguna-S-2.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 Settings
- LM Studio
- Pi
How to use AtomicChat/Laguna-S-2.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 "AtomicChat/Laguna-S-2.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": "AtomicChat/Laguna-S-2.1-MLX-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use AtomicChat/Laguna-S-2.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 "AtomicChat/Laguna-S-2.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 AtomicChat/Laguna-S-2.1-MLX-4bit
Run Hermes
hermes
- OpenClaw new
How to use AtomicChat/Laguna-S-2.1-MLX-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "AtomicChat/Laguna-S-2.1-MLX-4bit"
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 "AtomicChat/Laguna-S-2.1-MLX-4bit" \ --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"
- MLX LM
How to use AtomicChat/Laguna-S-2.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 "AtomicChat/Laguna-S-2.1-MLX-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "AtomicChat/Laguna-S-2.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": "AtomicChat/Laguna-S-2.1-MLX-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Laguna S 2.1, self-quantized to MLX by Atomic Chat. Built straight from Poolside's original weights with a per-tensor importance matrix, so this is not a repack of somebody else's files. Runs fully offline.
Highlights
- 117.6B parameters: the weights this repo quantizes.
- Context length: 1,048,576 tokens (1M), as published by Poolside.
- 48 layers: Mixture-of-Experts, hybrid sliding-window (512) and global attention.
- Full imatrix ladder: every quant is calibrated with an importance matrix.
- Mixed SWA and global attention layout: 48 layers in a 1:3 global-to-SWA ratio (12 global attention layers, 36 sliding-window layers, window 512), with softplus attention gating and per-layer-type rotary scales.
- Native reasoning support: interleaved thinking between tool calls, with per-request control via enable_thinking.
- Speculative decoding: a trained DFlash draft model is available for lower-latency serving.
These MLXs are self-quantized from the original weights, not a repack. The importance matrix keeps low-bit quants closer to the full-precision model.
Model Overview
| Property | Value |
|---|---|
| Base model | poolside/Laguna-S-2.1 |
| Parameters | 117.6B |
| Layers | 48 |
| Experts | 256 routed (top-10) |
| Sliding window | 512 tokens |
| Context length | 1,048,576 tokens (1M) |
| Vocabulary | 100,352 |
| Modalities | Text |
| Architecture | Mixture-of-Experts, 256 experts (top-10), hybrid sliding-window (512) and global attention, 48 attention heads over 8 KV heads, LagunaForCausalLM |
| This repo | MLX weights |
Benchmarks
| Benchmark | Score |
|---|---|
| Laguna S 2.1 | 70.2% |
| Tencent Hy3 | 71.7% |
| Inkling | 63.8% |
| Nemotron 3 Ultra | 56.4% |
| DeepSeek-V4-Pro Max | 64.0% |
| Kimi K3 | 88.3% |
| Qwen 3.7 Max | 74.5% |
| Muse Spark 1.1 | 80% |
| Claude Fable 5 | 88% |
Scores are Poolside's published results for the base poolside/Laguna-S-2.1, not our own measurements. Quantization preserves the large majority of this; Q4_K_M and up stay close to full precision.
Get started
- Atomic Chat: search
AtomicChat/Laguna-S-2.1-MLX-4bitand hit Use this model. - mlx-lm:
mlx_lm.generate --model AtomicChat/Laguna-S-2.1-MLX-4bit --prompt "Hello" --max-tokens 512 - Server:
mlx_lm.server --model AtomicChat/Laguna-S-2.1-MLX-4bit --port 8080
Best practices
| Parameter | Value |
|---|---|
| temperature | 1.0 |
| top_p | 1.0 |
| top_k | 20 |
| min_p | 0.0 |
Poolside's recommended sampling configuration for poolside/Laguna-S-2.1.
How these were made
- Download
poolside/Laguna-S-2.1(original weights). - Convert and quantize with
mlx_lm.converton our pipeline.
License
Original model by Poolside, released under the OpenMDW-1.1 license. Full terms: OpenMDW-1.1. Quantized by Atomic Chat.
- Downloads last month
- 387
4-bit
Model tree for AtomicChat/Laguna-S-2.1-MLX-4bit
Base model
poolside/Laguna-S-2.1Collection including AtomicChat/Laguna-S-2.1-MLX-4bit
Evaluation results
- datacurve/deep-swe · Deep Swe View evaluation results source leaderboard 40.4
- ScaleAI/SWE-bench_Pro · SWE Bench Pro View evaluation results source leaderboard 59.4
- SWE-bench/SWE-bench_Multilingual · Swe Bench Resolved View evaluation results source 78.5


