Pocket editionOctober 2026

Pocket Search

How small can a search index get before it stops finding things?

768256 128

$POCKET on Solanaopen source · MIT

Contract address · $POCKET

—

Pump.fun GMGN X

1 The question

A phone can now read your files by meaning. Where do the vectors go?

On 6 October 2026 Google released EmbeddingGemma 2, a 740-million-parameter model that turns text, images and audio into one kind of vector, on the device and offline.1 A photo, a voice memo and a note about the same thing land near each other, so one search can find all three.

Each vector is 768 numbers. A million of them in bfloat16 take about 1.5 GB.2 That is more memory than the model itself uses while it works: about 191 MB for text and 567 MB with vision and audio on a Pixel 11 Pro.

So the vectors are trained to shrink. The first 512, 256 or 128 numbers work on their own (Matryoshka learning), and the model is trained to survive int8 and int4. Google quotes about 90% of text quality at 128 dimensions for a sixth of the storage.3

That leaves every app that wants search on the device with the same question: which size and which precision, and what does each step down cost on my documents? pocket is a small open library that measures it. This booklet runs it on 2,000 pages of command-line help, here, in your browser.

One vector, folded and packed. Bytes each, to scale.
  1. Google Developers Blog, “Google AI Edge with EmbeddingGemma 2”, 6 October 2026. developers.googleblog.com
  2. Google Developers Blog, “EmbeddingGemma 2: the developer guide”, 6 October 2026. developers.googleblog.com
  3. tldr-pages, pages/common at commit 0241ce8, CC BY 4.0. github.com/tldr-pages/tldr
  4. pocket-search 0.1.1: the library, data and benchmark on page 6.

2 Try it on your device

Fold the index, then ask it something.

The 2,000 tldr pages below are embedded and indexed on your device when you reach this page; nothing is sent anywhere. Choose how far to fold the vectors and how to store them. Each result is checked against the full-size index, so you can see what the fold gave up.4

Fold to
Keep as

Opening the pages…

Try:

    3 What each fold costs

    12 times smaller, 97% of the hits.

    Every dimension and precision, measured on the same task: each tldr page minus its last example is a document, and the last example (“List all running processes”) is the query. The right answer is its own page. Point at a mark to read it.5

    Bytes per vector on a log scale. Each line runs from 64 dimensions (left) to 768 (right).

      1. Precision is almost free. int8 keeps 99.4% of the exact top 10 at a quarter of the size. bfloat16 cannot be told apart from float32.
      2. The first folds are cheap. 256-d int8 is 12 times smaller than 768-d float32 and finds the right page in the top 10 97% as often. At 128-d it is 23 times smaller and keeps 88%.
      3. Order matters when you cut. This embedder is not trained for truncation. Rotating it onto its principal components first lifts what a 128-d prefix keeps from 72% to 88%.6
      4. 1-bit codes need their variance spread. PCA piles variance into the first numbers, but each sign bit gets one vote. A random rotation before taking signs lifts 768-d 1-bit hit@10 from 0.433 to 0.493.
      5. 1-bit with a rerank is the speed option, not the memory option. It keeps 99% of the hits while scanning 96 bytes per page, but it keeps an int8 copy as well.
      Hit@10 by dimension, float32: PCA order against the raw projection.
      1-bit hit@10 by dimension: plain signs after PCA, and spread first.

      4 Will it fit?

      How much can a phone hold next to the model?

      Set what you have to store and how much memory you can spare.7 The model's own share comes from Google's figures for a Pixel 11 Pro; the quality column comes from page 3, so it describes this benchmark, not your data.

      Model loaded alongside

      Best that fits

      —

      SettingBytes eachTotalHits keptFits?

      5 The poster

      The study, on one sheet.

      Folded into the booklet: the whole study as a conference poster. Unfold it to read every panel.

      Poster · on-device retrieval · October 2026

      Folding vectors to fit a pocket: precision is cheap, dimensions are not, and order matters

      The pocket project · code, data and every number at pocket-search 0.1.1

      A Question

      On-device embedding models such as EmbeddingGemma 2 (768-d, Matryoshka-trained, quantization-aware) make local semantic search practical. The index, not the model, then dominates memory at scale: 106 vectors in bfloat16 take 1.5 GB [2].

      We ask what each reduction in dimension and precision costs in retrieval quality, and which reductions combine well.

      B Method

      • Data. 2,000 tldr pages (CC BY 4.0) [3]. Query: a page's last example. Document: the rest of the page. One right answer each.
      • Embedder. Hashed words, word pairs and character trigrams; TF-IDF; seeded ±1 projection to 768-d; optional PCA rotation fitted on the documents. Weights picked on 1,000 other pages.
      • Settings. 768, 512, 256, 128, 64 dimensions × float32, bfloat16, int8, 1-bit, 1-bit with int8 rerank; 1-bit with and without a random spreading rotation.
      • Measures. Recall@10 against exact float32 at 768-d; hit@1, hit@10, MRR against the right page.

      C Result

      Hit@10 against bytes per vector (log). Dashed: the sparse TF-IDF vector before projection, 0.585.

      D Table

      settingBR@10H@1H@10

      E Findings

      1. int8 and bfloat16 are near-lossless (recall@10 ≥ 0.99 at 768-d).
      2. 256-d int8: 260 B, 11.8× smaller than 768-d float32, 97% of hit@10.
      3. PCA ordering raises 128-d hit@10 from 0.396 to 0.487 for a post-hoc embedder.
      4. PCA lowers 1-bit quality; a seeded orthogonal rotation restores it (768-d hit@10: 0.43 → 0.49).
      5. 1-bit + int8 rerank keeps 99% of hit@10 but stores both codes.

      F Limits

      A lexical stand-in, not EmbeddingGemma 2: it has no notion of synonyms, and its projection loses some quality against the sparse vector it comes from (hit@10 0.554 against 0.585). One task, one language, exact linear search. Gains from trained Matryoshka models should exceed our PCA step; we did not measure them.

      References. [1] Google Developers Blog, Google AI Edge with EmbeddingGemma 2, 6 Oct 2026. [2] Google Developers Blog, EmbeddingGemma 2: the developer guide, 6 Oct 2026. [3] tldr-pages, commit 0241ce8. [4] pocket-search 0.1.1, this site.

      6 The source

      Everything on these pages runs on one small file.

      pocket.js has no dependencies and works in Node 18 or later and in the browser. It comes with a command line, three examples, the benchmark data and 17 tests.8

      Library

      fit(texts, {pca})
      learn word weights and the PCA order
      embed(model, text, dim)
      a unit vector, any prefix length
      new Index({dim, precision, spread})
      exact search over packed vectors
      index.search(vec, k)
      top k as {id, score}
      budget({items, dim, precision, ram})
      bytes, totals, how many fit
      bench(model, docs, queries, settings)
      recall, hit@1, hit@10, MRR

      Command line

      pocket fit docs.jsonl -o m.pkm
      fit and save a model
      pocket index … --dim 256 --precision int8
      build an index file
      pocket search i.pkt -m m.pkm "query"
      ask it
      pocket import gemma.jsonl -o g.pkt
      bring EmbeddingGemma 2 vectors
      pocket budget --items 1e6 --dim 128
      will it fit?
      pocket bench --spread
      page 3, on your machine
      
        
      Download pocket-search 0.1.1

      unzip pocket-search-0.1.1.zip && cd pocket-search && npm test

      7 Colophon

      $POCKET, set in this booklet.

      $POCKET is the community token of Pocket Search on Solana. The figures below update by themselves.9

      Name
      Pocket Search
      Ticker
      $POCKET
      Chain
      Solana
      Supply
      1,000,000,000
      Tax
      0%
      Price
      —
      Market cap
      —
      Volume, 24 h
      —
      Liquidity
      —
      Change, 24 h
      —
      Contract
      —

      Setting the plate…
      Plate 1. $POCKET in 1-second candles. Open the full chart

      Set in Sora, Source Sans 3 and Sono. Command pages from tldr-pages, CC BY 4.0. A token is not an investment product; nothing on these pages is financial advice.