Thinletter demo Scientific search with a 2-bit query encoder, in your browser

The query encoder runs in your browser: the query side of the embedding model harrier-0.6b (a Qwen3-0.6B decoder, 1024-d) compressed by GPTQ onto llama.cpp's Q2_K grid into one 192 MiB file, executed by llama.cpp compiled to WebAssembly, on your GPU through WebGPU where the browser offers it and on the CPU otherwise. The document index is the original model's, unchanged: the corpus encoded once in full precision, searched directly in this tab. Nothing you type leaves your device.

reading metadata…

checking WebGPU …

The file is fetched as 24 MiB chunks from this site and kept in the browser's private storage (OPFS), so the next visit starts without downloading. Nothing is sent anywhere.

On this device

Model file
Download
Load (wasm + weights)
Backend
Threads
Cross-origin isolated
Memory after load
Encode, last / p50
Search docs, last / p50
Queries this session
0

Reference, same file, native llama.cpp on a laptop (8 threads, ctx 512, idle): 151 ms per query, 928 MiB peak RSS. Latency in a busy tab or on a loaded machine is higher.

Verify on this device

Runs the test queries through the model in this tab, one by one, scores each against the index and computes nDCG@10 with the same code path as the search box. Takes × (your latency); abortable.

Vector-quantised clients: results

Below llama.cpp's smallest format (IQ2_XS, 177.5 MiB) we run a vector-quantised container (4-d codebooks, 1.8–2.1 bits per weight) with its own WebGPU runtime. The runtime is not public yet; the numbers are. Same laptop, integrated Intel GPU, headless Chrome, 300 SciFact test queries, machine idle.

runtime / fileMiBloadpeak RSSp50p95nDCG@10
VQ runtime, 2.10 bpw119.52.4 s1 592 MiB103 ms113 ms0.7375
VQ runtime, 1.83 bpw105.32.5 s1 501 MiB102 ms112 ms0.7109
wllama WebGPU, Q3_K (this page)235.14.2 s2 080 MiB444 ms754 ms0.7481
wllama WebGPU, IQ2_M199.35.2 s1 983 MiB508 ms1 012 ms0.7387
wllama WASM 8 threads, Q2_K192.44.4 s1 228 MiB1 669 ms3 363 ms0.7425

fp32 model: 0.7559. On the Czech legal index the same format at 2.1 bpw keeps only 83 % (jina) / 64 % (Qwen3-Embedding) of fp32, so a ~3-bit variant is needed there. Full tables, caveats and the paired comparison with BitNet-270m: vq_results.md. A live demo with the VQ clients runs behind access control; ask for an invitation (contact in the repository README).