Settings

Theme

From 22 GB to 5.3 GB: all of Hacker News, searchable offline

discuss.ai.google.dev

4 points by dmonterocrespo · 1 comment

Reader

1 thread
dmonterocrespoOP

I built an project that puts every Hacker News item (49.3M stories and comments, 2006 to 2026) in one 5.34 GB file and searches it by meaning and by keywords on a laptop CPU.

How EmbeddingGemma 2 is used:

Every item was embedded once on the laptop’s integrated GPU (Intel Core Ultra 7 265H, OpenVINO, about 200 documents per second, about 4.5 days for all of HN). Each vector is stored as a 256-bit binary code: 32 bytes per item, 1.5 GB for the whole archive. At query time the query is embedded on the CPU with an int8 version of the model, the 80 closest codes become candidates, and the best 50 are embedded again from their decoded text and reranked. Results, measured in October 2026: P@10 of 0.32 within the query’s month (keyword search alone: 0.26), about 2.3 s for a cold search, inside a 2 GB RAM budget.

The text itself is compressed with a small language model (59 bytes per item), which is what makes the reranking cheap.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection