Instructions to use OsaurusAI/Laguna-XS-2.1-JANG_2L with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use OsaurusAI/Laguna-XS-2.1-JANG_2L 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("OsaurusAI/Laguna-XS-2.1-JANG_2L") 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 OsaurusAI/Laguna-XS-2.1-JANG_2L with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/Laguna-XS-2.1-JANG_2L"
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": "OsaurusAI/Laguna-XS-2.1-JANG_2L" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use OsaurusAI/Laguna-XS-2.1-JANG_2L 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 "OsaurusAI/Laguna-XS-2.1-JANG_2L"
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 OsaurusAI/Laguna-XS-2.1-JANG_2L
Run Hermes
hermes
- OpenClaw new
How to use OsaurusAI/Laguna-XS-2.1-JANG_2L with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "OsaurusAI/Laguna-XS-2.1-JANG_2L"
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 "OsaurusAI/Laguna-XS-2.1-JANG_2L" \ --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 OsaurusAI/Laguna-XS-2.1-JANG_2L with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "OsaurusAI/Laguna-XS-2.1-JANG_2L"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "OsaurusAI/Laguna-XS-2.1-JANG_2L" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OsaurusAI/Laguna-XS-2.1-JANG_2L", "messages": [ {"role": "user", "content": "Hello"} ] }'
⚠️ Re-download if you pulled this bundle before 2026-07-28
Earlier uploads of this bundle were missing
top_k: 20ingeneration_config.jsonandjang_config.json. Poolside's ownLaguna-XS-2.1/generation_config.jsonomitstop_keven though their model card specifiestemperature=1.0, top_k=20, top_p=1for every XS-2.1 evaluation (the S-2.1 config does ship it), and this bundle passed those values through verbatim.Impact: with
top_kunset, a runtime samples the full 100,352-token vocabulary unfiltered attemperature=1.0/top_p=1.0instead of the top 20 candidates — noticeably lower output quality, worst on the lower-bit profiles.Fix: re-download
generation_config.jsonandjang_config.json(a few KB — no need to re-pull the weights), or passtop_k=20explicitly in your requests. Both files now carrytop_k: 20and are checked against each other at build time.
OsaurusAI/Laguna-XS-2.1-JANG_2L
JANG_2L JANG affine bundle of poolside/Laguna-XS-2.1 — 33B-parameter / ~3B-active MoE for agentic coding, quantized for Apple Silicon.
Attention (incl. the softplus output gate), shared expert, router, and norms stay high precision; the 256-routed-expert bulk carries 2-bit gate/up, 3-bit down, protected by activation-aware (AWQ) scales chosen by measured quantization error against a no-AWQ baseline (0.2% lower reconstruction error at this bit width).
Bundle
| Field | Value |
|---|---|
| Source | poolside/Laguna-XS-2.1 @ c405648 |
| Architecture | laguna — 40 layers (10 global + 30 SWA w512), 33B-A3B, 256 experts top-8 + shared, 262K ctx |
| On-disk size | 13.2 GB (3 shards) |
| Routed experts | 2-bit gate/up, 3-bit down affine, group 64, AWQ folded |
| Attention q/k/v/o + g_proj | 8-bit affine |
| Shared expert / dense FFN | 6-bit affine |
| Embeddings / lm_head | 6-bit / 8-bit affine |
| Router, e_score bias, norms | fp16 passthrough |
| Modality | text-only (verified from tensor index) |
Measured (M5 Max, 128 GB, greedy, wired)
| Metric | Value |
|---|---|
| Decode | 81.5 tok/s |
| Long-context cache parity | teacher-forced top-1 agreement 0.996 / 1.000 (pre/post the 512 sliding window, 2,913-token pass) |
Chat / reasoning
- GLM-style think tags;
enable_thinkingtoggles reasoning (vendor serving default is ON (stamped injang_config.chat); the template's own fallback is off, so passenable_thinking=Trueexplicitly if your runtime ignores bundle defaults) - The FULL chat template is inlined in
tokenizer_config.json(upstream ships only an{% include %}stub that most runtimes cannot resolve — inlining is what makes the reasoning toggle actually work) - Stop tokens
eos_token_id = [2, 24]— id 24 is end-of-turn and must be in the stop set - Template emits its own leading
〈|EOS|〉(bos 2): do not prepend another - Tool calls:
<tool_call>name<arg_key>k</arg_key><arg_value>v</arg_value></tool_call> - Vendor sampling: temperature 1.0, top_p 1.0, top_k 20
Loaders must honor the per-module {bits, group_size, mode} overrides in config.json[quantization].
Quantized and verified by Jinho Jang (eric@osaurus.ai). License: OpenMDW-1.1 (inherited).
- Downloads last month
- 117
Quantized
Model tree for OsaurusAI/Laguna-XS-2.1-JANG_2L
Base model
poolside/Laguna-XS-2.1