--- license: openmdw-1.1 base_model: poolside/Laguna-XS-2.1 tags: - gguf - quantized - apex - moe - mixture-of-experts - laguna - code - coder ---

โšก 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](https://huggingface.co/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](https://github.com/mudler/LocalAI) team** | [APEX Project](https://github.com/mudler/apex-quant) | [Technical Report](https://github.com/mudler/apex-quant/blob/main/paper/APEX_Technical_Report.pdf) > **Requires a recent llama.cpp** with Laguna support ([PR #25165](https://github.com/ggml-org/llama.cpp/pull/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 the `exp_probs_b` gating bias stay at full precision. ## Architecture - **Model**: Laguna-XS-2.1 (`LagunaForCausalLM`, arch `laguna`) - **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 ```bash 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](https://github.com/mudler/LocalAI) team. Built on [llama.cpp](https://github.com/ggerganov/llama.cpp). Base model by [poolside](https://huggingface.co/poolside).