Native Shell
Native Shell: AI-generated UI, native in your app, on every platform. Apps on iOS, Android, macOS, Windows and Linux, GPUI apps and web pages load signed, sandboxed TSX modules at run time and draw th
1B vectors, one 24 GB laptop, p99 11.2 ms at recall@10 0.906. Head-to-head with DiskANN from SSD.
Developer toolsRust · HTMLGitHub @18Abhinav07OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Results site: 18abhinav07.github.io/A-Game-Of-Vectors, with the 1B latency budget and the DiskANN head-to-head as interactive charts.
A vector search engine written from scratch in Rust, inspired by the architecture Exa described in How we built a web-scale vector database. It serves 113.5M passages (the TREC-RAG 2024 MS MARCO v2.1 corpus, Arctic-Embed-M v1.5) on one 24 GB laptop: R@10 0.909 at 4.8 ms p50 and 460 QPS with the codes in RAM, or R@10 0.902 at 13 ms in 225 MB of RAM with everything on SSD. On 1 billion vectors (MS SPACEV-1B) the same laptop builds an index in about 22 minutes and serves R@10 0.906 at 420 QPS (2.7 ms p50) or 0.960 at 127 QPS with 12 GiB of RAM and everything else read cold from SSD, or R@10 0.911 at 7.3 ms in 298 MB of RAM.
The implementation, tuning and every number here are this repo's own: it measures the design against exact search and NIST relevance labels, finds where it loses recall, and fixes that.
vqtbl1q_u8, 32-doc blocks, about 950M
codes/s/core) → IVF → rerank.pread. This is lossless versus
reranking all 1000, so 87 GB of rerank vectors never have to fit in RAM.pread per probe, a CLOCK cluster cache, a blocking I/O pool. Same recall as RAM
mode at 468 MB peak RSS for 18.4M vectors; RAM grows with the cluster count, not N.sdot (int8 query × int8 row) and centroid routing on AMX via
Accelerate.| R@10 | nDCG@10 dl21 / dl22 / dl23 | p50 (cold) | QPS | RAM | |
|---|---|---|---|---|---|
| exact flat 768-d | 1.000 | 0.694 / 0.552 / 0.470 | |||
| 64 probes, 2-bit tier → 200 rows from SSD | 0.909 | 0.686 / 0.547 / 0.457 | 4.8 ms | 460 | 14 GB |
| 128 probes, 1000 cand | 0.937 | 0.693 / 0.551 / 0.460 | 9.3 ms | 308 | 15 GB |
| SSD mode, 64 probes, top 300 from SSD | 0.902 | 0.684 / 0.546 / 0.454 | 13 ms | 90 | 225 MB |
| SSD mode + 1 GB cluster cache, margin probing | 0.907 | 0.690 / 0.545 / 0.460 | 7.2 ms | 117 | 3.3 GB |
At 128 probes (1.6% of the corpus scanned) nDCG@10 is within 0.011 of exact search on every query set; at 256 probes, within 0.006.
| R@10 | p50 | QPS (12 threads) | |
|---|---|---|---|
| plain IVF, 32 probes | 0.815 | ||
| + SOAR | 0.883 | 0.76 ms | 12.8k |
| + RaBitQ residual codes | 0.894 | 0.78 ms | 13.5k (at 500 cand) |
| + 2-bit tier, 200 rows from SSD | 0.893 | ||
| ceiling of the codes (exhaustive scan + rerank): Exa's sign codes → RaBitQ | 0.949 → 0.981 |
Against FAISS on the same slice, with the same 32 B budget and the same int8 rerank: for
R@10 ≈ 0.885, FAISS's fastest IVF index (IVF4096,PQ64x4fs) needs 128 probes and 1.54 ms just
to scan the codes. sieve needs 32 probes and 0.63 ms end to end, so it is 2.4× faster, mostly
because of SOAR. FAISS's IVF,RaBitQ reaches 0.903 at 128 probes; sieve reaches 0.919 at 64.
Full tables, ablations and kernel numbers: BENCHMARKS.md. Every design decision and the evidence for it: DESIGN.md.
The M2 corpus stops at 113.5M because that is all of it, so the 1B claim is tested on the big-ann-benchmarks SPACEV-1B set instead, on the same 24 GB laptop with no cloud.
| nprobe:cand | R@10 (100M) | R@10 (1B) | p50 (1B) | p99 (1B) | QPS (1B) |
|---|---|---|---|---|---|
| 64:500 | 0.899 | 0.911 | 7.3 ms | 9.9 ms | 147 |
| 128:1000 | 0.938 | 0.942 | 14.6 ms | 24.2 ms | 69 |
| 256:2000 | 0.965 | 0.964 | 28.2 ms | 37.3 ms | 35 |
| 128:1000, cold | 0.938 | 0.944 | 18.2 ms | 25.4 ms | 55 |
| 2-bit, 12 GiB pinned, rest cold | R@10 | p50 | p99 | QPS |
|---|---|---|---|---|
| 128:100:1000:m0.3 | 0.871 | 2.2 ms | 9.1 ms | 599 |
| 128:100:1000:m0.4 | 0.906 | 2.7 ms | 11.2 ms | 420 |
| 96:100:1000:m0.45 | 0.911 | 3.0 ms | 10.3 ms | 413 |
| 96:100:1000:m0.6 | 0.927 | 3.8 ms | 11.2 ms | 314 |
| 192:200:2000:m1.0 | 0.960 | 8.7 ms | 21.6 ms | 127 |
| fixed 40:100:1000 (no margin) | 0.906 | 3.5 ms | 7.2 ms | 372 |
What a real service would still need, roughly in order:
pread. On Linux,
io_uring with registered buffers would remove the thread pool.vqtbl1q_u8 and sdot kernels, Accelerate (AMX) sgemm, and F_NOCACHE for cold reads. The
crate also builds elsewhere with scalar and rayon fallbacks, but only macOS on Apple Silicon
has been measured.rustup update stable.| Experiment | Download | Disk at peak | Time |
|---|---|---|---|
| Tests and kernels | none | none | 1 min |
| DiskANN head-to-head, sieve side (10M SPACEV) | 10 GB | 11 GB | ~5 min download, 1 min run |
| M1 (18.4M passages) | 58 GB (10 parquet shards) | ~85 GB | download, then 79 s ingest and ~2 min per index |
| M2 (113.5M passages) | all 60 shards, streamed and deleted | 87 GB of int8 rows plus codes and index | 3 h 19 min download and ingest, 13 min index |
| SPACEV-1B | 100 GB | ~200 GB (chunks, postings, run files) | ~55 min download, build overlapped |
git clone https://github.com/18Abhinav07/A-Game-Of-Vectors.git && cd A-Game-Of-Vectors
cargo test --release # 31 tests: NEON kernels against scalar references,
# the RaBitQ error bound, SOAR, cache, BM25, sharding wire format
cargo run --release --example kernel # 1-bit LUT scan throughput on this machine (~950M codes/s per core)
./scripts/spacev.sh 0 # SPACEV queries, ground truth and chunk 0 (10 GB, resumable)
./scripts/spacev-10m.sh # build the 10M index (~10 s), search in RAM, then cold from SSD
It prints one line per config (R@10, strict R@10, p50, p99, stage times, QPS) and appends JSON to
results/diskann-h2h.jsonl. A clean rebuild reproduced the published strict recall exactly
(0.907 / 0.945 / 0.974 in RAM, 0.894 / 0.930 / 0.970 cold) and QPS within 2%. DiskANN's own
side, with the macOS reader patch, is in BENCHMARKS.md.
./scripts/download.sh 0 9 # M1 corpus: topics, qrels and the first 10 shards (58 GB, resumable)
./scripts/m1.sh # 10 shards: ingest, index (plain, SOAR, RaBitQ), eval, bench
./scripts/m2.sh # all 60 shards, streamed and deleted as they are ingested
./scripts/ac-bench.sh # M1 latency re-runs on AC power (refuses on battery or Low Power Mode)
./scripts/spacev.sh 0 1 2 3 4 5 6 7 8 9 # SPACEV-1B: the ten 10 GB base chunks
./scripts/spacev-1b.sh # run alongside: train, add each chunk as it lands, pack, search
M1 and M2 read the corpus that scripts/download.sh fetches (the Snowflake Arctic-Embed-M v1.5 MS MARCO
v2.1 embeddings on Hugging Face). Every run appends JSON lines to results/. The committed
files there are the logs behind every table, and scripts/bench-summary.py condenses bench
output to one line per run. Latency depends on power state: on battery in Low Power Mode the M1 scan took
1.6× as long and 12-thread QPS fell 3×, which is why ac-bench.sh refuses to run on battery.
FAISS baseline (optional): python3 -m venv .venv-bench && .venv-bench/bin/pip install faiss-cpu numpy, then .venv-bench/bin/python -I scripts/faiss_baseline.py --ingest data/ingest --out results/faiss-m1.jsonl after M1.
ingest (parquet → codes, int8 rows, ground truth), index (k-means, SOAR, tiers),
search [--ssd --cache-mb N] [--shards host:port,... [--two-phase]] eval | routing | bench [--cold],
search live (delete, reinsert, replay, compact), bm25 (inverted index from the passage text),
search hybrid | filter, shard --shard i --of n --listen host:port [--ssd], spacev train [--bits 2] | add | pack | search [--cold] [--hot-gb N]
(SPACEV-1B). Every binary takes --help. Config strings are
nprobe:cand:rerank[:bM[xW]][:pΔ][:sN[k]], with rerank one of none | prefix | full | tieredN | ssdN;
for spacev search they are nprobe:exact_reads:refined_shortlist[:mMARGIN].
site/ is the results page, plain HTML with no build step. Preview it with
python3 -m http.server -d site 8000 and open http://localhost:8000. Pushes to main that
touch site/ deploy it to GitHub Pages
through .github/workflows/pages.yml.
src/quant.rs normalisation, sign codes, int8 quantiser, sdot kernels
src/lut.rs asymmetric LUT scan (NEON + scalar reference, property-tested)
src/rabitq.rs RaBitQ rotation, residual codes, estimator and error bound
src/tier2.rs 2-bit Lloyd-Max middle tier with per-byte score tables
src/ivf.rs k-means, SOAR assignment, index build, search, SSD row reader
src/postings.rs SSD posting lists, CLOCK cluster cache
src/live.rs tombstones, delta lists, write-ahead log, compaction
src/bm25.rs tokenizer, inverted index build, TAAT BM25, weighted RRF
src/filter.rs allowlist filters: post, expanding probe, brute force, planner
src/shard.rs cluster→shard assignment, wire protocol, shard server, coordinator client
src/store.rs mmap, page eviction/residency, blocking I/O pool
src/blas.rs Accelerate sgemm (AMX)
src/data.rs parquet streaming, topics, qrels
src/eval.rs recall, nDCG@10 (MaxP)
src/bigann.rs SPACEV-1B: L2 RaBitQ, two-level leaves, out-of-core add/pack, chunk rerank
src/bin/spacev.rs train | add | pack | search for the 1B track
scripts/ download, end-to-end runs, FAISS and DiskANN baselines
bench/diskann/ DiskANN job configs and its macOS SSD reader patch
results/ the JSON logs behind every table
site/ the results site (GitHub Pages)
examples/ kernel, SSD, middle-tier and pread/mmap experiments