Instructions to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-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 thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF # Run inference directly in the terminal: llama cli -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF # Run inference directly in the terminal: llama cli -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF # Run inference directly in the terminal: ./build/bin/llama cli -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Use Docker
docker model run hf.co/thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
- Llama new
- LM Studio
- Jan
- vLLM
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
- Ollama
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with Ollama:
ollama run hf.co/thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
- Unsloth Desktop
- Pi
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with Docker Model Runner:
docker model run hf.co/thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
- Lemonade
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Run and chat with the model
lemonade run user.WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-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 thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-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:9931/v1 hermes config set model.default thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-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:9931/v1 \ --custom-model-id "thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-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"
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 stockQ6_K(7.32 GB), landing close toQ6_Kon Wiki/Code KLD (0.0216/0.0124) and lower on the synthetic Tools slice (0.0300vs.0.0344) at175.0 tok/s(+14.6%).LoopUD-Q6_v2b(5.79 GB): 20.9% smaller than stockQ6_K(177.0 tok/s), trading a modest KLD step (0.0336Wiki /0.0184Code) for the tighter size budget while remaining well below stockQ4_K_M(0.1062/0.0623).LoopUD-Q4_Match(4.64 GB): 17.4% smaller than stockQ4_K_M(5.62 GB) with slightly lower KLD across the three slices (181.9 tok/s).
Credits & Attribution
- Looped Model & BF16 GGUF:
webbrain-one/WebBrain-LingLoop-8B-A1.3Bandwebbrain-one/WebBrain-LingLoop-8B-A1.3B-GGUFby the WebBrain team (esokullu). - Base MoE Weights:
inclusionAI/Ling-3.0-tinyby inclusionAI / Ant Group (MIT License). llama.cppLooped Architecture Precedent:bailingmoe2_loop(ggml-org/llama.cpp#33298byesokullu) and upstreaminkling2_loop. Ourbailingmoe3_looppatch on top ofggml-org/llama.cppmasterd4adfb4(addingbailingmoe3_loop+LLAMA_LOOP_COUNT=N) is included inpatches/bailingmoe3_loop-on-master-d4adfb4.patch.- LoopUD v2 Quantization, Sensitivity Sweep & Benchmarks: Travis (
thestashthai) / Canopy Seed.
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_MandQ6_Kleftoutput.weight([1536, 157184]) inF32(~965 MB) while quantizingtoken_embd,attn_*,ssm_*, andffn_*_shexpdown toQ4_K/Q6_K. Movingoutput.weighttoQ8_0frees~709 MBimmediatelyโletting LoopUD pin all non-expert infrastructure (token_embd,output, denseL0,attn_*,ssm_*,ffn_*_shexp) toQ8_0while keeping everyloop_*tensor, router (ffn_gate_inp), and norm inF32.
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"
- Prelude (
L1โL3) is the #1 most sensitive region: In looped-depth execution (bailingmoe3_loop/inkling2_loop), every pass resetscur = h_prelude. Quantization error inL1โL3corrupts the shared anchor consumed by both Pass 0 and Pass 1 and amplifies through 36 downstream layer evaluations. - Loop entry (
L4_down) spikes, then sensitivity decays monotonically into late core and coda/readout โL22_downis 9.6ร cheaper per byte thanL1_down, andL23(which v1 protected) is among the 4 least sensitive layers. ffn_down_expsis consistently~1.2รโ1.5รmore sensitive per byte thangate/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_0uses only0.8 GB of KV cache (8.5 GB total VRAM withLoopUD-Q6_v2). - Use
--no-cache-promptfor multi-turn / tool-calling sessions: The experimentalbailingmoe3_looppatch 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.cppcurrently tracks abailingmoe3RoPE-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 settingLLAMA_LOOP_COUNT=1in the environment to run the same GGUF atT=1for A/B testing against the trainedT=2depth.
๐ 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.cpppatch are MIT, following the base model.
- Downloads last month
- -
We're not able to determine the quantization variants.
Model tree for thestashthai/WebBrain-LingLoop-8B-A1.3B-LoopUD-GGUF
Base model
inclusionAI/Ling-3.0-tiny