Myric/Laguna-S-2.1-APEX-GGUF overview
Laguna S 2.1 — APEX GGUF with DFlash speculative decoding MoE aware, mixed precision APEX quantization of poolside/Laguna S 2.1 https://huggingface.co/poolside…
Runs locally from ~621.9 MB disk (4 GB VRAM class GPUs with llama.cpp / guIDE).
Repository Files & Downloads
| File | Type | Quantization | Size | Link |
|---|---|---|---|---|
| Laguna-S-2.1-APEX-i-compact-v2.gguf | GGUF | GGUF | 50.67 GB | Download |
| Laguna-S-2.1-APEX-i-compact.gguf | GGUF | GGUF | 50.64 GB | Download |
| Laguna-S-2.1-APEX-i-mini-v2.gguf | GGUF | GGUF | 40.68 GB | Download |
| Laguna-S-2.1-APEX-i-mini.gguf | GGUF | GGUF | 40.64 GB | Download |
| Laguna-S-2.1-APEX-i-quality-v2.gguf | GGUF | GGUF | 68.88 GB | Download |
| Laguna-S-2.1-APEX-i-quality.gguf | GGUF | GGUF | 68.85 GB | Download |
| Laguna-S-2.1-APEX-i-subcompact-v2.gguf | GGUF | GGUF | 44.61 GB | Download |
| Laguna-S-2.1-APEX-i-subcompact.gguf | GGUF | GGUF | 44.58 GB | Download |
| laguna-s-2.1-DFlash-Q4_K.gguf | GGUF | Q4_K | 621.9 MB | Download |
| laguna-s-2.1-DFlash-Q8_0.gguf | GGUF | Q8_0 | 1.11 GB | Download |
Model Details
| Model ID | Myric/Laguna-S-2.1-APEX-GGUF |
|---|---|
| Author | Myric |
| Pipeline | text-generation |
| License | openmdw-1.1 |
| Base model | poolside/Laguna-S-2.1 |
| Last modified | 2026-08-26T16:36:37.000Z |
Model README
---
license: openmdw-1.1
base_model: poolside/Laguna-S-2.1
base_model_relation: quantized
pipeline_tag: text-generation
library_name: gguf
tags:
- gguf
- moe
- apex
- quantized
- laguna
- coding
- speculative-decoding
- dflash
- llama.cpp
---
Laguna-S-2.1 — APEX GGUF (with DFlash speculative decoding)
MoE-aware, mixed-precision APEX quantization of
poolside/Laguna-S-2.1 — a 118B-total
/ ~8B-active open-weight agentic coding MoE (48 layers, 256 routed + 1 shared
expert, top-10 routing, GQA with per-head softplus output gating, mixed
sliding-window/global attention, 1M context).
APEX assigns quantization precision per tensor role and per layer instead of
uniformly — keeping always-active shared experts and edge layers high-precision
while compressing the sparse routed-expert middle layers hard. On a 256-expert MoE
this is a large win: near-full-precision quality at a fraction of the size, and
small enough to actually run this model locally.
Paired here with the DFlash speculative-decoding draft model for fast
generation.
> Disclaimer. Unofficial community quantization — **not affiliated with or
> endorsed by Poolside or unsloth. Provided as-is, without warranty**; validate
> before relying on it. Quality figures below are measured post-hoc (see Results).
> The i-mini (IQ2_S, 2-bit) tier is experimental and expected to degrade
> noticeably vs the larger tiers — treat it as a size/speed experiment, not a
> quality target. DFlash speculative decoding requires Poolside's llama.cpp fork
> (see Usage).
v2 — gate statepin
The -v2 files are these same four APEX recipes rebuilt with the 48 attn_gate
tensors held at F32 instead of quantized to each tier's attention band
(Q6_K/Q4_K/Q3_K) — on Laguna attn_gate is a small per-head output-gate
coefficient ([3072,72] and [3072,48], 9.73M params in total, not the multi-million
parameter projection the same tensor name denotes on some other architectures), so it
parameterises a nonlinearity that multiplies the state path and error there compounds
along the sequence instead of staying local to one layer; pinning it costs ~31 MB per
file and nothing else in the recipes changed.
| v2 file | Size | BPW | v1 equivalent |
|---|---|---|---|
| Laguna-S-2.1-APEX-i-quality-v2.gguf | 73.96 GB | 5.03 | Laguna-S-2.1-APEX-i-quality.gguf |
| Laguna-S-2.1-APEX-i-compact-v2.gguf | 54.40 GB | 3.70 | Laguna-S-2.1-APEX-i-compact.gguf |
| Laguna-S-2.1-APEX-i-subcompact-v2.gguf | 47.90 GB | 3.26 | Laguna-S-2.1-APEX-i-subcompact.gguf |
| Laguna-S-2.1-APEX-i-mini-v2.gguf | 43.67 GB | 2.97 | Laguna-S-2.1-APEX-i-mini.gguf |
The original (v1) files remain in this repo and are not deprecated. The gate pin is a
principled fix, but it has not yet been validated in the wild — v1 stays available until
there are field reports on v2. Bit allocation and size/quality trade-offs are otherwise
identical to the tier descriptions below: pick a tier first, then take its -v2 file if
you want the gate fix.
Results
> Perplexity measured on wikitext-2-raw (test, 200 × 512-token windows) with
> llama-perplexity. Pending — to be measured on-device; numbers below are
> filled in after the run.
| File | Size | PPL | Δ vs BF16 |
|------|------|-----|-----------|
| BF16 (reference baseline) | 235 GB | _TBD_ | — |
| APEX-i-quality | 73.9 GB (5.03 BPW) | _TBD_ | _TBD_ |
| APEX-i-compact | 54.4 GB (3.70 BPW) | _TBD_ | _TBD_ |
| APEX-i-subcompact | 47.9 GB (3.26 BPW) | _TBD_ | _TBD_ |
| APEX-i-mini (experimental) | 43.6 GB (2.97 BPW) | _TBD_ | _TBD_ |
| DFlash draft (BF16) | 2.2 GB | — | (speculative-decoding drafter) |
| DFlash draft (Q8_0) | 1.13 GB | — | (drafter; same acceptance as BF16) |
| DFlash draft (Q4_K_M) | 652 MB | — | (drafter, recommended; same acceptance as BF16) |
DFlash speculative decoding — measured
Draft-quantization sweep on a DGX Spark (GB10, 128 GB unified memory) with
Poolside's llama.cpp fork. Target = APEX-i-quality; single 512-token
completion, temperature=0, --spec-draft-n-max 15, flash-attention on.
Acceptance = draft_n_accepted / draft_n from server timings (deterministic at
temperature=0); decode throughput is the reported predicted_per_second.
| Draft (vs APEX-i-quality) | Draft size | Acceptance | Decode tok/s | Speedup |
|---------------------------|-----------:|-----------:|-------------:|--------:|
| none (no speculation) | — | — | 27.4 | 1.00× |
| DFlash BF16 | 2.2 GB | 27.5 % | 31.1 | 1.13× |
| DFlash Q8_0 | 1.13 GB | 27.8 % | 31.1 | 1.13× |
| DFlash Q4_K_M (recommended) | 652 MB | 27.8 % | 32.9 | 1.20× |
Quantizing the DFlash draft is essentially free: **Q4_K_M matches BF16 acceptance
at under a third of the size** (and is marginally faster to run). These numbers are
from a generic prompt; on the coding / agentic workloads Laguna is built for,
DFlash acceptance and speedup are substantially higher — Poolside reports
2.5–3.7× on HumanEval / MBPP / GSM8K (see the
Same sweep against the much coarser APEX-i-mini target (same hardware/settings):
| Draft (vs APEX-i-mini) | Draft size | Acceptance | Decode tok/s | Speedup |
|---------------------------|-----------:|-----------:|-------------:|--------:|
| none (no speculation) | — | — | 35.2 | 1.00× |
| DFlash BF16 | 2.2 GB | 23.4 % | 34.7 | 0.99× |
| DFlash Q8_0 | 1.13 GB | 23.4 % | 36.7 | 1.04× |
| DFlash Q4_K_M (recommended) | 652 MB | 24.2 % | 38.5 | 1.09× |
Two effects show up on the smaller tier: acceptance is lower (23–24 % vs 27–28 %) —
the more aggressively quantized target's output distribution diverges further from
the draft's — and because i-mini already decodes fast, the speculation overhead
barely pays for itself. The light Q4 draft is the only clearly net-positive one
here (the BF16 draft's overhead makes it a wash), so Q4 is the right draft on every
tier. As above, on real coding/agentic workloads the wins are larger than these
generic-prompt figures.
Recommended serve command (Poolside fork, branch laguna):
./build/bin/llama-server \
-m Laguna-S-2.1-APEX-i-quality.gguf \
-md laguna-s-2.1-DFlash-Q4_K.gguf \
--spec-type draft-dflash --spec-draft-n-max 15 \
-fa on --jinja -ngl 999 -c 32768 \
--host 0.0.0.0 --port 8000
Which file to pick
- APEX-i-quality (73.9 GB) — recommended. Highest quality. Routed experts:
edge layers (L0–4, L43–47) Q6_K, near-edge (L5–9, L38–42) Q5_K, middle
(L10–37) IQ4_XS; shared expert Q8_0; attention Q6_K; dense layer 0 Q8_0.
Diverse ("I") imatrix. Overall ~4.9 bpw. Fits the DGX Spark's 128 GB with room for
the draft + KV cache.
- APEX-i-compact (54.4 GB) — smaller and faster to decode (fewer bytes/token
on bandwidth-bound generation) at some quality cost. Routed experts Q4_K/Q3_K,
shared Q6_K, attention Q4_K. Good speed/quality compromise.
- APEX-i-subcompact (47.9 GB) — between i-compact and i-mini. Middle routed experts
at IQ3_XXS (L10–37), edge/near-edge routed Q3_K (L1–9, L38–47); shared expert
Q5_K at the edges (L1–4, L43–47) and Q4_K through the middle (L5–42); attention
projections Q3_K (L3–44) with Q4_K at the edges (L0–2, L45–47). ~3.26 bpw. Reach for
this when i-compact will not fit but i-mini's 2-bit middle band is too coarse.
- APEX-i-mini (43.6 GB, experimental) — smallest/fastest. Middle routed
experts at IQ2_S (2-bit), near/edge Q3_K, shared Q4_K/Q5_K. Expect a real
quality drop; a size/speed experiment, not a quality target.
- laguna-s-2.1-DFlash-BF16.gguf (2.2 GB) — the DFlash speculative-decoding draft
model (kept BF16 for best token-acceptance; not APEX-quantized). Used as the -md
draft with any tier above. Ships from
Usage (llama.cpp)
⚠️ Always pass -c/--ctx-size explicitly. Laguna was trained with up to a
1,048,576-token (1M) context window. If you launch llama-server/llama-cli
without -c, llama.cpp defaults the KV cache to the model's own trained context
length — an attempt to allocate a KV cache sized for a million tokens, which can
consume very large amounts of memory and stall or crash a machine with limited
RAM/VRAM. Every example below sets -c 32768 deliberately; do the same and size
it to your own hardware.
DFlash speculative decoding requires Poolside's llama.cpp fork (branch laguna)
— it carries the --spec-type draft-dflash path. (Upstream llama.cpp has the
laguna architecture and will run the APEX quant without speculative decoding, but
not the DFlash draft path.)
# Build Poolside's fork (add -DGGML_CUDA=ON on the Spark / any NVIDIA box)
git clone --branch laguna https://github.com/poolsideai/llama.cpp
cd llama.cpp && cmake -B build -DGGML_CUDA=ON && cmake --build build -j
# Recommended: serve with DFlash speculative decoding (fastest)
./build/bin/llama-server \
-m Laguna-S-2.1-APEX-i-quality.gguf \
-md laguna-s-2.1-DFlash-BF16.gguf \
--spec-type draft-dflash --spec-draft-n-max 15 \
-fa on --jinja \
-ngl 999 -c 32768 \
--host 0.0.0.0 --port 8000
Recommended-settings notes:
-md laguna-s-2.1-DFlash-BF16.gguf+--spec-type draft-dflash— the DFlash
draft embeds the target tokenizer and DFlash metadata and works directly as the
draft model. This is the whole point of the pairing: big speedup on the coding /
agentic workloads Laguna is built for.
--spec-draft-n-max 15— clamped to the trained draft block size (15 draft
tokens + 1). Leaving it higher has no effect.
-fa on— flash attention; recommended for Laguna's mixed SWA/global attention.--jinja— use the model's chat template (native interleaved reasoning + tool
calling). Required for correct agentic/tool behavior.
-ngl 999— offload all layers. On the DGX Spark (GB10, 128 GB unified) the
73.9 GB i-quality quant + 2.2 GB draft + KV cache fit comfortably in unified memory
(i-compact/i-mini leave even more headroom for context).
-c 32768— context. Laguna supports up to 1M; size it to your memory budget
(32k is a sane coding default; raise as headroom allows).
Without speculative decoding (any recent upstream llama.cpp with laguna support):
llama-server -m Laguna-S-2.1-APEX-i-quality.gguf -fa on --jinja -ngl 999 \
-c 32768 --host 0.0.0.0 --port 8000
Method & notes
APEX is a bit-allocation recipe over stock llama-quantize --tensor-type-file
(no kernel/format changes). Laguna-specific observations for this run:
- No config patching needed. Laguna's routed-expert intermediate size is 1024
(256-divisible), so K-quants (Q6_K/Q5_K/IQ4_XS) apply directly to
ffn_down_exps — unlike Moonlight (dim 1408), no IQ4_NL fallback is required.
- Layer 0 is dense (
mlp_only_layers=[0]) — kept atQ8_0(generated with
--dense-layers 1).
- MTP drafter is a separate file. Laguna's multi-token-prediction speculator
(DFlash) ships as its own GGUF, not embedded in the main model, so the APEX
tensor-map covers the entire main model with nothing left unassigned.
- Attention uses standard
attn_q/k/v/outputnames (GQA, 48 q / 8 kv heads);
the per-head softplus output gate, if present as a tensor, is covered at Q6_K.
Baseline: quantized from
unsloth/Laguna-S-2.1-GGUF's BF16
conversion. The importance matrix is unsloth's —
reused as-is rather than regenerated (thanks to the unsloth team for publishing it).
It is bundled here for reproducibility.
Reproduce
# 1. Configs (48 layers, dense L0). Bundled as configs/laguna_s_*.txt
bash generate_config.sh --profile i-quality --layers 48 --dense-layers 1 -o laguna_s_i-quality.txt
bash generate_config.sh --profile i-compact --layers 48 --dense-layers 1 -o laguna_s_i-compact.txt
bash generate_config.sh --profile mini --layers 48 --dense-layers 1 -o laguna_s_i-mini.txt
# 2. Quantize from the BF16 split (base type Q6_K catches token_embd/output;
# llama-quantize auto-follows the 5-shard split from shard 1)
for tier in i-quality i-compact i-mini; do
llama-quantize --tensor-type-file laguna_s_${tier}.txt \
--imatrix imatrix_unsloth.gguf_file \
Laguna-S-2.1-BF16-00001-of-00005.gguf \
Laguna-S-2.1-APEX-${tier}.gguf Q6_K
done
Attribution & licenses
- Base model + DFlash draft: Poolside (@poolside) —
Laguna-S-2.1 and the
laguna-s-2.1-DFlash-BF16.gguf draft (OpenMDW-1.1).
- BF16 GGUF conversion and importance matrix: unsloth
(@unsloth) —
Laguna-S-2.1-GGUF (OpenMDW-1.1).
This quant is built on unsloth's BF16 conversion and **reuses unsloth's
imatrix_unsloth.gguf_file** — full credit to the unsloth team.
- Quantization engine: llama.cpp by the ggml authors
(@ggml-org) (MIT); DFlash speculative decoding
via poolsideai/llama.cpp branch laguna.
- APEX recipe & toolkit: Ettore Di Giacinto / LocalAI
(@mudler) —
localai-org/apex-quant (MIT).
License compatibility
Fully compatible. OpenMDW-1.1 (Poolside's base weights and unsloth's
conversion/imatrix) is a permissive, MIT-like model license — it grants use,
modification, and redistribution without restriction and imposes no copyleft.
Its one substantive condition is license preservation: any redistribution of the
model materials must carry (1) a copy of the OpenMDW-1.1 agreement and (2) all
original copyright and origin notices. The tooling (APEX toolkit, llama.cpp) is MIT,
which stacks with OpenMDW without conflict.
Accordingly this derivative is released under OpenMDW-1.1 (inherited from the
base), and this repo ships the OpenMDW-1.1 license text plus the Poolside and unsloth
origin/copyright notices (see LICENSE and NOTICE), alongside
the MIT notices for the APEX toolkit and llama.cpp. The reused imatrix is bundled
under the same terms.
This is an unofficial community quantization and is not affiliated with or endorsed
by Poolside or unsloth.
Run Myric/Laguna-S-2.1-APEX-GGUF with guIDE
Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.
Source: Hugging Face · Compare models