WebBrain-LingLoop-8B-A1.3B โ€” LoopUD v2 GGUF (Open Experiment)

๐ŸŒฑ A Canopy Seed project ยท LoopUD method ยท BoB on GitHub ยท More from thestashthai

Experimental sensitivity-guided Loop-Aware Dynamic Quantization (LoopUD v2) builds of webbrain-one/WebBrain-LingLoop-8B-A1.3B, quantized from the official BF16 GGUF using a multi-domain importance matrix (WikiText-2 + Python + synthetic tool-calling JSON).

Scope & Status: This is an open quantization experiment shared for review and reproduction. The current measurements below are logit-level only (KLD and top-1 agreement vs. BF16) on small held-out text slices (~16k wiki, ~8k Python, ~6k synthetic tool-call JSON). Full downstream task benchmarks (e.g. BFCL, IFEval, coding) have not been run yet and will be added as we expand evaluation.

  • LoopUD-Q6_v2 (6.04 GB): 17.5% smaller than stock Q6_K (7.32 GB), landing close to Q6_K on Wiki/Code KLD (0.0216 / 0.0124) and lower on the synthetic Tools slice (0.0300 vs. 0.0344) at 175.0 tok/s (+14.6%).
  • LoopUD-Q6_v2b (5.79 GB): 20.9% smaller than stock Q6_K (177.0 tok/s), trading a modest KLD step (0.0336 Wiki / 0.0184 Code) for the tighter size budget while remaining well below stock Q4_K_M (0.1062 / 0.0623).
  • LoopUD-Q4_Match (4.64 GB): 17.4% smaller than stock Q4_K_M (5.62 GB) with slightly lower KLD across the three slices (181.9 tok/s).

Credits & Attribution


Files in This Repository

File Size Description
WebBrain-LingLoop-8B-A1.3B-LoopUD-Q6_v2.gguf 6.04 GB Recommended Flagship โ€” Anchor-First LoopUD v2 Pareto knee (โˆ’17.5% vs Q6_K, beats Q6_K on tools)
WebBrain-LingLoop-8B-A1.3B-LoopUD-Q6_v2b.gguf 5.79 GB Compact Q6 Target โ€” Strict โˆ’20.9% vs Q6_K (177.0 tok/s, matches Q6_K tools top-1)
WebBrain-LingLoop-8B-A1.3B-LoopUD-Q4_Match.gguf 4.64 GB Fast 4-bit Tier โ€” โˆ’17.4% vs Q4_K_M, beats Q4_K_M on every corpus (181.9 tok/s)
recipes/loop_ud_{q6_v2,q6_v2b,q6_v1,q4_match}.rules < 1 KB Exact --tensor-type-file recipes for llama-quantize
data/sensitivity_optA.tsv 3 KB Full 47-probe per-layer Q6_K โ†’ IQ3_S sensitivity sweep data (wiki + code KLD & top-1)
imatrix/lingloop-calibmix.imatrix 90 MB Balanced multi-domain imatrix (WikiText-2 + Python stdlib + Tool-Calling JSON, 800 chunks)
patches/bailingmoe3_loop-on-master-d4adfb4.patch 140 KB llama.cpp patch adding bailingmoe3_loop and LLAMA_LOOP_COUNT=N

Verified T=2 Benchmarks (vs. Official BF16 Logits)

Measured on an RTX 4070 Ti SUPER (16 GB VRAM, CUDA 13.2, sm_89), all layers in VRAM (-ngl 99), ctx = 512, b = 512, at the trained T=2 loop depth. Held-out test corpora: wiki (64 chunks, ~16k tok), code (32 chunks, ~8k tok), tools (24 chunks, ~6k tok, synthetic tool-call JSON). Speed measured via llama-bench -p 512 -n 128.

Model Size (GB) vs. Q6_K Wiki KLD Wiki Top-1 Code KLD Code Top-1 Tools KLD Tools Top-1 tg128 tok/s pp512 tok/s
BF16 (official ref) 15.85 โ€” โ€” โ€” โ€” โ€” โ€” โ€” 117.7 3720
Q6_K (official) 7.32 0.0% 0.0204 93.8% 0.0112 97.0% 0.0344 95.6% 152.7 7777
LoopUD-Q6_v2 6.04 โˆ’17.5% 0.0216 93.5% 0.0124 96.8% 0.0300 95.9% 175.0 8291
LoopUD-Q6_v2b 5.79 โˆ’20.9% 0.0336 92.3% 0.0184 96.2% 0.0382 95.6% 177.0 8123
LoopUD-Q6_v1 (heuristic) 5.81 โˆ’20.6% 0.0404 91.4% 0.0213 95.9% 0.0566 94.2% 174.5 8479
Q4_K_M (official) 5.62 โˆ’23.2% 0.1062 85.9% 0.0623 93.1% 0.1246 91.1% 166.3 7569
LoopUD-Q4_Match 4.64 โˆ’36.6% 0.1042 86.6% 0.0567 93.6% 0.1141 92.3% 181.9 6865
LoopUD-IQ3_Compact (probe) 3.96 โˆ’45.9% 0.2501 79.3% 0.1500 89.7% 0.2224 89.1% 185.5 7952

Note on official stock quants: Official Q4_K_M and Q6_K left output.weight ([1536, 157184]) in F32 (~965 MB) while quantizing token_embd, attn_*, ssm_*, and ffn_*_shexp down to Q4_K/Q6_K. Moving output.weight to Q8_0 frees ~709 MB immediatelyโ€”letting LoopUD pin all non-expert infrastructure (token_embd, output, dense L0, attn_*, ssm_*, ffn_*_shexp) to Q8_0 while keeping every loop_* tensor, router (ffn_gate_inp), and norm in F32.


The Experiment: How Sensitivity Sweeping Turned LoopUD v1 โ†’ v2

1. Why LoopUD v1 Left Quality on the Table

In LoopUD v1 (LoopUD-Q6_v1, 5.81 GB), we assumed that because only the recurrent core (blk.4..19) executes twice, single-pass prelude (blk.1..3) and coda (blk.20..22) could be compressed to IQ4_XS/IQ4_NL while protecting blk.4..19 + final MLA readout blk.23. That yielded 0.0404 Wiki KLD โ€” ~2ร— worse than stock Q6_K (0.0204).

2. The 46-Probe Per-Layer Sensitivity Sweep (data/sensitivity_optA.tsv)

To find where the KLD actually came from, we built a zero-reencode GGUF tensor splicer and ran 46 single-group perturbations (Q6_K โ†’ IQ3_S, swapping ffn_gate+up_exps and ffn_down_exps separately for each MoE layer blk.1..23) against a Base_Q6_K baseline (Q8_0 infrastructure + all Q6_K experts, wiki KLD = 0.01387, code KLD = 0.00763).

The sweep revealed a ~10ร— sensitivity gradient (ฮ”KLD / MB) that directly reversed the v1 heuristic:

Rank Region Tensor Group ฮ”Wiki KLD ฮ”Code KLD Combined ฮ”KLD / MB (ร—10โปโถ)
#1 Prelude Anchor L01_down +0.00839 +0.00556 354.7
#2 Prelude Anchor L01_gu +0.01484 +0.00949 309.3
#3 Loop Entry L04_down +0.00684 +0.00385 271.8
#4โ€“7 Prelude Anchor L02โ€“L03 (gu + down) +0.0072โ€“0.0135 +0.0031โ€“0.0076 247.6โ€“269.2
#8โ€“12 Early Core L04_gu, L05โ€“L06 +0.0041โ€“0.0111 +0.0028โ€“0.0068 159.6โ€“232.5
#34โ€“42 Late Core / Coda L14โ€“L21 +0.0015โ€“0.0047 +0.0008โ€“0.0025 58.3โ€“83.7
#43โ€“45 Readout L23_down, L22_gu, L23_gu +0.0013โ€“0.0021 +0.0007โ€“0.0015 41.5โ€“51.5
#46 Coda L22_down +0.00085 +0.00060 36.9

3. The LoopUD v2 Principle: "Protect the Anchor + Loop Entry, Compress the Tail"

  1. Prelude (L1โ€“L3) is the #1 most sensitive region: In looped-depth execution (bailingmoe3_loop / inkling2_loop), every pass resets cur = h_prelude. Quantization error in L1โ€“L3 corrupts the shared anchor consumed by both Pass 0 and Pass 1 and amplifies through 36 downstream layer evaluations.
  2. Loop entry (L4_down) spikes, then sensitivity decays monotonically into late core and coda/readout โ€” L22_down is 9.6ร— cheaper per byte than L1_down, and L23 (which v1 protected) is among the 4 least sensitive layers.
  3. ffn_down_exps is consistently ~1.2ร—โ€“1.5ร— more sensitive per byte than gate/up.

Applying this single finding cut KLD by โˆ’42% to โˆ’47% (LoopUD-Q6_v1 โ†’ LoopUD-Q6_v2) across all three corpora.


Exact Recipes

LoopUD-Q6_v2 (6.04 GB, Flagship Pareto Knee)

^token_embd\.weight$=q8_0
^output\.weight$=q8_0
^blk\.0\.ffn_(gate|up|down)\.weight$=q8_0
^blk\.[0-9]+\.attn_.*=q8_0
^blk\.[0-9]+\.ssm_.*=q8_0
^blk\.[0-9]+\.ffn_.*_shexp\.weight$=q8_0
^blk\.[0-9]+\.loop_.*=f32
^blk\.[0-9]+\.ffn_gate_inp\.weight$=f32
^blk\.[1-7]\.ffn_(gate|up|down)_exps\.weight$=q6_k
^blk\.([89]|1[0-3])\.ffn_down_exps\.weight$=q6_k
^blk\.([89]|1[0-3])\.ffn_(gate|up)_exps\.weight$=q5_k
^blk\.1[4-9]\.ffn_(gate|up|down)_exps\.weight$=q5_k
^blk\.2[0-3]\.ffn_down_exps\.weight$=iq4_nl
^blk\.2[0-3]\.ffn_(gate|up)_exps\.weight$=iq4_xs

LoopUD-Q6_v2b (5.79 GB, Compact โˆ’20.9% vs. Q6_K)

^token_embd\.weight$=q8_0
^output\.weight$=q8_0
^blk\.0\.ffn_(gate|up|down)\.weight$=q8_0
^blk\.[0-9]+\.attn_.*=q8_0
^blk\.[0-9]+\.ssm_.*=q8_0
^blk\.[0-9]+\.ffn_.*_shexp\.weight$=q8_0
^blk\.[0-9]+\.loop_.*=f32
^blk\.[0-9]+\.ffn_gate_inp\.weight$=f32
^blk\.[1-7]\.ffn_(gate|up|down)_exps\.weight$=q6_k
^blk\.([89]|1[0-3])\.ffn_down_exps\.weight$=q6_k
^blk\.([89]|1[0-3])\.ffn_(gate|up)_exps\.weight$=q5_k
^blk\.1[4-9]\.ffn_down_exps\.weight$=q5_k
^blk\.1[4-9]\.ffn_(gate|up)_exps\.weight$=iq4_xs
^blk\.20\.ffn_down_exps\.weight$=iq4_nl
^blk\.20\.ffn_(gate|up)_exps\.weight$=iq4_xs
^blk\.2[1-3]\.ffn_down_exps\.weight$=iq4_nl
^blk\.2[1-3]\.ffn_(gate|up)_exps\.weight$=iq3_s

Reproduce Quantization

llama-quantize \
  --imatrix imatrix/lingloop-calibmix.imatrix \
  --tensor-type-file recipes/loop_ud_q6_v2.rules \
  WebBrain-LingLoop-8B-A1.3B.gguf \
  WebBrain-LingLoop-8B-A1.3B-LoopUD-Q6_v2.gguf \
  Q5_K_M 8

Quickstart & Engine Notes

Requires a llama.cpp build with bailingmoe3_loop support (apply patches/bailingmoe3_loop-on-master-d4adfb4.patch to ggml-org/llama.cpp d4adfb4):

Single-Turn Completion

./llama-completion --no-conversation \
  -m WebBrain-LingLoop-8B-A1.3B-LoopUD-Q6_v2.gguf \
  -p "Question: What is 17 times 23? Answer:" \
  -n 32 --temp 0 -ngl 99 --device CUDA0

Recommended llama-server Flags (Multi-Turn / Agentic Chat)

./llama-server \
  -m WebBrain-LingLoop-8B-A1.3B-LoopUD-Q6_v2.gguf \
  -ngl 99 -np 1 -c 131072 \
  -ctk q8_0 -ctv q8_0 -fa on --jinja \
  --no-cache-prompt --no-reasoning-preserve

Notes on the experimental bailingmoe3_loop patch & runtime:

  • Full 128K context fits easily in 16 GB VRAM: Because Ling-3.0-tiny uses MLA on only 6 physical layers (+ 4 virtual pass-1 slots), -c 131072 -ctk q8_0 -ctv q8_0 uses only 0.8 GB of KV cache (8.5 GB total VRAM with LoopUD-Q6_v2).
  • Use --no-cache-prompt for multi-turn / tool-calling sessions: The experimental bailingmoe3_loop patch does not implement recurrent-state rollback (rs-rollback) for the hybrid KDA layers, so partial LCP prefix reuse (f_keep < 1.0) can misalign recurrent state across edited turns.
  • Use --no-reasoning-preserve: Prevents prior reasoning traces from piling up across multi-turn agent loops.
  • Long-context caveat: Upstream llama.cpp currently tracks a bailingmoe3 RoPE-interleave issue at long contexts (ggml-org/llama.cpp#33079) that can cause repetition loops on very long prompts.
  • Depth toggle (LLAMA_LOOP_COUNT=1): The included patch supports setting LLAMA_LOOP_COUNT=1 in the environment to run the same GGUF at T=1 for A/B testing against the trained T=2 depth.

๐Ÿ“œ License

MIT.

  • Model weights: inclusionAI/Ling-3.0-tiny, which declares MIT in its model card (the repo has no separate license file). WebBrain's repo keeps those weights frozen and byte-identical to Ling's, and these GGUFs are quantizations of them.
  • Loop adapter: the loop reader/gate tensors (WebBrain's trained 12.63M-parameter cross-pass adapter) are kept in FP32 in WebBrain's official BF16 GGUF, which these files are quantized from. That adapter and the looping code are the WebBrain team's work, and they have not stated a license for them.
  • Ours: the recipes, importance matrix, sensitivity data and the llama.cpp patch are MIT, following the base model.
Downloads last month
-
GGUF
Model size
8B params
Architecture
bailingmoe3_loop
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF

Quantized
(2)
this model

Collection including thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF