Text Generation
GGUF
bailing_hybrid
weight-space-programming
woodbury-projection
bailingmoe3-loop
looped-transformer
cuda
conversational
custom_code
Instructions to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming 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 jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming 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 jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K # Run inference directly in the terminal: llama cli -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K # Run inference directly in the terminal: llama cli -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
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 jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K # Run inference directly in the terminal: ./build/bin/llama cli -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
Use Docker
docker model run hf.co/jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
- Llama new
- LM Studio
- Jan
- vLLM
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
- Ollama
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with Ollama:
ollama run hf.co/jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
- Unsloth Desktop
- Pi
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
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": "jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with Docker Model Runner:
docker model run hf.co/jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
- Lemonade
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
Run and chat with the model
lemonade run user.WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming-Q6_K
List all available models
lemonade list
- Hermes Agent
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
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 jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K
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 "jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming:Q6_K" \ --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"
Download scripts/download_lingloop.py from jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming: direct link, hf CLI and curl.
- Browser
- Download file 8.32 kB
-
https://huggingface.co/jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming/resolve/main/scripts/download_lingloop.py
- Command line
-
hf download hf://jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming/scripts/download_lingloop.py
-
curl -L -o download_lingloop.py https://huggingface.co/jstarks/WebBrain-LingLoop-8B-A1.3B-Weight-Space-Programming/resolve/main/scripts/download_lingloop.py
8.32 kB
| """Download WebBrain-LingLoop-8B-A1.3B-Q6_K.gguf, tokenizer/metadata, and verify 638 GGUF tensors.""" | |
| from __future__ import annotations | |
| import os | |
| os.environ.setdefault("HF_HUB_DISABLE_XET", "1") | |
| import json | |
| import struct | |
| import sys | |
| import time | |
| import urllib.request | |
| from collections import Counter | |
| from pathlib import Path | |
| from typing import Optional | |
| if hasattr(sys.stdout, "reconfigure"): | |
| sys.stdout.reconfigure(encoding="utf-8", line_buffering=True) | |
| ROOT = Path(r"C:\Users\jhjwi\.gemini\antigravity\scratch\webbrain-lingloop-8b-wsp") | |
| UPSTREAM = ROOT / "upstream" | |
| META_DIR = UPSTREAM / "hf_meta" | |
| GGUF_PATH = UPSTREAM / "WebBrain-LingLoop-8B-A1.3B-Q6_K.gguf" | |
| GGUF_URL = "https://huggingface.co/webbrain-one/WebBrain-LingLoop-8B-A1.3B-GGUF/resolve/main/WebBrain-LingLoop-8B-A1.3B-Q6_K.gguf" | |
| META_BASE = "https://huggingface.co/webbrain-one/WebBrain-LingLoop-8B-A1.3B/resolve/main" | |
| META_FILES = [ | |
| "tokenizer.json", | |
| "tokenizer_config.json", | |
| "special_tokens_map.json", | |
| "chat_template.jinja", | |
| "config.json", | |
| "generation_config.json", | |
| "README.md", | |
| "TEST_CARD.md", | |
| ] | |
| MIT_LICENSE_URL = "https://huggingface.co/inclusionAI/Ling-3.0-tiny/resolve/main/LICENSE" | |
| def load_hf_token() -> Optional[str]: | |
| for p in (Path(r"C:\Users\jhjwi\.env"), Path.home() / ".env"): | |
| if p.exists(): | |
| raw = p.read_bytes().replace(b"\x00", b"").decode("utf-8", errors="ignore") | |
| for ln in raw.splitlines(): | |
| ln = ln.strip().lstrip("\ufeff") | |
| if "HF_TOKEN=" in ln: | |
| val = ln.split("HF_TOKEN=", 1)[1].strip().strip('"').strip("'") | |
| if val: | |
| return val | |
| return os.environ.get("HF_TOKEN") or None | |
| def download_resumable(url: str, dst: Path, token: Optional[str]) -> None: | |
| dst.parent.mkdir(parents=True, exist_ok=True) | |
| headers = {"User-Agent": "lingloop-wsp-dl/1.0"} | |
| if token: | |
| headers["Authorization"] = f"Bearer {token}" | |
| # Probe exact remote size via HEAD | |
| head_req = urllib.request.Request(url, headers=headers, method="HEAD") | |
| with urllib.request.urlopen(head_req, timeout=30) as resp: | |
| total_size = int(resp.headers.get("Content-Length") or 0) | |
| if dst.exists() and total_size > 0 and dst.stat().st_size == total_size: | |
| print(f"[DL] Already complete: {dst.name} ({total_size / 1024**3:.3f} GiB)", flush=True) | |
| return | |
| tmp = dst.with_suffix(dst.suffix + ".part") | |
| existing = tmp.stat().st_size if tmp.exists() else 0 | |
| if existing > 0 and total_size > 0 and existing < total_size: | |
| headers["Range"] = f"bytes={existing}-" | |
| mode = "ab" | |
| else: | |
| existing = 0 | |
| mode = "wb" | |
| req = urllib.request.Request(url, headers=headers) | |
| t0 = time.perf_counter() | |
| last_log = t0 | |
| downloaded = existing | |
| with urllib.request.urlopen(req, timeout=60) as resp, open(tmp, mode) as fp: | |
| if total_size == 0: | |
| total_size = int(resp.headers.get("Content-Length") or 0) + existing | |
| while True: | |
| chunk = resp.read(4 * 1024 * 1024) | |
| if not chunk: | |
| break | |
| fp.write(chunk) | |
| downloaded += len(chunk) | |
| now = time.perf_counter() | |
| if now - last_log >= 5.0: | |
| el = now - t0 | |
| rate = (downloaded - existing) / max(el, 1e-6) | |
| eta = (total_size - downloaded) / max(rate, 1.0) if total_size > 0 else 0.0 | |
| pct = 100.0 * downloaded / max(total_size, 1) | |
| print( | |
| f"[DL] {dst.name}: {downloaded / 1024**3:.2f}/{total_size / 1024**3:.2f} GiB " | |
| f"({pct:.1f}%) | {rate / 1024**2:.1f} MiB/s | elapsed={el:.0f}s | ETA={eta:.0f}s", | |
| flush=True, | |
| ) | |
| last_log = now | |
| tmp.replace(dst) | |
| print(f"[DL] Completed {dst.name} in {time.perf_counter() - t0:.1f}s ({dst.stat().st_size / 1024**3:.3f} GiB)", flush=True) | |
| def verify_gguf_header(gguf_path: Path) -> None: | |
| with open(gguf_path, "rb") as f: | |
| hdr = f.read(16 * 1024 * 1024) | |
| off = 0 | |
| magic, ver, nt, nkv = struct.unpack_from("<4sIQQ", hdr, off) | |
| off += 24 | |
| assert magic == b"GGUF", f"Bad GGUF magic: {magic}" | |
| def rstr() -> str: | |
| nonlocal off | |
| (n,) = struct.unpack_from("<Q", hdr, off) | |
| off += 8 | |
| s = hdr[off : off + n].decode("utf-8", errors="ignore") | |
| off += n | |
| return s | |
| def rval(t: int): | |
| nonlocal off | |
| if t in (0, 1, 7): | |
| v = hdr[off] | |
| off += 1 | |
| return v | |
| if t in (2, 3): | |
| (v,) = struct.unpack_from("<H", hdr, off) | |
| off += 2 | |
| return v | |
| if t in (4, 5, 6): | |
| (v,) = struct.unpack_from("<I", hdr, off) | |
| off += 4 | |
| return v | |
| if t in (10, 11, 12): | |
| (v,) = struct.unpack_from("<Q", hdr, off) | |
| off += 8 | |
| return v | |
| if t == 8: | |
| return rstr() | |
| if t == 9: | |
| et, cnt = struct.unpack_from("<IQ", hdr, off) | |
| off += 12 | |
| return [rval(et) for _ in range(cnt)] | |
| raise ValueError(f"Unsupported GGUF value type: {t}") | |
| kv = {} | |
| for _ in range(nkv): | |
| k = rstr() | |
| (t,) = struct.unpack_from("<I", hdr, off) | |
| off += 4 | |
| kv[k] = rval(t) | |
| tmap = {0: "F32", 1: "F16", 2: "Q4_0", 8: "Q8_0", 12: "Q4_K", 13: "Q5_K", 14: "Q6_K", 30: "BF16"} | |
| tc = Counter() | |
| for _ in range(nt): | |
| _name = rstr() | |
| (nd,) = struct.unpack_from("<I", hdr, off) | |
| off += 4 | |
| _dims = struct.unpack_from(f"<{nd}Q", hdr, off) | |
| off += 8 * nd | |
| tt, _toff = struct.unpack_from("<IQ", hdr, off) | |
| off += 12 | |
| tc[tmap.get(tt, f"T{tt}")] += 1 | |
| print( | |
| f"[Verify] arch={kv.get('general.architecture')} | tensors={nt} | types={dict(tc)} | " | |
| f"loop=({kv.get('bailingmoe3_loop.loop.start')}..{kv.get('bailingmoe3_loop.loop.end')}, passes={kv.get('bailingmoe3_loop.loop.count')})", | |
| flush=True, | |
| ) | |
| assert nt == 638 and dict(tc) == {"F32": 328, "Q6_K": 304, "Q8_0": 6}, f"Unexpected GGUF layout: {nt} {tc}" | |
| def main() -> None: | |
| for d in (UPSTREAM, META_DIR, ROOT / "lingloop_cuda", ROOT / "wsp_adapters", ROOT / "results", ROOT / "gguf"): | |
| d.mkdir(parents=True, exist_ok=True) | |
| token = load_hf_token() | |
| download_resumable(GGUF_URL, GGUF_PATH, token) | |
| for fn in META_FILES: | |
| download_resumable(f"{META_BASE}/{fn}", META_DIR / fn, token) | |
| # Fetch MIT LICENSE cleanly (or fallback standard MIT if inclusionAI repo lacks a LICENSE file) | |
| lic_dst = META_DIR / "LICENSE" | |
| try: | |
| download_resumable(MIT_LICENSE_URL, lic_dst, token) | |
| except Exception: | |
| lic_dst.write_text( | |
| "MIT License\n\nCopyright (c) InclusionAI & WebBrain\n\n" | |
| "Permission is hereby granted, free of charge, to any person obtaining a copy\n" | |
| "of this software and associated documentation files (the \"Software\"), to deal\n" | |
| "in the Software without restriction, including without limitation the rights\n" | |
| "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n" | |
| "copies of the Software, and to permit persons to whom the Software is\n" | |
| "furnished to do so, subject to the following conditions:\n\n" | |
| "The above copyright notice and this permission notice shall be included in all\n" | |
| "copies or substantial portions of the Software.\n\n" | |
| "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n" | |
| "IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" | |
| "FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n" | |
| "AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n" | |
| "LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n" | |
| "OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n" | |
| "SOFTWARE.\n", | |
| encoding="utf-8", | |
| ) | |
| print("[DL] Wrote MIT LICENSE file.", flush=True) | |
| verify_gguf_header(GGUF_PATH) | |
| if __name__ == "__main__": | |
| main() | |