Text Generation
MLX
Safetensors
laguna
atomic-chat
poolside
apple-silicon
quantized
conversational
custom_code
5-bit
Instructions to use AtomicChat/Laguna-XS-2.1-MLX-5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use AtomicChat/Laguna-XS-2.1-MLX-5bit 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-XS-2.1-MLX-5bit") 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-XS-2.1-MLX-5bit 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-XS-2.1-MLX-5bit"
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": "AtomicChat/Laguna-XS-2.1-MLX-5bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use AtomicChat/Laguna-XS-2.1-MLX-5bit 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-XS-2.1-MLX-5bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "AtomicChat/Laguna-XS-2.1-MLX-5bit" # 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-XS-2.1-MLX-5bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use AtomicChat/Laguna-XS-2.1-MLX-5bit 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-XS-2.1-MLX-5bit"
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-XS-2.1-MLX-5bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AtomicChat/Laguna-XS-2.1-MLX-5bit 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-XS-2.1-MLX-5bit"
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-XS-2.1-MLX-5bit" \ --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"
forge: regenerate the model card
Browse files
README.md
CHANGED
|
@@ -1,19 +1,17 @@
|
|
| 1 |
---
|
| 2 |
license: openmdw-1.1
|
| 3 |
license_link: https://huggingface.co/poolside/Laguna-XS-2.1/blob/main/LICENSE.md
|
|
|
|
| 4 |
base_model:
|
| 5 |
- poolside/Laguna-XS-2.1
|
| 6 |
base_model_relation: quantized
|
| 7 |
-
quantized_by:
|
| 8 |
pipeline_tag: text-generation
|
| 9 |
library_name: mlx
|
| 10 |
tags:
|
| 11 |
- atomic-chat
|
| 12 |
- laguna
|
| 13 |
- poolside
|
| 14 |
-
- coding
|
| 15 |
-
- agent
|
| 16 |
-
- moe
|
| 17 |
- mlx
|
| 18 |
- apple-silicon
|
| 19 |
- quantized
|
|
@@ -22,91 +20,76 @@ tags:
|
|
| 22 |
<center>
|
| 23 |
|
| 24 |
<div style="display:flex; justify-content:center; align-items:center; gap:2%; max-width:560px; margin:0 auto;">
|
| 25 |
-
<a href="https://atomic.chat"><img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/
|
| 26 |
-
<a href="https://discord.gg/8wGSsvmg4V"><img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/pill_discord_v3.png" alt="Discord" style="width:100%; height:auto; max-width:184px;"></a>
|
| 27 |
-
<a href="https://github.com/AtomicBot-ai/Atomic-Chat"><img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/pill_github_v3.png" alt="GitHub" style="width:100%; height:auto; max-width:141px;"></a>
|
| 28 |
</div>
|
| 29 |
|
| 30 |
<br/>
|
| 31 |
|
| 32 |
-
<img src="https://
|
| 33 |
|
| 34 |
<div style="display:flex; justify-content:center; gap:0.5em;">
|
| 35 |
<a href="https://huggingface.co/poolside/Laguna-XS-2.1"><strong>Base model: poolside/Laguna-XS-2.1</strong></a>
|
| 36 |
</div>
|
| 37 |
</center>
|
| 38 |
|
| 39 |
-
**Laguna XS 2.1**, quantized to
|
| 40 |
|
| 41 |
## Highlights
|
| 42 |
|
| 43 |
-
- **
|
| 44 |
-
- **
|
| 45 |
-
- **
|
| 46 |
-
- **
|
| 47 |
-
- **
|
| 48 |
-
- **
|
|
|
|
| 49 |
|
| 50 |
> [!NOTE]
|
| 51 |
-
> These are **
|
| 52 |
|
| 53 |
## Model Overview
|
| 54 |
|
| 55 |
| Property | Value |
|
| 56 |
|---|---|
|
| 57 |
| Base model | `poolside/Laguna-XS-2.1` |
|
| 58 |
-
|
|
| 59 |
-
|
|
| 60 |
-
| Experts | 256
|
| 61 |
-
| Layers | 40 (10 global, 30 sliding-window) |
|
| 62 |
| Sliding window | 512 tokens |
|
| 63 |
-
| Context length | 262,144 |
|
| 64 |
-
|
|
| 65 |
-
|
|
|
|
|
|
|
|
| 66 |
|
| 67 |
-
<img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/benchmark.png" alt="Laguna XS 2.1
|
| 68 |
-
|
| 69 |
-
Scores are poolside's published results for the full-precision base `poolside/Laguna-XS-2.1`. The MLX quants run the same model locally; lower bit-widths trade a little accuracy for size and speed.
|
| 70 |
-
|
| 71 |
-
## This quant
|
| 72 |
-
|
| 73 |
-
This repo is the **5-bit** MLX build (~21 GB). The full ladder (5/6/8-bit) lives in the [Laguna XS 2.1 collection](https://huggingface.co/collections/AtomicChat/laguna-xs-21-6a468ed7a585a924f9fe40e0).
|
| 74 |
|
|
|
|
| 75 |
|
| 76 |
## Get started
|
| 77 |
|
| 78 |
-
- **[Atomic Chat](https://atomic.chat):**
|
| 79 |
-
- **mlx-
|
| 80 |
-
|
| 81 |
-
pip install -U mlx-vlm
|
| 82 |
-
python -m mlx_vlm generate --model AtomicChat/Laguna-XS-2.1-MLX-5bit-5bit \
|
| 83 |
-
--prompt "Write a Python retry wrapper with exponential backoff." \
|
| 84 |
-
--max-tokens 512 --temperature 1.0
|
| 85 |
-
```
|
| 86 |
-
- **mlx-vlm (OpenAI-compatible server):**
|
| 87 |
-
```bash
|
| 88 |
-
python -m mlx_vlm server --model AtomicChat/Laguna-XS-2.1-MLX-5bit-5bit --host 0.0.0.0 --port 8080
|
| 89 |
-
# POST http://localhost:8080/v1/chat/completions with "model": "6bit"
|
| 90 |
-
```
|
| 91 |
-
|
| 92 |
-
Reasoning is native and on by default. Start the server with `--enable-thinking` (optionally `--thinking-budget N`) to keep it; omit the flag for direct, non-reasoning replies.
|
| 93 |
|
| 94 |
## Best practices
|
| 95 |
|
| 96 |
| Parameter | Value |
|
| 97 |
|---|---|
|
| 98 |
| temperature | 1.0 |
|
|
|
|
| 99 |
| top_k | 20 |
|
| 100 |
-
|
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
## How these were made
|
| 105 |
|
| 106 |
-
1. Download `poolside/Laguna-XS-2.1` (original
|
| 107 |
-
2.
|
| 108 |
|
| 109 |
## License
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: openmdw-1.1
|
| 3 |
license_link: https://huggingface.co/poolside/Laguna-XS-2.1/blob/main/LICENSE.md
|
| 4 |
+
thumbnail: https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/hero.png
|
| 5 |
base_model:
|
| 6 |
- poolside/Laguna-XS-2.1
|
| 7 |
base_model_relation: quantized
|
| 8 |
+
quantized_by: AtomicChat
|
| 9 |
pipeline_tag: text-generation
|
| 10 |
library_name: mlx
|
| 11 |
tags:
|
| 12 |
- atomic-chat
|
| 13 |
- laguna
|
| 14 |
- poolside
|
|
|
|
|
|
|
|
|
|
| 15 |
- mlx
|
| 16 |
- apple-silicon
|
| 17 |
- quantized
|
|
|
|
| 20 |
<center>
|
| 21 |
|
| 22 |
<div style="display:flex; justify-content:center; align-items:center; gap:2%; max-width:560px; margin:0 auto;">
|
| 23 |
+
<a href="https://atomic.chat" style="flex:0 1 auto; min-width:0;"><img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/pill_atomic_v3.png" alt="Atomic Chat" style="width:100%; height:auto; max-width:186px;"></a>
|
| 24 |
+
<a href="https://discord.gg/8wGSsvmg4V" style="flex:0 1 auto; min-width:0;"><img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/pill_discord_v3.png" alt="Join Discord" style="width:100%; height:auto; max-width:184px;"></a>
|
| 25 |
+
<a href="https://github.com/AtomicBot-ai/Atomic-Chat" style="flex:0 1 auto; min-width:0;"><img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/pill_github_v3.png" alt="GitHub" style="width:100%; height:auto; max-width:141px;"></a>
|
| 26 |
</div>
|
| 27 |
|
| 28 |
<br/>
|
| 29 |
|
| 30 |
+
<img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/hero.png" alt="Laguna XS 2.1" style="width:100%; max-width:100%; height:auto; margin-bottom:0.6em;"/>
|
| 31 |
|
| 32 |
<div style="display:flex; justify-content:center; gap:0.5em;">
|
| 33 |
<a href="https://huggingface.co/poolside/Laguna-XS-2.1"><strong>Base model: poolside/Laguna-XS-2.1</strong></a>
|
| 34 |
</div>
|
| 35 |
</center>
|
| 36 |
|
| 37 |
+
**Laguna XS 2.1**, self-quantized to MLX by [Atomic Chat](https://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.
|
| 38 |
|
| 39 |
## Highlights
|
| 40 |
|
| 41 |
+
- **33.4B parameters**: the weights this repo quantizes.
|
| 42 |
+
- **Context length**: 262,144 tokens (256K), as published by Poolside.
|
| 43 |
+
- **40 layers**: Mixture-of-Experts, hybrid sliding-window (512) and global attention.
|
| 44 |
+
- **Full imatrix ladder**: every quant is calibrated with an importance matrix.
|
| 45 |
+
- **Mixed SWA and global attention layout**: Laguna XS 2.1 uses sigmoid gating with per-layer rotary scales, enabling mixed SWA (Sliding Window Attention) and global attention layers in a 3:1 ratio (across 40 total layers).
|
| 46 |
+
- **KV cache in FP8**: KV cache quantized to FP8, reducing memory per token.
|
| 47 |
+
- **Native reasoning support**: Interleaved thinking between tool calls with support for enabling and disabling thinking per-request.
|
| 48 |
|
| 49 |
> [!NOTE]
|
| 50 |
+
> 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.
|
| 51 |
|
| 52 |
## Model Overview
|
| 53 |
|
| 54 |
| Property | Value |
|
| 55 |
|---|---|
|
| 56 |
| Base model | `poolside/Laguna-XS-2.1` |
|
| 57 |
+
| Parameters | 33.4B |
|
| 58 |
+
| Layers | 40 |
|
| 59 |
+
| Experts | 256 routed (top-8) |
|
|
|
|
| 60 |
| Sliding window | 512 tokens |
|
| 61 |
+
| Context length | 262,144 tokens (256K) |
|
| 62 |
+
| Vocabulary | 100,352 |
|
| 63 |
+
| Modalities | Text |
|
| 64 |
+
| Architecture | Mixture-of-Experts, 256 experts (top-8), hybrid sliding-window (512) and global attention, 48 attention heads over 8 KV heads, `LagunaForCausalLM` |
|
| 65 |
+
| This repo | MLX weights |
|
| 66 |
|
| 67 |
+
<img src="https://huggingface.co/AtomicChat/Laguna-XS-2.1-MLX-5bit/resolve/main/benchmark.png" alt="Laguna XS 2.1 benchmark scores" style="width:100%; max-width:900px;"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
+
Scores are Poolside's published results for the base `poolside/Laguna-XS-2.1`, not our own measurements. Quantization preserves the large majority of this; `Q4_K_M` and up stay close to full precision.
|
| 70 |
|
| 71 |
## Get started
|
| 72 |
|
| 73 |
+
- **[Atomic Chat](https://atomic.chat):** search `AtomicChat/Laguna-XS-2.1-MLX-5bit` and hit **Use this model**.
|
| 74 |
+
- **mlx-lm:** `mlx_lm.generate --model AtomicChat/Laguna-XS-2.1-MLX-5bit --prompt "Hello" --max-tokens 512`
|
| 75 |
+
- **Server:** `mlx_lm.server --model AtomicChat/Laguna-XS-2.1-MLX-5bit --port 8080`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
## Best practices
|
| 78 |
|
| 79 |
| Parameter | Value |
|
| 80 |
|---|---|
|
| 81 |
| temperature | 1.0 |
|
| 82 |
+
| top_p | 1 |
|
| 83 |
| top_k | 20 |
|
| 84 |
+
| min_p | 0.0 |
|
| 85 |
|
| 86 |
+
Poolside's recommended sampling configuration for `poolside/Laguna-XS-2.1`.
|
| 87 |
|
| 88 |
## How these were made
|
| 89 |
|
| 90 |
+
1. Download `poolside/Laguna-XS-2.1` (original weights).
|
| 91 |
+
2. Convert and quantize with `mlx_lm.convert` on our pipeline.
|
| 92 |
|
| 93 |
## License
|
| 94 |
|
| 95 |
+
Original model by Poolside, released under the OpenMDW-1.1 license. Full terms: [OpenMDW-1.1](https://huggingface.co/poolside/Laguna-XS-2.1/blob/main/LICENSE.md). Quantized by Atomic Chat.
|
|
|