Spaces:
Running
Running
organisation card rebuilt around the achievements: numbers with links to repos and datasets, repository table incl. the Czech VQ client and the demo Space
Browse files
README.md
CHANGED
|
@@ -1,37 +1,64 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: thinletter
|
| 3 |
-
emoji: 🪶
|
| 4 |
-
colorFrom: pink
|
| 5 |
-
colorTo: yellow
|
| 6 |
-
sdk: static
|
| 7 |
-
pinned: false
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
# thinletter
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
Web: [thinletter.io](https://thinletter.io) · code and report:
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
| 21 |
-
|---|---|---|
|
| 22 |
-
|
|
| 23 |
-
|
|
| 24 |
-
|
|
| 25 |
-
|
|
| 26 |
-
|
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: thinletter
|
| 3 |
+
emoji: 🪶
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: yellow
|
| 6 |
+
sdk: static
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# thinletter — a query encoder as a 120 MiB file, in the browser, open source
|
| 11 |
+
|
| 12 |
+
We take an embedding model, leave its document index exactly as it is, and compile the **query side** into a file a tenth of the size that
|
| 13 |
+
answers in the browser in about 100 ms. Everything behind the numbers is public under Apache-2.0: the quantiser, the container compiler,
|
| 14 |
+
the WebGPU runtime, the verification recipe and every released file. Web: [thinletter.io](https://thinletter.io) · code and report:
|
| 15 |
+
[github.com/rosecky/embedding-quantization-public](https://github.com/rosecky/embedding-quantization-public) · demo:
|
| 16 |
+
[thinletter.io/demo](https://thinletter.io/demo) or the Space [thinletter/demo](https://huggingface.co/spaces/thinletter/demo) · contact: info@thinletter.io
|
| 17 |
+
|
| 18 |
+
## What holds
|
| 19 |
+
|
| 20 |
+
| number | what it is | where to check |
|
| 21 |
+
|---|---|---|
|
| 22 |
+
| **98.2 %** | of full-precision nDCG@10 from a 120 MiB, 2.1-bit vector-quantised harrier-0.6b client, no retraining: above the trained BitNet-270m (140 MiB, 97.0 %), below any file llama.cpp can produce (178 MiB, 93.9 %). The browser reproduces the simulation (0.7375 vs 0.7380). | [harrier-0.6b-vq-clients](https://huggingface.co/thinletter/harrier-0.6b-vq-clients), [BeIR/scifact](https://huggingface.co/datasets/BeIR/scifact) |
|
| 23 |
+
| **4.3×** | faster than llama.cpp's WebGPU path on the same integrated GPU: 103 ms per query for the 119 MiB vector-quantised client against 444 ms for the 235 MiB Q3_K file, in our open WebGPU runtime (`client/vqweb`). | report §3.4b in the repository |
|
| 24 |
+
| **96.8 %** | of fp32 nDCG@10 on the public Czech benchmark WebFAQ-cs from a 237 MiB vector-quantised Qwen3-Embedding-0.6B client (2-d codebooks, 3.6 bits per weight), browser = simulation, 112 ms per query. Czech-calibrated scalar clients: bge-m3 99.2 % (355 MiB), Qwen3 98.7 % (340 MiB) on a Czech legal index. | [qwen3-embedding-0.6b-vq-clients](https://huggingface.co/thinletter/qwen3-embedding-0.6b-vq-clients), [PaDaS-Lab/webfaq-retrieval](https://huggingface.co/datasets/PaDaS-Lab/webfaq-retrieval) |
|
| 25 |
+
| **+0.010** | nDCG@10 at 1.8 bits from a method of ours: ship the query prompt's keys and values in full precision (2 MB) and calibrate the compressed model with them in place; three seeds on SciFact and on a Czech legal index, every paired interval above zero. | report §3.7; the `*p` files in [harrier-0.6b-vq-clients](https://huggingface.co/thinletter/harrier-0.6b-vq-clients) |
|
| 26 |
+
| **96–101 %** | kept by the 3.4-bit harrier-0.6b scalar client on four English corpora, 235 MiB instead of 1 143 MiB. Not ours to claim: llama.cpp's own quantiser gets there too, and we say so. | [harrier-0.6b-query-clients](https://huggingface.co/thinletter/harrier-0.6b-query-clients) |
|
| 27 |
+
|
| 28 |
+
## Repositories
|
| 29 |
+
|
| 30 |
+
Query-side clients: each file is a query encoder for exactly one document encoder and its settings (the model card says which).
|
| 31 |
+
The index does not change.
|
| 32 |
+
|
| 33 |
+
| repository | base model · licence | files | what holds (test split, the model's own fp32 index) |
|
| 34 |
+
|---|---|---|---|
|
| 35 |
+
| [harrier-0.6b-query-clients](https://huggingface.co/thinletter/harrier-0.6b-query-clients) | [microsoft/harrier-oss-v1-0.6b](https://huggingface.co/microsoft/harrier-oss-v1-0.6b) · MIT | 3 GGUF, 192–235 MiB | Q3_K generic-English 98.9 / 99.3 / 101 / 99.2 % on [SciFact](https://huggingface.co/datasets/BeIR/scifact) / [NFCorpus](https://huggingface.co/datasets/BeIR/nfcorpus) / [ArguAna](https://huggingface.co/datasets/BeIR/arguana) / [SciDocs](https://huggingface.co/datasets/BeIR/scidocs); Q2_K SciDocs-calibrated 94.5 % |
|
| 36 |
+
| [harrier-0.6b-vq-clients](https://huggingface.co/thinletter/harrier-0.6b-vq-clients) | microsoft/harrier-oss-v1-0.6b · MIT | 8 `.vqw`, 105–129 MiB, 1.8–2.1 bits per weight | SciDocs 94.7 / 91.3 %, SciFact 98.2 / 96.5 %; prompt-K/V variants SciDocs 96.6 / 93.8 %, SciFact 98.1 / 95.8 %; browser-verified; run in the open WebGPU runtime |
|
| 37 |
+
| [qwen3-embedding-0.6b-query-clients](https://huggingface.co/thinletter/qwen3-embedding-0.6b-query-clients) | [Qwen/Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) · Apache-2.0 | 4 GGUF, 340–385 MiB, English and Czech calibration | Q4_K_M + 4-bit table: 99.3–100 % on the four English corpora, 98.7 % on a Czech legal index; Q5_K_M 99.5 % Czech |
|
| 38 |
+
| [qwen3-embedding-0.6b-vq-clients](https://huggingface.co/thinletter/qwen3-embedding-0.6b-vq-clients) | Qwen/Qwen3-Embedding-0.6B · Apache-2.0 | 1 `.vqw`, 237 MiB, 2-d codebooks 3.57 bpw + full token table | Czech: 96.8 % of fp32 on [WebFAQ-cs](https://huggingface.co/datasets/PaDaS-Lab/webfaq-retrieval) (cosine 0.946, overlap 0.755), browser = simulation, 112 ms on an integrated GPU |
|
| 39 |
+
| [bge-m3-query-clients](https://huggingface.co/thinletter/bge-m3-query-clients) | [BAAI/bge-m3](https://huggingface.co/BAAI/bge-m3) · MIT | 2 GGUF, 321–355 MiB, Czech calibration | 99.2 % / 98.3 % on the Czech legal index, 99.6–100 % on SciFact |
|
| 40 |
+
| [demo](https://huggingface.co/spaces/thinletter/demo) (Space) | — | the browser demo, static | search SciDocs (25 656 abstracts) or WebFAQ-cs (71 529 Czech passages) locally with a scalar or a vector-quantised client; models and indexes download from thinletter.io |
|
| 41 |
+
| [llm-weight-compression-evidence](https://huggingface.co/datasets/thinletter/llm-weight-compression-evidence) | dataset · MIT | per-window evidence | which objective a post-training quantiser should optimise (companion project) |
|
| 42 |
+
|
| 43 |
+
Each model repository has a summary post in its Community tab with the numbers, what was found along the way, and the limits.
|
| 44 |
+
|
| 45 |
+
## How we measure
|
| 46 |
+
|
| 47 |
+
Test split, the model's own fp32 index, native runtime (llama.cpp) or the browser. Every run is pre-registered with a prediction and a
|
| 48 |
+
kill rule; comparisons change one thing at a time at the same calibration budget; differences are paired bootstrap intervals over queries
|
| 49 |
+
(10 000 draws) read against the variance of the calibration draw (~0.01 nDCG@10) and between machines (±0.006): under 0.01 is a tie.
|
| 50 |
+
Negative results stay published (a codebook-budget idea that did not work, a 2.6-bit headline that held on one corpus only, the 2-bit cliff
|
| 51 |
+
of Qwen3-Embedding: 65–81 % for the same run on two machines).
|
| 52 |
+
|
| 53 |
+
## Verify on your own index
|
| 54 |
+
|
| 55 |
+
The [public repository](https://github.com/rosecky/embedding-quantization-public) has the recipe: import your corpus and existing
|
| 56 |
+
document vectors, generate synthetic queries, quantise (llama-quantize, the GPTQ exporter, or the vector quantiser + `.vqw` compiler),
|
| 57 |
+
evaluate the client against the unchanged index with a paired interval. Everything in the report is reproducible from it; only the raw
|
| 58 |
+
per-run results, the research log and a customer's data stay out.
|
| 59 |
+
|
| 60 |
+
## Licences
|
| 61 |
+
|
| 62 |
+
Code Apache-2.0 (NOTICE lists wllama MIT, @huggingface/tokenizers Apache-2.0, a Q2_K decoder ported from llama.cpp MIT). Weights under
|
| 63 |
+
their base model's licence (MIT / Apache-2.0). Demo corpora: SciDocs (BEIR, CC BY 4.0), WebFAQ-cs (CC BY 4.0). Files derived from
|
| 64 |
+
non-commercial bases (jina-embeddings-v5, CC BY-NC) are reported as numbers only.
|