Stage 18R Tier D: commit the dense lane so arm D can be re-derived

↗ view on GitHub · Eli Ziff · 2026-07-31 · 3fb6fd34

The original arm D ran from scratchpad files (fastembed CPU, then
Qwen3-Embedding-4B on the 3080 Ti) with the work dir and header sidecar
hardcoded, over the raw (CRLF) 5,984-chunk index. That index no longer
exists, so the arm cannot be re-scored -- only re-derived. An arm that
cannot be re-derived from the repo cannot be re-traced.

legalbench_dense_pools.py ports the GPU lane verbatim in its arm
definitions (lex/ctx/dense/densectx/fused/fusedlex), pooling (top-k with
per-doc cap) and RRF rule (1/(60+rank+1)), with paths parameterized. It
builds pools only and never scores: scoring stays in the committed
instrument so the conventions live in one place. The ctx embedding cache
is keyed by the header sidecar's own hash, so a regenerated sidecar can
never be served a matrix embedded over the previous one.

legalbench_pool_rescore.py gains --coords lf (a sidecar built on the
normalized db is already in gold coordinates; mapping it again would
shift every maud offset a second time) and --arm for multi-arm sidecars.
Verified unchanged on the recorded fused sidecar: maud 0.8625, ALL
0.9584.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9ToHYJVDxfeJcJwdzrP2H
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents b1c1f048
Stats 2 files changed , +315 , -3
Part of Legal grounding and retrieval research

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-3fb6fd34.md from inside the repo you want the change in.

⬇ Download capture-commit-3fb6fd34.md