Instructions to use mudler/Laguna-XS-2.1-APEX-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use mudler/Laguna-XS-2.1-APEX-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="mudler/Laguna-XS-2.1-APEX-GGUF", filename="Laguna-XS-2.1-APEX-Balanced.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mudler/Laguna-XS-2.1-APEX-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf mudler/Laguna-XS-2.1-APEX-GGUF # Run inference directly in the terminal: llama cli -hf mudler/Laguna-XS-2.1-APEX-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mudler/Laguna-XS-2.1-APEX-GGUF # Run inference directly in the terminal: llama cli -hf mudler/Laguna-XS-2.1-APEX-GGUF
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf mudler/Laguna-XS-2.1-APEX-GGUF # Run inference directly in the terminal: ./llama-cli -hf mudler/Laguna-XS-2.1-APEX-GGUF
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf mudler/Laguna-XS-2.1-APEX-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf mudler/Laguna-XS-2.1-APEX-GGUF
Use Docker
docker model run hf.co/mudler/Laguna-XS-2.1-APEX-GGUF
- LM Studio
- Jan
- Ollama
How to use mudler/Laguna-XS-2.1-APEX-GGUF with Ollama:
ollama run hf.co/mudler/Laguna-XS-2.1-APEX-GGUF
- Unsloth Studio
How to use mudler/Laguna-XS-2.1-APEX-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mudler/Laguna-XS-2.1-APEX-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for mudler/Laguna-XS-2.1-APEX-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mudler/Laguna-XS-2.1-APEX-GGUF to start chatting
- Pi
How to use mudler/Laguna-XS-2.1-APEX-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mudler/Laguna-XS-2.1-APEX-GGUF
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "mudler/Laguna-XS-2.1-APEX-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use mudler/Laguna-XS-2.1-APEX-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mudler/Laguna-XS-2.1-APEX-GGUF
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 mudler/Laguna-XS-2.1-APEX-GGUF
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use mudler/Laguna-XS-2.1-APEX-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf mudler/Laguna-XS-2.1-APEX-GGUF
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 "mudler/Laguna-XS-2.1-APEX-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- Docker Model Runner
How to use mudler/Laguna-XS-2.1-APEX-GGUF with Docker Model Runner:
docker model run hf.co/mudler/Laguna-XS-2.1-APEX-GGUF
- Lemonade
How to use mudler/Laguna-XS-2.1-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mudler/Laguna-XS-2.1-APEX-GGUF
Run and chat with the model
lemonade run user.Laguna-XS-2.1-APEX-GGUF-{{QUANT_TAG}}List all available models
lemonade list
Configure the model in Pi
# Install Pi:
npm install -g @mariozechner/pi-coding-agent# Add to ~/.pi/agent/models.json:
{
"providers": {
"llama-cpp": {
"baseUrl": "http://localhost:8080/v1",
"api": "openai-completions",
"apiKey": "none",
"models": [
{
"id": "mudler/Laguna-XS-2.1-APEX-GGUF"
}
]
}
}
}Run Pi
# Start Pi in your project directory:
piβ‘ Each donation = another big MoE quantized
I host 30+ free APEX MoE quantizations as independent research. My only local hardware is an NVIDIA DGX Spark (122 GB unified memory) β enough for ~30-50B-class MoEs, but bigger ones (200B+) require rented compute on H100/H200/Blackwell, typically $20-100 per quant.
If APEX quants are useful to you, your support directly funds those bigger runs.
π Patreon (Monthly) | β Buy Me a Coffee | β GitHub Sponsors
Laguna-XS-2.1 β APEX GGUF
APEX (Adaptive Precision for EXpert Models) quantizations of poolside/Laguna-XS-2.1 β poolside's Laguna XS.2 Mixture-of-Experts model for coding and agentic software engineering.
Brought to you by the LocalAI team | APEX Project | Technical Report
Requires a recent llama.cpp with Laguna support (PR #25165). Older builds cannot load
arch=laguna.
Available Files
| File | Profile | Best For |
|---|---|---|
| Laguna-XS-2.1-APEX-I-Balanced.gguf | I-Balanced | Best overall β imatrix-enhanced |
| Laguna-XS-2.1-APEX-I-Quality.gguf | I-Quality | Highest quality with imatrix |
| Laguna-XS-2.1-APEX-Quality.gguf | Quality | Highest quality (no imatrix) |
| Laguna-XS-2.1-APEX-Balanced.gguf | Balanced | General purpose |
| Laguna-XS-2.1-APEX-I-Compact.gguf | I-Compact | Consumer GPUs, imatrix-enhanced |
| Laguna-XS-2.1-APEX-Compact.gguf | Compact | Consumer GPUs |
| Laguna-XS-2.1-APEX-I-Mini.gguf | I-Mini | Smallest viable, fastest inference |
What is APEX?
APEX is a quantization strategy for Mixture-of-Experts (MoE) models. It classifies tensors by role (routed expert, shared expert, attention, dense FFN) and applies a layer-wise precision gradient β edge layers get higher precision, middle layers compress more aggressively. I-variants use diverse imatrix calibration (chat, code, reasoning, tool-calling, agentic traces, Wikipedia).
In MoE models the routed-expert FFN tensors dominate the weight budget but only ~8/256 experts fire per token, so APEX compresses middle-layer routed experts hardest while preserving edge layers, attention, and the always-active shared expert.
APEX layout for Laguna
Laguna XS.2 has a structure APEX handles explicitly:
- Layer 0 is a leading dense FFN (no experts) β pinned to Q8_0, since every token traverses it.
- Layers 1β39 are MoE β 256 routed experts + a shared expert, 8 active per token, sigmoid gating.
- Shared expert (
ffn_*_shexp) kept at Q8_0 on every tier (always active). - Routed experts follow the 5+5 symmetric edge gradient (higher precision at the first/last layers, most aggressive in the middle).
- Router (
ffn_gate_inp), norms and theexp_probs_bgating bias stay at full precision.
Architecture
- Model: Laguna-XS-2.1 (
LagunaForCausalLM, archlaguna) - Layers: 40 (1 dense + 39 MoE) Β· Experts: 256 routed + 1 shared (8 active)
- Attention: 48 heads / 8 KV, per-layer output gate, hybrid full + sliding-window, YaRN rope
- Vocab: 100352 Β· text-only
- Calibration: v1.3 diverse dataset
Run with LocalAI
local-ai run mudler/Laguna-XS-2.1-APEX-GGUF@Laguna-XS-2.1-APEX-I-Balanced.gguf
Credits
APEX is brought to you by the LocalAI team. Built on llama.cpp. Base model by poolside.
- Downloads last month
- 307
We're not able to determine the quantization variants.
Model tree for mudler/Laguna-XS-2.1-APEX-GGUF
Base model
poolside/Laguna-XS-2.1
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp# Start a local OpenAI-compatible server: llama serve -hf mudler/Laguna-XS-2.1-APEX-GGUF