TurboQuant

터보퀀트

Compress vectors into low-bit representations to reduce search storage.

···
html
<div class="v"><header><b>VECTOR COMPRESSION</b><span id="state"></span></header><main><div class="vectors" id="vectors"></div><div class="footnote" id="footnote"></div></main><footer>storage ↓ · approximation ↑</footer></div>
css
.v{width:min(92vw,660px);height:min(86vh,310px);box-sizing:border-box;padding:clamp(9px,2.5vmin,18px);border:1px solid var(--line);border-radius:14px;background:var(--surface);display:flex;flex-direction:column;gap:7px;color:var(--fg);font:500 clamp(15px,4.5vmin,19px)/1.25 var(--font-sans, sans-serif)}.v header,.v footer{display:flex;justify-content:space-between;align-items:center;gap:8px;white-space:nowrap}.v header b{color:var(--accent);font-size:.9em}.v header span,.v footer{color:var(--muted);font-size:.82em}.v main{flex:1;min-height:0;position:relative;overflow:hidden}.v .mono{font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.v .active{background:var(--accent)!important;color:var(--bg)!important;border-color:var(--accent)!important}.v .muted{opacity:.45} .vectors{height:68%;display:flex;align-items:center;justify-content:space-around;gap:8px}.vector{width:44%;text-align:center;color:var(--muted);font-size:.8em}.vector div{display:flex;justify-content:center;gap:2px;margin-top:7px}.vector i{display:block;width:10px;height:34px;background:var(--accent);border-radius:3px;transition:height .3s}.vector.short i{width:16px;background:var(--accent-3)}.footnote{text-align:center;color:var(--accent);font:600 .85em ui-monospace,monospace}
js
let n=0;function draw(){const a=[28,18,32,22,30,14,26,20],b=[24,16,28,24];document.getElementById("vectors").innerHTML="<div class=vector>original<div>"+a.map(x=>"<i style=\"height:"+x+"px\"></i>").join("")+"</div></div><div class=\"vector short\">compressed<div>"+b.map(x=>"<i style=\"height:"+(x+(n?3:0))+"px\"></i>").join("")+"</div></div>";document.getElementById("footnote").textContent=n?"fewer codes; compare approximate distances":"many values; compare original distances";document.getElementById("state").textContent=n?"low-bit":"original";n=1-n}draw();setInterval(draw,1350)

TurboQuant quantizes high-dimensional vectors for more compact vector search storage. It rotates and quantizes values, then handles residual error in another stage.

Compression lowers memory cost but introduces approximate distance error. The demo illustrates representation size rather than reproducing the algorithm’s exact numeric results.

When to use

Use it to understand the memory versus accuracy tradeoff in vector indexes.

Open as page ↗