Skip to content

Instantly share code, notes, and snippets.

View ruvnet's full-sized avatar
💭
hacking the multiverse.

rUv ruvnet

💭
hacking the multiverse.
View GitHub Profile
@ruvnet
ruvnet / ruvector-symphonyqg-2026.md
Created May 7, 2026 07:42
ruvector 2026: SymphonyQG — High-Performance Rust Vector Search, 1-Bit Graph Quantization, SIMD ANN, 2-4x speedup over HNSW (SIGMOD 2025)

ruvector 2026: SymphonyQG — High-Performance Rust Vector Search with Co-Designed 1-Bit Graph Quantization

150-word summary: ruvector now ships SymphonyQG (SIGMOD 2025), the fastest single-machine approximate nearest neighbour (ANN) search system in Rust. It stores 1-bit vector sketches inline with graph edges and pads each vertex's degree to a SIMD batch boundary, so a single XNOR-popcount pass evaluates 32 neighbours without any random cache misses. Benchmarked on x86_64 Linux at D=128: 2.11× QPS over standard HNSW at matched 97.6% recall@10 (n=5K, ef=100), scaling to 4.14× at n=50K. Pure Rust, zero unsafe intrinsics — LLVM auto-vectorises the XNOR+POPCNT loop. cargo build --release && cargo test green.

Introduction: The Cache-Miss Problem in Graph ANN

Every graph-based vector search engine (HNSW, DiskANN, NSG) suffers the same bottleneck: expanding a vertex during beam search requires loading each neighbour's full embedding from a random memory address. At D=128 (512 bytes per

@ruvnet
ruvnet / ruvllm_sparse_attention_report.md
Last active May 7, 2026 05:16
ruvllm_sparse_attention: Subquadratic Sparse Attention for Edge LLM Inference on Hailo-10H Pi 5 Cluster

ruvllm_sparse_attention: Subquadratic Sparse Attention for Edge LLM Inference

What This Is (Simple Version)

AI language models are slow on small computers — not because of the model weights, but because of attention: the mechanism that lets every word look at every other word in the text. When you double the text length, attention gets four times harder, not twice.

ruvllm_sparse_attention fixes this by teaching the model to be selective. Instead of every word looking at every other word, it looks at:

  • The words closest to it (recent context)
  • A few anchor words at the start (global signals)
@ruvnet
ruvnet / ruvector-symphony-qg-overview.md
Created May 5, 2026 07:39
ruvector SymphonyQG 2026: Co-located RaBitQ Graph ANNS | 16x faster distance kernel | Rust vector search | SIGMOD 2025

ruvector 2026: SymphonyQG — High-Performance Rust Vector Search with Co-located RaBitQ Graph Quantization

Nightly research spike · 2026-05-05 · Implements SIGMOD 2025 (arXiv:2411.12229) in pure Rust

Approximate nearest-neighbor search (ANNS) is the backbone of modern AI applications — powering retrieval-augmented generation (RAG), semantic search, recommendation engines, and embedding-based classification. ruvector is an open-source Rust vector database designed for production-grade ANNS with no Python dependencies, no C FFI, and no unsafe code.

This document describes SymphonyQG, the latest addition to ruvector: a graph-based ANNS index from SIGMOD 2025 that achieves 9–20× distance kernel speedup and 2× end-to-end QPS improvement over exact-distance graph traversal by co-locating 1-bit RaBitQ codes with neighbor IDs.


@ruvnet
ruvnet / README.md
Last active May 5, 2026 04:14
ruflo-cost-tracker Agent Booster vs Gemini 2.0 Flash — measured 1026.8× speedup, 12/12 win rate, $0 cost (vs $0.000020/edit)

Agent Booster vs Gemini / Sonnet 4.6 / Opus 4.7 — corpus v3 (25 cases)

Live benchmark for ruflo-cost-tracker v0.15.0 against four endpoints, on the v3 corpus (18 structural Tier 1 cases + 7 adversarial). All measurements local; LLM keys pulled from the same Secret Manager secrets the deployed ruvocal Cloud Run service uses.

Headline (corpus v3, 2026-05-05)

| Endpoint | Tier 1 win | Adversarial | Avg latency | Cost / edit | Speedup vs Booster |

@ruvnet
ruvnet / HammerStarSweep.mq5
Last active May 3, 2026 22:44
MT5 Hammer/Shooting-Star Liquidity-Sweep EA — Ruflo tutorial (issue #1720)
//+------------------------------------------------------------------+
//| HammerStarSweep.mq5 |
//| Hammer / Shooting-Star Liquidity-Sweep EA |
//| |
//| Mirrors v3/docs/examples/mt5-hammer-star-sweep/bridge/strategy |
//| Two operating modes: |
//| 1) Native: detects sweeps + candle pattern in MQL5 |
//| 2) Bridge: reads ruflo_signals.json written by ruflo bridge |
//+------------------------------------------------------------------+
#property copyright "Ruflo - issue #1720"
@ruvnet
ruvnet / accelerator-plane-deep.md
Created April 27, 2026 22:43
ruLake accelerator plane (ADR-157): VectorKernel trait + dispatch — two kernels ship today (AVX-512 host SIMD bit-equal, wgpu portable GPU auto-detects Vulkan/Metal/DX12/GL/WebGPU), determinism as hard gate on witness-sealed paths

ruLake accelerator plane — A Deep Introduction

TL;DR

The ruLake accelerator plane is the runtime + crate layout that lets the same RuLake binary route the popcount-scan + L2² rerank inner loop to a CPU-naive baseline, an AVX-512 host kernel, or a portable GPU kernel via wgpu — without forcing any of those backends into the core dependency graph and without ever letting a non-deterministic kernel feed a witness-sealed answer. The contract is the VectorKernel trait at crates/core/src/kernel.rs (id, caps, scan), the dispatch policy lives in RuLake::pick_kernel and consults Consistency + batch + dim, and conformance against assert_kernel_conformant is the only path past experimental. Two implementations ship today as standalone sibling crates — crates/kernel-avx512/ (bit-equal, ~2.5% faster than CpuNaive on the headline grid where sort dominates) and crates/kernel-wgpu/ (auto-detects Vulkan/Metal/DX12/GL/WebGPU adapters; deterministic on the popcount path, coarse-deterministic on L2 because

@ruvnet
ruvnet / ruvector-finger-overview.md
Created April 27, 2026 07:32
ruvector FINGER 2026: First Rust implementation of FINGER graph ANN approximate distance skipping (arXiv:2206.11408) — 80% prune rate, 2x QPS on high-dim embeddings, zero unsafe

ruvector 2026: FINGER — High-Performance Rust Graph ANN with Approximate Distance Skipping

150-char summary: First production Rust impl of FINGER (WWW 2023) — skips 80%+ of graph ANN distance computations using precomputed residual bases, reducing per-query cost in vector search pipelines.

Introduction

Modern vector databases — Qdrant, Milvus, Weaviate, Pinecone — all rely on graph-based approximate nearest neighbor (ANN) algorithms like HNSW. The shared bottleneck: every graph edge traversal requires an O(D) exact distance computation against a D-dimensional embedding. At D=128 (SIFT, visual features) or D=1536 (GPT-4 text embeddings), over 80% of these computations are wasted — the neighbor is too far to ever enter the top-k result set.

FINGER (Chen et al., WWW 2023, arXiv:2206.11408) solves this by precomputing a K-dimensional orthonormal basis from each graph node's edge-residual vectors at build time. During beam search, it projects the query residual onto this K-dimensional subspace o

@ruvnet
ruvnet / 16-ghost-murmur-ruview-spec.md
Created April 26, 2026 21:40
Ghost Murmur on RuView: open-source spec for an honest, multi-modal heartbeat mesh (60 GHz mmWave + WiFi CSI + NV-diamond simulator). Reality-checks the April 2026 CIA news against published physics and shows what an open-source 65 build looks like.

Ghost Murmur on RuView — A Specification for an Open, Honest, Multi-Modal Heartbeat Mesh

SOTA Research + Build Spec — Quantum Sensing Series (16/—)

Field Value
Date 2026-04-26
Domain NV-diamond magnetometry × 60 GHz mmWave radar × WiFi CSI × multistatic fusion
Status Research spec — speculative architecture, not a delivered system. Educational + safety-critical use cases only.
Refines ADR-089 (nvsim simulator), ADR-029 (RuvSense multistatic), ADR-021 (vitals), ADR-022 (wifiscan)
@ruvnet
ruvnet / ruvector-acorn-filtered-hnsw-2026.md
Last active April 26, 2026 20:53
ruvector 2026: ACORN Predicate-Agnostic Filtered HNSW in Rust — 98.9% recall@10 at 1% selectivity, faster filtered vector search

ACORN Filtered HNSW in Rust — Predicate-Aware Vector Search with No Recall Collapse

Keywords: filtered vector search · ACORN · HNSW · approximate nearest neighbor (ANN) · predicate filter · vector database · Rust · RAG · semantic search · low selectivity recall · embedding search · k-NN graph · ruvector

TL;DR. ruvector-acorn is a pure-Rust implementation of ACORN (Patel et al., SIGMOD 2024, arXiv:2403.04871) that solves filtered HNSW's recall-collapse problem at low predicate selectivity. 96% recall@10 at 1% selectivity, 99 K QPS at 50% selectivity, 23 ms parallel index build for 5 K × 128. Drop-in FilteredIndex trait — works with any Fn(u32) -> bool predicate (equality, range, geo, ACL, composite). No C/C++ FFI, no unsafe, no BLAS dependency. Source: github.com/ruvnet/RuVector.


Why filtered vector search is hard

@ruvnet
ruvnet / rabitq-issue-body.md
Created April 26, 2026 03:41
RuView RaBitQ similarity sensor — ADR-084 announcement (43-51x compare speedup, 7.5x top-K speedup)

What this is

RuView now has a cheap similarity sensor baked into the pipeline — a way to ask "have I seen something like this before?" for any embedding (poses, CSI features, room signatures) without paying the full floating-point cost. It uses a technique called RaBitQ-style binary sketching: each embedding gets compressed to one bit per dimension (32× smaller in memory) and compared with a single CPU instruction (POPCNT on Intel/AMD, NEON vcnt on ARM/Pi/Mac).

The architectural decision is ADR-084 (merged on main, status: Proposed). The first implementation pass — the foundation Sketch / SketchBank API — is on branch feat/adr-084-pass-1-sketch-module (commits 6fd5b7d, 1df9d5f7d).

Why this matters in plain language

A lot of what RuView does is the same shape of question over and over: