yggvault ratatoskr-space connected via regular web
Color theme
also available via yggdrasil mesh http://[203:b338:2a84:a18f:986:47ae:1a4:d8d3]/pkg/ruview/v1728
vault / ruview / v1728

ruview @ v1728

integrity

size
61.6 MiB
downloaded
last checked
source https://github.com/ruvnet/RuView · available · github

release notes

Automated release from CI pipeline

Changes: feat(beyond-sota): ADR-155 metric unification + ADR-156 RaBitQ Pass-2 (honest negative + latent topk bugfix) (#1053)

ADR-155 §8 deferred item: test_metrics.rs reference kernels validated production against their OWN reimplementation — a test that cannot catch a canonical-impl bug (both could be wrong the same way).

Grade: MEASURED. test_metrics 10→12 tests, 0 failed.

Co-Authored-By: claude-flow ruv@ruv.net

Goal C named training_api.rs:804 (torso-HEIGHT PCK). Auditing it surfaced TWO findings the ADR-155 §1 table missed:

  1. training_api.rs is an ORPHAN file — not declared mod in lib.rs OR main.rs, so it does NOT compile into the crate. It does not drive the live server.
  2. The REAL live best_pck/best_oks (main.rs training path → RVF metadata JSON read by model_manager.rs) come from trainer.rs:
    • pck_at_threshold = RAW-threshold PCK, NO torso normalization (the most divergent kind), printed/serialized as bare "PCK@0.2".
    • oks_map calls oks_single(area=1.0) = the EXACT fake-Gold pattern ADR-155 §2.1 claimed closed elsewhere — still live here, inflating best_oks.

Resolution = RELABEL (torso/raw math is load-bearing on different data; the pub fns can't be renamed without breaking API; sensing-server has no train/ ndarray dep). Honest unify is a tracked §8 backlog item.

No wire-format field renames (back-compat); no pub-API rename (no silent break). Grade: MEASURED (relabel + divergence pinned). sensing-server 450→451 lib tests, 0 failed.

Co-Authored-By: claude-flow ruv@ruv.net

Co-Authored-By: claude-flow ruv@ruv.net

Implements the deferred "Multi-bit / Extended RaBitQ Pass 2" backlog item from ADR-156 §8: a deterministic randomized orthogonal rotation applied before sign-quantization, the published RaBitQ construction (Gao & Long, SIGMOD 2024).

Rotation construction: Fast Hadamard Transform + seeded ±1 sign flips ("HD" / randomized Hadamard), O(d log d) time and O(d) memory — a dense d×d rotation is O(d²) and infeasible at the 65,535-d the wire format provisions for. Pads to the next power of two; SplitMix64 seeds the sign stream so index-time and query-time rotations are bit-identical.

API is additive and backward-compatible: Pass 1 (from_embedding) is untouched; Pass 2 is opt-in via Sketch::from_embedding_rotated and SketchBank::with_rotation (+ insert_embedding / topk_embedding / novelty_embedding helpers that rotate consistently). Default behaviour is unchanged.

While building the Pass-2 coverage harness, found and fixed a PRE-EXISTING correctness bug in SketchBank::topk: the n>k heap path used BinaryHeap<Reverse<(d,id)>> (a min-heap) but treated its peek as the max, so it returned the k FARTHEST sketches as "nearest". The shipped unit tests only exercised the n≤k fast path, so it went unnoticed. Fixed to a plain max-heap; pinned by topk_heap_path_returns_nearest and tight_clusters_give_high_coverage_with_overfetch (the latter measured 0.072 on the old code).

New tests (+17, 100→117 in the crate): rotation determinism/norm-preservation (rotation_is_deterministic_for_seed, rotation_preserves_norm), Pass-2 shape-compatibility, pass2_coverage_not_worse_than_pass1, and a deterministic coverage report.

MEASURED top-K coverage (anisotropic planted-cluster fixture, cosine ground truth; dim=128 N=2048 K=8 64 clusters noise=0.35 128 queries): candidate_k=K=8 : Pass1 36.13% -> Pass2 46.39% (both << 90% bar) candidate_k=24 : Pass1 83.89% -> Pass2 91.60% (Pass2 clears 90%) candidate_k=32 : Pass1/Pass2 100% Honest result: rotation consistently helps (+10pp at strict K), but neither pass clears the ADR-084 90% bar at candidate_k==K on this distribution. Pass 2 reaches 90% only with ~3x over-fetch (the ADR-084 "candidate set" deployment pattern). Multi-bit Pass 3 evaluated separately.

Co-Authored-By: claude-flow ruv@ruv.net

Adds the multi-bit half of the ADR-156 §8 "Multi-bit / Extended RaBitQ" item as a MEASURED experiment (coverage::measure_multibit): rotate, then b-bit uniform scalar-quantize each coord, rank by L1 over codes — the natural multi-bit generalization of hamming. Measures the bit/coverage tradeoff the backlog item asked for.

MEASURED at the strict bar (candidate_k=K=8, anisotropic planted-cluster fixture, cosine ground truth): Pass1 (1-bit, no rot) 36.13% 16 B/vec Pass2 (1-bit, rot) 46.39% 16 B/vec Pass3 (rot, 2-bit) 54.39% 32 B/vec Pass3 (rot, 3-bit) 66.70% 48 B/vec Pass3 (rot, 4-bit) 74.22% 64 B/vec Honest: multi-bit monotonically helps but even 4-bit (4x memory) reaches only 74% at the strict bar — neither rotation nor <=4-bit multi-bit clears the strict-K 90% bar on this distribution. The bar is met via over-fetch (Pass2 @ candidate_k=24). Tests: multibit_tradeoff_report, multibit_1bit_matches_pass2_approx (+ sanity that 1-bit ~= Pass-2).

Docs:

Co-Authored-By: claude-flow ruv@ruv.net

Docker Image: ghcr.io/ruvnet/RuView:9b07dff29868336a1659c996e312fb9f5c9cc1d0

download

unix · zip
curl -fL -o v1728.zip https://ratatoskr.space/pkg/ruview/v1728.zip
                    printf '%s  %s\n' '38a7596a294955fd894c8c95423971c9095439a1fe0ce64760b3cfdb2103e744' 'v1728.zip' | sha256sum -c -
windows · zip
$url = "https://ratatoskr.space/pkg/ruview/v1728.zip"
$out = "v1728.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "38a7596a294955fd894c8c95423971c9095439a1fe0ce64760b3cfdb2103e744") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1728.tar.gz https://ratatoskr.space/pkg/ruview/v1728.tar.gz
                    printf '%s  %s\n' '759678c9fc46ad32f395567ac0911c4cede04018505d93b657abb5e39f454f1f' 'v1728.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "https://ratatoskr.space/pkg/ruview/v1728.tar.gz"
$out = "v1728.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "759678c9fc46ad32f395567ac0911c4cede04018505d93b657abb5e39f454f1f") { throw "sha256 mismatch" }
download via yggdrasil mesh
unix · zip
curl -fL -o v1728.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/ruview/v1728.zip
                    printf '%s  %s\n' '38a7596a294955fd894c8c95423971c9095439a1fe0ce64760b3cfdb2103e744' 'v1728.zip' | sha256sum -c -
windows · zip
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/ruview/v1728.zip"
$out = "v1728.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "38a7596a294955fd894c8c95423971c9095439a1fe0ce64760b3cfdb2103e744") { throw "sha256 mismatch" }
unix · tar.gz
curl -fL -o v1728.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/ruview/v1728.tar.gz
                    printf '%s  %s\n' '759678c9fc46ad32f395567ac0911c4cede04018505d93b657abb5e39f454f1f' 'v1728.tar.gz' | sha256sum -c -
windows · tar.gz
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/ruview/v1728.tar.gz"
$out = "v1728.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "759678c9fc46ad32f395567ac0911c4cede04018505d93b657abb5e39f454f1f") { throw "sha256 mismatch" }
artifact format size hashes
v1728.zip zip 61.6 MiB
blake3-24 2cc816a985b09212d4d97e1a886fe6316129e9adee9c623c
sha256 38a7596a294955fd894c8c95423971c9095439a1fe0ce64760b3cfdb2103e744
sha1 1575bf57a13cfc84b37cd96731ff6201170ae029
v1728.tar.gz tar.gz 59.8 MiB
blake3-24 7a6d7c977ff411881c1b08d35fc3ab487e557b77781dcb25
sha256 759678c9fc46ad32f395567ac0911c4cede04018505d93b657abb5e39f454f1f
sha1 6e6bd4da8efe24eea9c6abb085bff6b9e9f9dcb0

install

bazel
http_archive(
    name = "ruview",
    urls = ["https://ratatoskr.space/pkg/ruview/v1728.tar.gz"],
    integrity = "sha256-dZZ4yfxGrTLzlVZ6wJEcTO3gQBhQXZO2V6u1459FTx8=",
    strip_prefix = "ruview-v1728",
)
zig
.url = "https://ratatoskr.space/pkg/ruview/v1728.tar.gz",
install via yggdrasil mesh
bazel
http_archive(
    name = "ruview",
    urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/ruview/v1728.tar.gz"],
    integrity = "sha256-dZZ4yfxGrTLzlVZ6wJEcTO3gQBhQXZO2V6u1459FTx8=",
    strip_prefix = "ruview-v1728",
)
zig
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/ruview/v1728.tar.gz",
← v1731v1724 →