perf(hrr): default dim 2048 -> 512 per lab R4 verdict (#538) - #539
Conversation
The lab campaign exp/hrr-vocabulary-bridge ran six rounds and converged on 'dim=512 default; dim=2048 escape hatch' (closing commit 74cd9d9). R4 specifically validated full-corpus pass latency at N=100k holding at dim=512 (p50=20.5ms); the prior default at dim=2048 carries ~4x memory cost without latency headroom at the same N. Plate's capacity bound at dim=512 admits ~57 retrievable bound pairs (dim/9), well above aelfrice's typical ~5 outgoing edges per belief. Tests pass at the new default (3090 passed, 53 skipped on full suite). vocab_bridge.py docstring is unchanged in this commit; that module is removed in the #536 cleanup PR.
Captures the perf-class change so the next release (likely v2.1 on rebase of PR #537, or v2.2 if not) carries it visibly.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR changes the default HRR dimensionality from 2048 to 512 to align with lab campaign R4 performance findings, updates the associated documentation/comments in the HRR implementation to reflect the new default and the 2048 escape-hatch path, and records the change in the Unreleased changelog section. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[claim:review:Curie:2026-05-10T04:19:36Z] |
|
[claim:review:Planck:2026-05-10T04:21:21Z] |
|
[release:review:Planck:2026-05-10T04:21:25Z] |
|
[release:review:Curie:2026-05-10T04:21:57Z] |
Summary
Closes #538.
Flips
aelfrice.hrr.DEFAULT_DIMfrom 2048 → 512 to match the lab campaign R4 verdict (closing commit74cd9d9):Two atomic commits:
perf(hrr):flip the constant, update the docstring rationale, fix the~1/sqrt(dim)and AC8-budget references inhrr_index.pyto cite the new default with the dim=2048 escape-hatch number alongside.docs(changelog):Unreleased entry.Why
HRRStructIndex(dim=...)kwarg.vocab_bridge.pyis also aDEFAULT_DIMconsumer but is being removed in the #536 cleanup PR — its docstring is left untouched here.Test plan
uv run pytest -q→ 3090 passed, 53 skipped on the branch tip.tests/test_hrr.py,tests/test_hrr_struct_index.py,tests/test_retrieve_v2_hrr_structural.py).Summary by Sourcery
Set HRR’s default vector dimensionality to 512 to reduce memory usage and align with lab performance findings.
Enhancements:
Documentation: