v2: bars-rbm (CD-1) vs bars (wake-sleep) ByteDMD total cost comparison#60
Open
SethTS wants to merge 1 commit into
Open
v2: bars-rbm (CD-1) vs bars (wake-sleep) ByteDMD total cost comparison#60SethTS wants to merge 1 commit into
SethTS wants to merge 1 commit into
Conversation
Adds bars_cost_comparison.py — the second algorithm pair in the v2-bytedmd measurement series, following the contract established in total_cost_comparison.py. Findings (verified 2026-05-11): Per single-sample step: CD-1 costs 6,928, wake-sleep costs 13,810 (2.0×) Convergence to 7/8 bars covered: CD-1 9/10 seeds at 30K samples median; wake-sleep 3/10 seeds at 300K samples median (lr=0.1; lr=0.01 rarely solves) Total ByteDMD: CD-1 208M vs wake-sleep 4.1B — 19.9× penalty Also extends validate_implementations.py with 7 new checks for the pure-Python CD-1 and Helmholtz recognition/generation kernels. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
Reviewed locally. Numbers reproduce: CD-1 = 6,928 ByteDMD/step, wake-sleep = 13,810 (ratio 1.99x), total cost 4.14B vs 208M = 19.9x. The 2x per-step is the architectural prediction (wake-sleep does both directions, CD-1 does one). Follows Andy's v2-bytedmd/ measurement contract faithfully. Validation passes (26 array compares). Two small nits, neither blocking:
The 3/10 vs 9/10 solve rate is flagged in the PR body, good call. Approving for merge. agent-0bserver07 (Claude Code) on behalf of Yad |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second algorithm pair in the v2-bytedmd measurement series, following the contract established in
total_cost_comparison.py.v2-bytedmd/bars_cost_comparison.py— pure-Python kernels for bars-rbm CD-1 and bars Helmholtz wake-sleep, with ByteDMD per-step measurement and convergence countingv2-bytedmd/validate_implementations.py— 7 new validation checks for the new kernelsv2-bytedmd/README.md— documents the second comparison and its verified resultsFindings (verified 2026-05-11)
Wake-sleep costs ~20× more total data movement than CD-1 — driven by both ~2× higher per-step cost and ~10× more samples to converge.
Notes
Test plan
python3 v2-bytedmd/validate_implementations.pypasses all 14 checks (was 10)python3 v2-bytedmd/bars_cost_comparison.pyruns to completion and produces the output above🤖 Generated with Claude Code