Instructions to use SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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("SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit"
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": "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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 "SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-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"
Laguna-XS-2.1-sbQ-cal-4bit
A 4-bit imatrix MLX quantization of poolside/Laguna-XS-2.1 whose calibration corpus is real agent work — provenance-stamped traces from our own local agent squad (plans, builds, verifications, tool calls), not a generic text mix.
To be precise about what "cal" means here: this build contains no fine-tuning, no adapters, and no trained deltas of any kind. The base model's weights are untouched. Our agent traces steered only the imatrix — i.e. which weights receive more precision during quantization, because they matter most under agentic activations. The behavioural shift documented below was achieved without any training, purely through bit allocation. No trace content is in the model or this repo (the imatrix report is activation counts).
This is the build our lab actually serves. It took our production seat on 2026-08-24 after winning a same-regime measurement grid against three siblings, and every number below is from that grid. It runs the squad that helped build it.
Published by SoftBacon Software — a small independent lab working on locally-owned AI. We publish the whole ladder with its losses; a ladder with the bad rungs removed is marketing, not measurement.
The finding this build carries
Calibrating the imatrix on agentic traces instead of a generic multilingual corpus produced a build that is equal in perplexity (Δ 0.0004) but measurably different in behaviour — and the difference is uniformly in the agentic direction. Across a 96-variant behavioural probe battery, the agent-calibrated build beats or ties its generic-calibrated control (Laguna-XS-2.1-sbQ-4bit — same bits, same tool, same commit, only the calibration corpus differs) on every probe, with zero inversions:
| probe (n=96 each) | sbQ-cal-4bit | sbQ-4bit (control) |
|---|---|---|
| well_formed_tool_call | 0.990 | 0.990 |
| verify_before_assert | 0.844 | 0.833 |
| say_not_measured | 0.375 | 0.354 |
| verify_enacted | 0.750 | 0.750 |
| verify_stated | 0.094 | 0.083 |
| intent_without_call (lower = better) | 0.010 | 0.010 |
Per-probe margins are small (1–2 passes of 96); the signal is the monotone
ordering across every probe that differs. On verify_before_assert the
agent-calibrated build also edges the bf16 base (0.844 vs 0.823, same
instrument). Calibration also shifted throughput: the two same-size builds
decode at different speeds (131.5 vs 136.5 tok/s) because the imatrix shapes
bit allocation, and bit allocation shapes the compute layout.
The claim we make is deliberately narrow: your calibration corpus is a
behavioural lever, not just a perplexity lever. First-attempt honesty: this
calibration corpus left 69 of 256 experts with zero activation counts
(oq_imatrix_report.json in this repo). The effect direction survived that
coverage gap; a coverage-guided v2 corpus is in progress.
Measurements
All rows same regime, one machine, one night (2026-08-23/24): M5 Max 128 GB,
our oMLX fork (jundot/omlx fork, build commit in oq_build.json), thermal
gate <50 °C between arms, no co-resident models during measurement.
| build | GB | decode tok/s | spec tok/s | held-out NLL | needle (n=72) |
|---|---|---|---|---|---|
| q8 (8-bit reference) | 33 | 110.9 | 362.3 | 1.4735 | 71/72 |
| q4q8-L30 mix (prior seat) | 22.5 | 138.1 | 348.7 | 1.5041 | 68/72 |
| sbQ-cal-4bit (this repo) | 18 | 131.5 | 315.8 | 1.4802 | 71/72 |
| sbQ-4bit (control) | 18 | 136.5 | 320.6 | 1.4806 | 71/72 |
- Held-out NLL: merged evaluation split, sequence cap 8192, identical documents across all rows. Numbers from a different regime are different numbers; we do not mix tables.
- Needle (n=72, with sabotage variants): the single dropped cell is
ctx32000_pos0.5— the same cell the 8-bit reference drops, i.e. a workload artifact, not quantization damage. - Repetition: 10/10 clean completions on the repetition trial (no loops).
- Serving: 20.45 GB resident under our oMLX fork; 3.6 s cold load to first token on the measurement machine.
- Behavioural probes: greedy decoding (temp 0), frozen prompt set, 96 variants per probe.
What's in the repo
- MLX safetensors (4 shards) + tokenizer + chat template
PROVENANCE.md— upstream repo, local source, tool, versions, dateoq_build.json— exact build parameters and tool commitoq_imatrix_report.json— per-expert calibration activation counts, including the 69 dark expertsLICENSE.md— OpenMDW-1.1, inherited from the base model
Reproduce
Build tool and measurement harness: github.com/SoftBacon-Software.
The quant was produced by oq_factory.py from poolside's official BF16
weights; the calibration generator (oq_calib_agentic.py) constructs the
imatrix corpus from provenance-stamped agent traces. Every number above can be
re-derived rather than trusted.
Lineage
Base model: poolside/Laguna-XS-2.1 (OpenMDW-1.1). Quantized from the
official BF16 release with no third party in the chain. Our builds carry the
sbQ family name to be unmistakable from poolside releases and from
community oQ-series quants, which are unrelated to us.
- Downloads last month
- 44
4-bit
Model tree for SoftBacon-Software/Laguna-XS-2.1-sbQ-cal-4bit
Base model
poolside/Laguna-XS-2.1