Spaces:
Running
Running
Download index.html from Genrius-AI/pingala8: direct link, hf CLI and curl.
- Browser
- Download file 31.7 kB
-
https://huggingface.co/spaces/Genrius-AI/pingala8/resolve/main/index.html
- Command line
-
hf download hf://spaces/Genrius-AI/pingala8/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Genrius-AI/pingala8/resolve/main/index.html
31.7 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Pingala-8 2-bit LLMs</title> | |
| <meta name="description" content="Pingala-8 by Genrius AI: a 2-bit GGUF format for llama.cpp. Qwen3-4B goes from 8.05 GB to 1.24 GB (85% smaller), with WikiText-2 perplexity 16.64 against 28.61 for llama.cpp IQ2_XXS at the same size. No retraining. One-click Windows build."> | |
| <meta property="og:title" content="Pingala-8: 2-bit LLMs for llama.cpp, 85% smaller"> | |
| <meta property="og:description" content="Same 1.24 GB as llama.cpp's 2-bit, much better quality. No retraining. One-click Windows build for NVIDIA RTX 30/40/50."> | |
| <meta property="og:image" content="https://huggingface.co/spaces/Genrius-AI/pingala8/resolve/main/poster.jpg"> | |
| <meta property="og:type" content="website"> | |
| <meta name="twitter:card" content="summary_large_image"> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
| <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"> | |
| <style> | |
| :root{ | |
| --bg:#050505; | |
| --bg-2:#0b0a08; | |
| --panel:#0f0e0b; | |
| --panel-2:#15130f; | |
| --line:rgba(232,213,163,.13); | |
| --line-strong:rgba(232,213,163,.28); | |
| --beige:#E8D5A3; | |
| --gold:#D4AF37; | |
| --gold-deep:#a8892a; | |
| --text:#ede6d6; | |
| --muted:#a39b88; | |
| --dim:#6f6859; | |
| --win:#D4AF37; | |
| --lose:#c4795c; | |
| --radius:16px; | |
| --max:1120px; | |
| color-scheme:dark; | |
| } | |
| *{box-sizing:border-box} | |
| html{scroll-behavior:smooth} | |
| body{ | |
| margin:0;background:var(--bg);color:var(--text); | |
| font:16px/1.6 Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif; | |
| -webkit-font-smoothing:antialiased;overflow-x:hidden; | |
| } | |
| a{color:var(--beige);text-decoration:none;border-bottom:1px solid rgba(232,213,163,.3)} | |
| a:hover{color:var(--gold);border-color:var(--gold)} | |
| code,kbd,pre{font-family:"JetBrains Mono",ui-monospace,Consolas,monospace} | |
| code{font-size:.88em;background:rgba(232,213,163,.08);border:1px solid var(--line);padding:.08em .38em;border-radius:6px;color:var(--beige)} | |
| .wrap{max-width:var(--max);margin:0 auto;padding:0 16px} | |
| @media(min-width:720px){.wrap{padding:0 32px}} | |
| /* glow */ | |
| .glow{position:fixed;inset:-20vh -10vw auto;height:80vh;pointer-events:none;z-index:0; | |
| background:radial-gradient(60% 50% at 50% 0%,rgba(212,175,55,.13),rgba(212,175,55,0) 70%)} | |
| main,header,footer{position:relative;z-index:1} | |
| /* header */ | |
| header{border-bottom:1px solid var(--line);backdrop-filter:blur(8px);background:rgba(5,5,5,.72);position:sticky;top:0;z-index:5} | |
| .bar{display:flex;align-items:center;justify-content:space-between;height:60px;gap:16px} | |
| .brand{display:flex;align-items:center;gap:10px;border:0;color:var(--beige);font-weight:700;letter-spacing:.22em;font-size:13px;text-transform:uppercase;white-space:nowrap} | |
| .brand:hover{color:var(--gold)} | |
| .mark{width:22px;height:22px;border-radius:6px;background:linear-gradient(135deg,var(--gold),var(--beige));display:grid;place-items:center;color:#050505;font:800 12px/1 Inter;letter-spacing:0} | |
| nav{display:flex;gap:22px;font-size:14px} | |
| nav a{border:0;color:var(--muted)} | |
| nav a:hover{color:var(--beige)} | |
| @media(max-width:760px){nav .opt{display:none}} | |
| @media(max-width:420px){nav{gap:14px}} | |
| /* hero */ | |
| .hero{padding:72px 0 28px;text-align:center} | |
| .eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12px;letter-spacing:.18em;text-transform:uppercase;color:var(--gold); | |
| border:1px solid var(--line-strong);border-radius:999px;padding:6px 14px;background:rgba(212,175,55,.05)} | |
| .eyebrow i{width:6px;height:6px;border-radius:50%;background:var(--gold);box-shadow:0 0 10px var(--gold)} | |
| h1{font-family:Fraunces,Georgia,serif;font-weight:600;font-size:clamp(34px,6vw,64px);line-height:1.06;letter-spacing:-.02em;margin:22px auto 18px;max-width:17ch;color:var(--text)} | |
| h1 em{font-style:normal;background:linear-gradient(100deg,var(--gold) 10%,var(--beige) 60%,var(--gold) 100%);-webkit-background-clip:text;background-clip:text;color:transparent} | |
| .lede{max-width:62ch;margin:0 auto;color:var(--muted);font-size:clamp(16px,2vw,18.5px)} | |
| .lede b{color:var(--text);font-weight:600} | |
| .cta{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:30px 0 10px} | |
| .btn{display:inline-flex;align-items:center;gap:10px;border-radius:12px;padding:13px 20px;font-weight:600;font-size:15px;border:1px solid var(--line-strong);color:var(--beige);background:rgba(232,213,163,.04);transition:.2s} | |
| .btn:hover{border-color:var(--gold);color:var(--gold);transform:translateY(-1px)} | |
| .btn.primary{background:linear-gradient(135deg,var(--gold),#e6c862);color:#120f05;border-color:transparent;box-shadow:0 8px 30px rgba(212,175,55,.22)} | |
| .btn.primary:hover{color:#050505;box-shadow:0 10px 36px rgba(212,175,55,.34)} | |
| .btn svg{width:17px;height:17px} | |
| .fine{font-size:13px;color:var(--dim);margin-top:8px} | |
| /* video */ | |
| .video{margin:36px auto 0;border:1px solid var(--line-strong);border-radius:20px;overflow:hidden;background:#000;box-shadow:0 30px 90px rgba(0,0,0,.6),0 0 0 6px rgba(212,175,55,.03)} | |
| .video video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#000} | |
| .cap{font-size:13px;color:var(--dim);text-align:center;margin:12px auto 0;max-width:80ch} | |
| /* sections */ | |
| section{padding:72px 0 0} | |
| .kicker{font-size:12px;letter-spacing:.2em;text-transform:uppercase;color:var(--gold);margin:0 0 10px} | |
| h2{font-family:Fraunces,Georgia,serif;font-weight:600;font-size:clamp(26px,3.6vw,40px);line-height:1.12;letter-spacing:-.015em;margin:0 0 14px} | |
| .sub{color:var(--muted);max-width:68ch;margin:0 0 28px} | |
| /* stats */ | |
| .stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:56px} | |
| @media(max-width:900px){.stats{grid-template-columns:repeat(2,1fr)}} | |
| @media(max-width:480px){.stats{grid-template-columns:1fr}} | |
| .stat{background:linear-gradient(180deg,var(--panel-2),var(--panel));border:1px solid var(--line);border-radius:var(--radius);padding:22px 20px 20px;position:relative;overflow:hidden} | |
| .stat:before{content:"";position:absolute;inset:0 0 auto;height:2px;background:linear-gradient(90deg,transparent,var(--gold),transparent);opacity:.55} | |
| .stat .n{font:800 clamp(34px,4vw,44px)/1 Inter;letter-spacing:-.03em;background:linear-gradient(180deg,#f1dfa8,var(--gold));-webkit-background-clip:text;background-clip:text;color:transparent} | |
| .stat .l{font-weight:600;color:var(--text);margin:10px 0 6px;font-size:15px} | |
| .stat p{margin:0;color:var(--muted);font-size:13.5px;line-height:1.5} | |
| /* panels */ | |
| .panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:22px} | |
| .chart{background:#fff;border-radius:12px;padding:10px;overflow:hidden} | |
| .chart img{display:block;width:100%;height:auto} | |
| .chart a{border:0;display:block} | |
| @media(max-width:640px){.chart{overflow-x:auto;-webkit-overflow-scrolling:touch}.chart img{min-width:640px}} | |
| .figcap{font-size:13.5px;color:var(--muted);margin:14px 2px 0} | |
| /* tables */ | |
| .tbl{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel)} | |
| table{width:100%;border-collapse:collapse;font-size:14.5px;min-width:560px} | |
| th,td{padding:13px 16px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle} | |
| th{font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--dim);font-weight:600;background:rgba(232,213,163,.025)} | |
| tr:last-child td{border-bottom:0} | |
| td.num{font-family:"JetBrains Mono",monospace;white-space:nowrap} | |
| tr.ours td{background:rgba(212,175,55,.07)} | |
| tr.ours td:first-child{box-shadow:inset 3px 0 0 var(--gold)} | |
| tr.ours .name{color:var(--gold);font-weight:700} | |
| .name{font-weight:600;color:var(--text)} | |
| .what{color:var(--muted);font-size:13.5px} | |
| .pbar{display:flex;align-items:center;gap:10px;min-width:170px} | |
| .pbar span{display:block;height:8px;border-radius:99px;background:linear-gradient(90deg,rgba(232,213,163,.35),rgba(232,213,163,.55))} | |
| tr.ours .pbar span{background:linear-gradient(90deg,var(--gold-deep),var(--gold))} | |
| .tag{display:inline-block;font-size:11px;letter-spacing:.06em;text-transform:uppercase;border:1px solid var(--line-strong);color:var(--muted);border-radius:99px;padding:2px 8px;margin-left:6px;vertical-align:1px} | |
| .up{color:var(--gold);font-weight:700} | |
| .two{display:grid;grid-template-columns:1fr;gap:28px} | |
| .two>div{min-width:0} | |
| .nw{white-space:nowrap} | |
| .note{font-size:14px;color:var(--muted);margin:16px 2px 0} | |
| .note b{color:var(--text)} | |
| /* callout */ | |
| .callout{display:grid;grid-template-columns:auto 1fr;gap:16px;align-items:start;border:1px solid var(--line-strong);background:linear-gradient(135deg,rgba(212,175,55,.08),rgba(212,175,55,.01));border-radius:var(--radius);padding:20px 22px;margin-top:16px} | |
| .callout .big{font:800 30px/1 Inter;color:var(--gold);letter-spacing:-.02em} | |
| .callout p{margin:0;color:var(--muted);font-size:14.5px} | |
| .callout p b{color:var(--text)} | |
| /* limits */ | |
| .limits{display:grid;grid-template-columns:repeat(2,1fr);gap:14px} | |
| @media(max-width:760px){.limits{grid-template-columns:1fr}} | |
| .lim{border:1px solid var(--line);border-radius:14px;padding:18px 18px 18px 20px;background:var(--panel);position:relative} | |
| .lim:before{content:"";position:absolute;left:0;top:16px;bottom:16px;width:3px;border-radius:3px;background:var(--lose);opacity:.8} | |
| .lim h3{margin:0 0 6px;font-size:15.5px;color:var(--text)} | |
| .lim p{margin:0;color:var(--muted);font-size:14px} | |
| /* steps */ | |
| .steps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;counter-reset:s} | |
| @media(max-width:860px){.steps{grid-template-columns:1fr}} | |
| .step{border:1px solid var(--line);border-radius:var(--radius);padding:22px;background:var(--panel);position:relative} | |
| .step .k{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-weight:800;color:#120f05;background:linear-gradient(135deg,var(--gold),var(--beige));margin-bottom:14px} | |
| .step h3{margin:0 0 6px;font-size:17px} | |
| .step p{margin:0;color:var(--muted);font-size:14.5px} | |
| pre{background:#090806;border:1px solid var(--line);border-radius:12px;padding:16px 18px;overflow-x:auto;color:var(--beige);font-size:13.5px;line-height:1.65;margin:0} | |
| pre .c{color:var(--dim)} | |
| .why{display:flex;gap:12px;align-items:flex-start;margin-top:16px;font-size:14px;color:var(--muted);border:1px dashed var(--line-strong);border-radius:12px;padding:14px 16px} | |
| .why svg{flex:none;width:18px;height:18px;margin-top:2px;color:var(--gold)} | |
| /* cards */ | |
| .cards{display:grid;grid-template-columns:repeat(2,1fr);gap:14px} | |
| @media(max-width:760px){.cards{grid-template-columns:1fr}} | |
| .card{display:block;border:1px solid var(--line);border-radius:var(--radius);padding:22px;background:linear-gradient(180deg,var(--panel-2),var(--panel));color:var(--text);transition:.2s} | |
| .card:hover{border-color:var(--gold);color:var(--text);transform:translateY(-2px)} | |
| .card .t{display:flex;justify-content:space-between;gap:12px;align-items:baseline} | |
| .card h3{margin:0;font-size:18px} | |
| .card .sz{font-family:"JetBrains Mono",monospace;color:var(--gold);font-size:14px;white-space:nowrap} | |
| .card p{margin:8px 0 12px;color:var(--muted);font-size:14px} | |
| .card .meta{display:flex;flex-wrap:wrap;gap:6px} | |
| .chip{font-size:12px;border:1px solid var(--line-strong);border-radius:99px;padding:3px 10px;color:var(--beige)} | |
| .card .go{display:inline-block;margin-top:14px;font-size:13.5px;color:var(--gold);font-weight:600} | |
| .small-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:14px} | |
| @media(max-width:760px){.small-cards{grid-template-columns:1fr}} | |
| /* how */ | |
| .how{display:grid;grid-template-columns:1.1fr .9fr;gap:24px;align-items:start} | |
| @media(max-width:860px){.how{grid-template-columns:1fr}} | |
| .how p{color:var(--muted);margin:0 0 14px} | |
| .how p b{color:var(--text)} | |
| .pipe{display:flex;flex-direction:column;gap:10px} | |
| .pipe div{border:1px solid var(--line);border-radius:12px;padding:12px 14px;background:var(--panel);font-size:14px;color:var(--muted)} | |
| .pipe div b{display:block;color:var(--beige);font-size:14.5px;margin-bottom:2px} | |
| .pipe .arr{border:0;background:none;padding:0;text-align:center;color:var(--dim);font-size:12px;line-height:1} | |
| /* cite */ | |
| .cite{position:relative} | |
| .copy{position:absolute;top:10px;right:10px;font:600 12px Inter;color:var(--beige);background:rgba(232,213,163,.08);border:1px solid var(--line-strong);border-radius:8px;padding:6px 10px;cursor:pointer} | |
| .copy:hover{border-color:var(--gold);color:var(--gold)} | |
| footer{margin-top:88px;border-top:1px solid var(--line);padding:30px 0 40px;color:var(--dim);font-size:13px} | |
| footer .row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:16px;align-items:flex-start} | |
| footer p{margin:0 0 6px;max-width:80ch} | |
| footer a{color:var(--muted)} | |
| </style> | |
| </head> | |
| <body> | |
| <div class="glow" aria-hidden="true"></div> | |
| <header> | |
| <div class="wrap bar"> | |
| <a class="brand" href="https://huggingface.co/Genrius-AI" target="_blank" rel="noopener"><span class="mark">G</span>Genrius AI</a> | |
| <nav aria-label="Sections"> | |
| <a class="opt" href="#results">Results</a> | |
| <a class="opt" href="#limits">Limits</a> | |
| <a href="#try">Try it</a> | |
| <a href="#models">Models</a> | |
| <a href="https://doi.org/10.5281/zenodo.23481757" target="_blank" rel="noopener">Paper</a> | |
| </nav> | |
| </div> | |
| </header> | |
| <main> | |
| <div class="wrap"> | |
| <div class="hero"> | |
| <span class="eyebrow"><i></i>Pingala-8 · 2-bit GGUF for llama.cpp</span> | |
| <h1>85% smaller LLMs. <em>Better than llama.cpp's own <span class="nw">2-bit</span></em> at the same size.</h1> | |
| <p class="lede">We compress models you already have to 2 bits, with <b>no retraining</b>. Qwen3-4B goes from <b>8.05 GB to 1.24 GB</b>, and at that size its WikiText-2 perplexity is <b>16.64 against 28.61</b> for llama.cpp's IQ2_XXS (lower is better).</p> | |
| <div class="cta"> | |
| <a class="btn primary" href="https://github.com/Genrius-AI/pingala8-llm/releases/tag/v2.4-oneclick" target="_blank" rel="noopener"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3v12"/><path d="m7 10 5 5 5-5"/><path d="M5 21h14"/></svg> | |
| Download the one-click build | |
| </a> | |
| <a class="btn" href="#models">See the models</a> | |
| <a class="btn" href="https://doi.org/10.5281/zenodo.23481757" target="_blank" rel="noopener">Read the paper</a> | |
| </div> | |
| <p class="fine">Windows and Linux · NVIDIA RTX 30/40/50 · runs on our patched llama.cpp (CUDA)</p> | |
| </div> | |
| <div class="video"> | |
| <video src="demo.mp4" poster="poster.jpg" controls muted autoplay loop playsinline preload="metadata" aria-label="Pingala-8 Qwen3-4B writing a short email in real time"></video> | |
| </div> | |
| <p class="cap">Real time, not sped up. Text and timing come from a real run of Pingala-8 Qwen3-4B (1.24 GB) on an RTX 5070 Ti Laptop GPU; the chat window is recreated.</p> | |
| <div class="stats"> | |
| <div class="stat"> | |
| <div class="n">85%</div> | |
| <div class="l">smaller</div> | |
| <p>Qwen3-4B: 8.05 GB fp16 to 1.24 GB. Llama-3.1-8B: 16.08 GB to 2.39 GB.</p> | |
| </div> | |
| <div class="stat"> | |
| <div class="n">16.64</div> | |
| <div class="l">perplexity at 1.24 GB</div> | |
| <p>vs 28.61 for IQ2_XXS and 18.15 for IQ2_KT at the same size (Qwen3-4B, WikiText-2, lower is better).</p> | |
| </div> | |
| <div class="stat"> | |
| <div class="n">+21%</div> | |
| <div class="l">quiz average vs IQ2_XXS</div> | |
| <p>50.8 vs 41.9 over five zero-shot tests, keeping 90% of the 8-bit original's 56.3.</p> | |
| </div> | |
| <div class="stat"> | |
| <div class="n">1.10x</div> | |
| <div class="l">generation speed vs IQ2_XXS</div> | |
| <p>Batch 1. Also 39% faster than Q4_K_M at half its size. Reading prompts is slower (0.74x).</p> | |
| </div> | |
| </div> | |
| <!-- RESULTS --> | |
| <section id="results"> | |
| <p class="kicker">Results</p> | |
| <h2>Same bytes, better model</h2> | |
| <p class="sub">Every number on this page comes from the paper and the logs in the code repository. Our shipped file is called <b>B4</b> in the chart.</p> | |
| <figure class="panel" style="margin:0"> | |
| <div class="chart"><a href="ppl_vs_size.png" target="_blank" rel="noopener" title="Open the chart full size"><img src="ppl_vs_size.png" alt="Two scatter plots of WikiText-2 perplexity against file size. Qwen3-4B: B4 16.64, IQ2_KT best 18.15, IQ2_XXS 28.61, fp16 12.46. Llama-3.1-8B: B4 9.14, IQ2_KT 10.04, IQ2_XXS 12.35." loading="lazy" width="1485" height="467"></a></div> | |
| <figcaption class="figcap">WikiText-2 perplexity against file size, all at or below llama.cpp's IQ2_XXS size (lower is better). Left: Qwen3-4B, where B4 is the last of many builds (post hoc). Right: Llama-3.1-8B, where the comparison with IQ2_KT was pre-registered before the file was built.</figcaption> | |
| </figure> | |
| <div style="height:18px"></div> | |
| <h3 style="margin:0 0 12px;font-size:18px">How it compares on Qwen3-4B</h3> | |
| <div class="tbl"> | |
| <table> | |
| <thead><tr><th>Format</th><th>Size</th><th>Perplexity</th><th>What it is</th></tr></thead> | |
| <tbody> | |
| <tr><td class="name">fp16 original</td><td class="num">8.05 GB</td><td class="num"><div class="pbar"><span style="width:43.5%"></span>12.46</div></td><td class="what">Uncompressed reference</td></tr> | |
| <tr><td class="name">Ternary Bonsai 4B <span class="what">(prism-ml)</span></td><td class="num">1.07 GB</td><td class="num"><div class="pbar"><span style="width:40.5%"></span>11.59</div></td><td class="what">Retrained model; needs a training run and their fork</td></tr> | |
| <tr><td class="name">GSQ Q2_K <span class="what">(ISTA-DASLab)</span></td><td class="num">1.67 GB</td><td class="num"><div class="pbar"><span style="width:50.2%"></span>14.37</div></td><td class="what">Compression, 34% bigger file</td></tr> | |
| <tr class="ours"><td class="name">Pingala-8 B4 <span class="tag">ours</span></td><td class="num">1.24 GB</td><td class="num"><div class="pbar"><span style="width:58.2%"></span>16.64</div></td><td class="what">Compression of the original, no retraining</td></tr> | |
| <tr><td class="name">IQ2_KT <span class="what">(ik_llama.cpp)</span></td><td class="num">1.25 GB</td><td class="num"><div class="pbar"><span style="width:63.4%"></span>18.15</div></td><td class="what">Compression, same size</td></tr> | |
| <tr><td class="name">IQ2_XXS <span class="what">(llama.cpp)</span></td><td class="num">1.25 GB</td><td class="num"><div class="pbar"><span style="width:100%"></span>28.61</div></td><td class="what">Compression, same size</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <p class="note">WikiText-2 test, context 4096, lower is better. <b>If you just want the strongest small Qwen3-4B, a retrained model like Ternary Bonsai scores higher.</b> Pingala-8 is for compressing models nobody has retrained for you: among the formats we tested, it gives the lowest perplexity for the original Qwen3-4B at this size without retraining.</p> | |
| <div style="height:28px"></div> | |
| <div class="two"> | |
| <div> | |
| <h3 style="margin:0 0 12px;font-size:18px">Zero-shot quiz scores, Qwen3-4B</h3> | |
| <div class="tbl"> | |
| <table style="min-width:540px"> | |
| <thead><tr><th>Test</th><th>8-bit original</th><th>IQ2_XXS</th><th>IQ2_KT</th><th>Ours</th><th>vs IQ2_XXS</th></tr></thead> | |
| <tbody> | |
| <tr><td>ARC-Easy</td><td class="num">66.1</td><td class="num">43.9</td><td class="num">53.3</td><td class="num up">60.9</td><td class="num up">+39%</td></tr> | |
| <tr><td>ARC-Challenge</td><td class="num">45.2</td><td class="num">29.1</td><td class="num">35.1</td><td class="num up">37.8</td><td class="num up">+30%</td></tr> | |
| <tr><td>HellaSwag</td><td class="num">65.8</td><td class="num">47.8</td><td class="num">53.3</td><td class="num up">57.7</td><td class="num up">+21%</td></tr> | |
| <tr><td>WinoGrande</td><td class="num">65.5</td><td class="num">57.5</td><td class="num">57.9</td><td class="num up">63.8</td><td class="num up">+11%</td></tr> | |
| <tr><td>MMLU</td><td class="num">38.7</td><td class="num">31.1</td><td class="num">32.9</td><td class="num up">34.0</td><td class="num up">+9%</td></tr> | |
| <tr class="ours"><td class="name">Average</td><td class="num">56.3</td><td class="num">41.9</td><td class="num">46.5</td><td class="num up">50.8</td><td class="num up">+21%</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <p class="note">All 2-bit files are the same 1.24 GB. Accuracy in %, higher is better.</p> | |
| </div> | |
| <div> | |
| <h3 style="margin:0 0 12px;font-size:18px">Llama-3.1-8B, pre-registered</h3> | |
| <div class="tbl"> | |
| <table style="min-width:480px"> | |
| <thead><tr><th>Format</th><th>Size</th><th>PPL, BOS</th><th>PPL, strided</th></tr></thead> | |
| <tbody> | |
| <tr><td class="name">fp16 original</td><td class="num">16.08 GB</td><td class="num">-</td><td class="num">-</td></tr> | |
| <tr class="ours"><td class="name">Pingala-8 B4 <span class="tag">ours</span></td><td class="num">2.39 GB</td><td class="num up">8.44</td><td class="num up">9.14</td></tr> | |
| <tr><td class="name">IQ2_KT</td><td class="num">2.39 GB</td><td class="num">9.36</td><td class="num">10.04</td></tr> | |
| <tr><td class="name">IQ2_XXS</td><td class="num">2.40 GB</td><td class="num">-</td><td class="num">12.35</td></tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <p class="note">WikiText-2, lower is better. "BOS": a BOS token at every window. "Strided": the protocol in the chart above. The win over IQ2_KT was predicted in writing before the file was built.</p> | |
| </div> | |
| </div> | |
| <div class="callout"> | |
| <div class="big">39%</div> | |
| <p><b>Faster than Q4_K_M at half its size.</b> On one RTX 5070 Ti Laptop GPU, batch-1 generation runs at 1.10x the speed of llama.cpp's IQ2_XXS. Prompt processing is slower (0.74x), so long pasted documents take longer to read in.</p> | |
| </div> | |
| </section> | |
| <!-- LIMITS --> | |
| <section id="limits"> | |
| <p class="kicker">Honest limits</p> | |
| <h2>Where we lose</h2> | |
| <p class="sub">Please read these before you pick a format. We would rather you know them up front.</p> | |
| <div class="limits"> | |
| <div class="lim"><h3>Qwen3-14B: IQ2_KT wins</h3><p>Perplexity 9.57 for us against 9.40 for IQ2_KT (a tie on C4). We wrote the prediction down before the run, so this is a real loss.</p></div> | |
| <div class="lim"><h3>A retrained model scores higher</h3><p>Ternary Bonsai 4B reaches 11.59 at 1.07 GB. It is a retrained model, not a compression of Qwen3-4B, and needs a training run plus its own fork.</p></div> | |
| <div class="lim"><h3>Prompt reading is slower</h3><p>Prompt processing runs at 0.74x the speed of IQ2_XXS, and serving several chats at once is 3 to 5 times slower.</p></div> | |
| <div class="lim"><h3>Patched llama.cpp, CUDA only</h3><p>Stock llama.cpp, Ollama and LM Studio cannot load these files yet. No Metal or Vulkan path. Speed was measured on one laptop GPU.</p></div> | |
| <div class="lim"><h3>The Qwen3-4B file is tuned</h3><p>It is the last of many builds evaluated on WikiText-2, so treat that result as post hoc. C4 text, Llama-3.1-8B and Qwen3-14B were held out or pre-registered.</p></div> | |
| <div class="lim"><h3>2 bits still costs quality</h3><p>The model is clearly worse than full precision: 16.64 against 12.46 perplexity for fp16 Qwen3-4B.</p></div> | |
| </div> | |
| </section> | |
| <!-- TRY --> | |
| <section id="try"> | |
| <p class="kicker">Try it</p> | |
| <h2>Chatting in about two minutes</h2> | |
| <p class="sub">Windows, NVIDIA RTX 30/40/50 with a recent driver. No Python, no build step.</p> | |
| <div class="steps"> | |
| <div class="step"><div class="k">1</div><h3>Download</h3><p>Get <code>pingala8-windows-cuda12.zip</code> from the <a href="https://github.com/Genrius-AI/pingala8-llm/releases/tag/v2.4-oneclick" target="_blank" rel="noopener">v2.4-oneclick release</a>.</p></div> | |
| <div class="step"><div class="k">2</div><h3>Unzip and double-click</h3><p>Run <code>run_qwen3_4b.bat</code> (or <code>run_llama31_8b.bat</code>). The model downloads once from this Hugging Face org.</p></div> | |
| <div class="step"><div class="k">3</div><h3>Chat</h3><p>A chat page opens at <code>http://127.0.0.1:8080</code> in your browser. Close the black window to stop.</p></div> | |
| </div> | |
| <p class="note"><a href="https://huggingface.co/spaces/Genrius-AI/llm-vram-calculator" target="_blank" rel="noopener noreferrer">Will it fit your GPU? Normal vs Pingala-8 calculator</a> →</p> | |
| <div style="height:16px"></div> | |
| <pre><span class="c"># Linux, from the same release</span> | |
| ./run.sh qwen <span class="c"># or: ./run.sh llama</span> | |
| <span class="c"># then open http://127.0.0.1:8080</span> | |
| <span class="c"># Build from source and reproduce the numbers</span> | |
| git clone https://github.com/Genrius-AI/pingala8-llm <span class="c"># see README.md and REPRODUCE.md</span></pre> | |
| <div class="why"> | |
| <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 8h.01"/><path d="M11 12h1v4h1"/></svg> | |
| <span>Why there is no live chat on this page: the format runs on our patched llama.cpp with CUDA, and this free Space has no GPU. The video above is the closest thing, recorded in real time.</span> | |
| </div> | |
| </section> | |
| <!-- MODELS --> | |
| <section id="models"> | |
| <p class="kicker">Get the files</p> | |
| <h2>Models, code and paper</h2> | |
| <p class="sub">GGUF files for the patched llama.cpp runtime. Pass the first shard; llama.cpp finds the others. Everything is also in one <a href="https://huggingface.co/collections/Genrius-AI/pingala-8-2-bit-llms-for-llamacpp-6adcae08d49bbdd8dd446ca9" target="_blank" rel="noopener">Hugging Face collection</a>.</p> | |
| <div class="cards"> | |
| <a class="card" href="https://huggingface.co/Genrius-AI/Qwen3-4B-Pingala8-2bit" target="_blank" rel="noopener"> | |
| <div class="t"><h3>Qwen3-4B Pingala-8 2-bit</h3><span class="sz">1.24 GB</span></div> | |
| <p>From 8.05 GB. Perplexity 16.64 vs 28.61 for IQ2_XXS at the same size. Works with the one-click chat build.</p> | |
| <div class="meta"><span class="chip">Apache-2.0</span><span class="chip">GGUF</span><span class="chip">2-bit</span></div> | |
| <span class="go">Genrius-AI/Qwen3-4B-Pingala8-2bit →</span> | |
| </a> | |
| <a class="card" href="https://huggingface.co/Genrius-AI/Llama-3.1-8B-Pingala8-2bit" target="_blank" rel="noopener"> | |
| <div class="t"><h3>Llama-3.1-8B Pingala-8 2-bit</h3><span class="sz">2.39 GB</span></div> | |
| <p>From 16.08 GB. Pre-registered win over IQ2_KT: 8.44 vs 9.36. Base model, best for plain text completion. Built with Llama.</p> | |
| <div class="meta"><span class="chip">Llama 3.1 Community License</span><span class="chip">GGUF</span><span class="chip">2-bit</span></div> | |
| <span class="go">Genrius-AI/Llama-3.1-8B-Pingala8-2bit →</span> | |
| </a> | |
| </div> | |
| <div class="small-cards"> | |
| <a class="card" href="https://github.com/Genrius-AI/pingala8-llm" target="_blank" rel="noopener"><h3>Code and patch</h3><p>CUDA patch for llama.cpp, build scripts and every log behind these numbers.</p><span class="go">GitHub →</span></a> | |
| <a class="card" href="https://github.com/Genrius-AI/pingala8-llm/releases/tag/v2.4-oneclick" target="_blank" rel="noopener"><h3>One-click build</h3><p>Windows zip with the patched runtime and a browser chat page. Linux script included.</p><span class="go">Release v2.4 →</span></a> | |
| <a class="card" href="https://doi.org/10.5281/zenodo.23481757" target="_blank" rel="noopener"><h3>Paper</h3><p>Small-State Coset Trellis Coding at IQ2_XXS Size: An Equal-Bytes Study in llama.cpp.</p><span class="go">DOI 10.5281/zenodo.23481757 →</span></a> | |
| </div> | |
| </section> | |
| <!-- HOW --> | |
| <section id="how"> | |
| <p class="kicker">How it works</p> | |
| <h2>A small trellis code, inside a GGUF file</h2> | |
| <div class="how"> | |
| <div> | |
| <p>Pingala-8 stores an <b>8-state trellis code</b> (Ungerboeck's set partitioning) over groups of 4 weights. Before coding, each weight matrix goes through a <b>random Hadamard rotation</b> and <b>QuIP-style LDLQ rounding</b>, and input-column scales are set by minimising an incoherence bound.</p> | |
| <p>The result is a normal GGUF file at no more bytes than llama.cpp's IQ2_XXS, decoded on the GPU by a CUDA patch to llama.cpp. It builds on QTIP and QuIP# and on ikawrakow's IQ2_KT.</p> | |
| <p>Compressing a model takes a few hours on one GPU. There is no retraining: the rounding step only needs some calibration text.</p> | |
| </div> | |
| <div class="pipe" aria-label="Pipeline"> | |
| <div><b>Original weights</b>fp16 / bf16 checkpoint you already have</div> | |
| <div class="arr">↓</div> | |
| <div><b>Hadamard rotation + LDLQ rounding</b>spreads outliers, rounds with error feedback</div> | |
| <div class="arr">↓</div> | |
| <div><b>8-state trellis over 4-weight symbols</b>2-bit class weights</div> | |
| <div class="arr">↓</div> | |
| <div><b>GGUF + patched llama.cpp (CUDA)</b>same file size as IQ2_XXS</div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- CITE --> | |
| <section id="cite"> | |
| <p class="kicker">Cite</p> | |
| <h2>If you use Pingala-8</h2> | |
| <div class="cite"> | |
| <button class="copy" type="button" id="copybtn">Copy</button> | |
| <pre id="bib">@misc{goyal2026pingala8, | |
| title = {Small-State Coset Trellis Coding at IQ2_XXS Size: | |
| An Equal-Bytes Study in llama.cpp}, | |
| author = {Goyal, Harshit}, | |
| year = {2026}, | |
| publisher = {Zenodo}, | |
| doi = {10.5281/zenodo.23481757}, | |
| url = {https://doi.org/10.5281/zenodo.23481757} | |
| }</pre> | |
| </div> | |
| </section> | |
| </div> | |
| </main> | |
| <footer> | |
| <div class="wrap"> | |
| <div class="row"> | |
| <div> | |
| <p><b style="color:var(--beige);letter-spacing:.18em;text-transform:uppercase;font-size:12px">Genrius AI</b></p> | |
| <p>Pingala-8 and Genrius AI are names of Genrius AI. Code: Apache-2.0. llama.cpp is MIT.</p> | |
| <p>Qwen3-4B is Apache-2.0. Llama 3.1 is licensed under the Llama 3.1 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved. Built with Llama.</p> | |
| </div> | |
| <div> | |
| <p><a href="https://huggingface.co/Genrius-AI" target="_blank" rel="noopener">Hugging Face</a> · <a href="https://github.com/Genrius-AI/pingala8-llm" target="_blank" rel="noopener">GitHub</a> · <a href="https://doi.org/10.5281/zenodo.23481757" target="_blank" rel="noopener">Paper</a></p> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| (function(){ | |
| var b=document.getElementById('copybtn'),t=document.getElementById('bib'); | |
| if(!b||!t)return; | |
| b.addEventListener('click',function(){ | |
| var s=t.textContent; | |
| function done(){b.textContent='Copied';setTimeout(function(){b.textContent='Copy'},1600)} | |
| try{ | |
| if(navigator.clipboard&&navigator.clipboard.writeText){navigator.clipboard.writeText(s).then(done,fallback)}else{fallback()} | |
| }catch(e){fallback()} | |
| function fallback(){ | |
| var r=document.createRange();r.selectNodeContents(t);var sel=window.getSelection();sel.removeAllRanges();sel.addRange(r); | |
| try{document.execCommand('copy');done()}catch(e){} | |
| } | |
| }); | |
| var v=document.querySelector('video'); | |
| if(v&&window.matchMedia&&window.matchMedia('(prefers-reduced-motion: reduce)').matches){v.removeAttribute('autoplay');v.pause()} | |
| })(); | |
| </script> | |
| </body> | |
| </html> | |