GraySoft
Projects Models Compare Cloud benchmarks FAQ Download guIDE →
Model Intelligence Sheet

linuxid10t/Laguna-XS.2-GGUF overview

Laguna XS.2 GGUF GGUF quantizations of poolside/Laguna XS.2 https://huggingface.co/poolside/Laguna XS.2 . Converted and tested with a patched fork of llama.cpp…

ggufendpoints_compatibleregion:usconversational

Runs locally from ~16.84 GB disk (24 GB VRAM class GPUs with llama.cpp / guIDE).

Downloads
614
Likes
3
Pipeline

Repository Files & Downloads

3 GGUF files detected
Direct downloads for local inference
FileTypeQuantizationSizeLink
Laguna-XS.2-IQ4_XS.ggufGGUFIQ4_XS16.84 GBDownload
Laguna-XS.2-Q4_K_M.ggufGGUFQ4_K_M18.88 GBDownload
Laguna-XS.2-f16.ggufGGUFF1662.33 GBDownload

Model Details

Model IDlinuxid10t/Laguna-XS.2-GGUF
Authorlinuxid10t
Pipeline
License
Base model
Last modified2026-06-21T03:48:20.000Z

Model README

Laguna-XS.2 GGUF

GGUF quantizations of poolside/Laguna-XS.2.

Converted and tested with a patched fork of llama.cpp that implements LLM_ARCH_LAGUNA from scratch.

> Requires the custom fork. Upstream llama.cpp does not support this architecture.

> Fork: https://github.com/linuxid10t/llama.cpp-add-laguna

>

> The same fork also converts and runs the Laguna-M.1 sibling (~226B, all-full-attention, per-element attention gate) — see its own repo.

> ⚠️ These files were reconverted 2026-06-20 from the latest published poolside/Laguna-XS.2

> (config.json last modified 2026-06-18). The previous GGUFs in this repo (a) lacked the

> rope.dimension_count key, so the global layers silently ran full rotary instead of half

> (partial_rotary_factor = 0.5), and (b) were produced before several converter fixes. The

> current files correct this. Verify the key is present (head_dim 128 → expect 64):

> ```

> python3 gguf-py/scripts/gguf_dump.py Laguna-XS.2-Q4_K_M.gguf | grep rope.dimension_count

> ```

Files

| File | Quant | Size | Notes |

| --- | --- | --- | --- |

| Laguna-XS.2-f16.gguf | f16 | ~67 GB | Full precision, reference |

| Laguna-XS.2-Q4_K_M.gguf | Q4_K_M | ~20 GB | Recommended for most users |

Usage

git clone https://github.com/linuxid10t/llama.cpp-add-laguna
cd llama.cpp-add-laguna && cmake -B build && cmake --build build -j$(nproc)

./build/bin/llama-cli \
  -m Laguna-XS.2-Q4_K_M.gguf \
  --ctx-size 262144 \
  --temp 0 \
  -p "The capital of France is"

Chat / thinking mode

# Thinking on (default) — model prefills <think> and generates a reasoning trace
./build/bin/llama-cli -m Laguna-XS.2-Q4_K_M.gguf -cnv --ctx-size 32768

# Thinking off — direct answer, no reasoning trace
./build/bin/llama-cli -m Laguna-XS.2-Q4_K_M.gguf -cnv --ctx-size 32768 --reasoning off

The chat template, thinking-mode prefix, EOT token (</assistant>, token 24), and streaming

parser are all handled automatically — no manual prompt engineering needed.

Architecture

Per config.json (full-attention layers = global, sliding-attention layers = SWA):

| Property | Value |

| --- | --- |

| Parameters | 33B total, ~3B active per token (A3B) |

| Layers | 40 (10 global + 30 SWA, 3:1 pattern) |

| Attention heads | 48 (global layers) / 64 (SWA layers) |

| KV heads | 8 (GQA) |

| Head dim | 128 |

| Q/K norm | RMSNorm per head |

| Attention gate | Per-head softplus gate on SDPA output, applied on all layers |

| SWA window | 512 tokens |

| Experts | 256 routed (top-8) + 1 shared |

| Dense layers | Layer 0 only |

| MoE router | Sigmoid + e_score_correction_bias (added at selection, not routing) |

| Routing scale | moe_routed_scaling_factor = 2.5, L1-normalized weights |

| Global RoPE | YaRN: base 500K, factor 64, original_max 4096, β_fast 64, β_slow 1, partial_rotary 0.5 |

| SWA RoPE | Default: base 10K, full rotary |

| Context length | 262,144 tokens |

Implementation Notes

Attention gate: Every layer has a self_attn.g_proj that projects the hidden state to

one scalar per head (num_heads outputs). This is softplus-gated and multiplied,

broadcast across head_dim, into the SDPA output before o_proj. (XS.2 is per-head gating.

The same graph builder does Laguna-M.1's per-element variant, selected by the

attention.gate_per_head GGUF key — detected from the actual g_proj tensor shape by the

converter, since config gating is a bool rather than a mode string.)

Partial rotary: Global layers rotate only the first half of the head dimension (matching

partial_rotary_factor = 0.5); SWA layers use full rotary. The converter writes this explicitly

as rope.dimension_count (global) and rope.dimension_count_swa (SWA), derived from each rope

config's partial_rotary_factor, and the model reads the per-layer count via n_rot(il) at

graph-build time. *(For head_dim 128 this is 64 global / 128 SWA. This replaces an earlier

hardcoded n_rot_full /= 2.)*

Dual RoPE: Global and SWA layers use entirely different RoPE configs. The fork adds

per-layer-type YaRN siblings to llama_hparams / llama_cparams and selects at graph

build time via hparams.is_swa(il).

MoE routing: Router logits pass through sigmoid (not softmax), biased by a per-expert

e_score_correction_bias that is added only during top-k selection, not during weight

computation. Routing weights are L1-normalized before scaling by moe_routed_scaling_factor.

Thinking mode prefill: The chat template injects <think> as the generation prompt prefix

when thinking is enabled. The streaming parser is patched to treat this as a delimiter-style

boundary (not a generated token), so the <think> tag never appears in streaming output.

Stop token: </assistant> is token 24, a regular vocabulary token (not a special token).

The fork adds it to antiprompt so the stop-word erase logic strips it before output.

Tested

  • Greedy decode on "The capital of France is"" Paris.\nThe capital of Germany is"
  • 10K-token prompt (exercises SWA layers) — no corruption ✓
  • 35K needle-in-haystack (SWORDFISH99) — correctly retrieved (exercises global YaRN layers) ✓

*(Re-validated against the reconverted Q4_K_M; the half-rotary global layers now match the

reference config.)*

Known Limitations

  • Numerical validation against HF Transformers not yet done (requires CUDA/ROCm).
  • Q4_K_M vs f16 top-1 token agreement not formally checked (f16 GGUF exceeds available RAM for full eval).

Run linuxid10t/Laguna-XS.2-GGUF with guIDE

Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.

Download guIDE → · Browse 524k+ models · Compare models

Source: Hugging Face · Compare models