omnia-model bench example panics (assertion failed: index < dim) #28

Closed
opened 2026-10-07 08:55:08 +08:00 by Breadway · 3 comments
Owner

How it was found: while estimating tiny-model training time on hermes, I ran the documented command cargo run --release -p omnia-model --example bench -- nano 32 (and -- tiny 32) on branch docs/model-architecture at 21a130a.

What happens: both sizes panic immediately in burn-ndarray 0.21.0 (src/ops/base.rs:927:28, assertion failed: index < dim). No throughput number is printed.

Confidence: the failure is certain (reproduced for nano and tiny). The cause is not diagnosed. My guess, about 60% confidence, is that the example builds its samples or batch options in a way that went stale after the recent observation changes (6-player support, OMNI-26, or the hygiene pass, OMNI-24), so a gather index exceeds a dimension. I did not read the example or capture a backtrace.

Why it matters: the bench example is the only isolated throughput check. docs/RESULTS.md section 4 throughput figures cannot be reproduced with it, and I fell back to timing omnia diagnose instead.

Suggested fix: run with RUST_BACKTRACE=1, find the gather or index op, and make the example build its batch the same way omnia-training does. Consider a CI smoke run of the example so it cannot rot again.

**How it was found:** while estimating tiny-model training time on hermes, I ran the documented command `cargo run --release -p omnia-model --example bench -- nano 32` (and `-- tiny 32`) on branch docs/model-architecture at 21a130a. **What happens:** both sizes panic immediately in burn-ndarray 0.21.0 (`src/ops/base.rs:927:28`, `assertion failed: index < dim`). No throughput number is printed. **Confidence:** the failure is certain (reproduced for nano and tiny). The cause is not diagnosed. My guess, about 60% confidence, is that the example builds its samples or batch options in a way that went stale after the recent observation changes (6-player support, OMNI-26, or the hygiene pass, OMNI-24), so a gather index exceeds a dimension. I did not read the example or capture a backtrace. **Why it matters:** the bench example is the only isolated throughput check. docs/RESULTS.md section 4 throughput figures cannot be reproduced with it, and I fell back to timing `omnia diagnose` instead. **Suggested fix:** run with RUST_BACKTRACE=1, find the gather or index op, and make the example build its batch the same way `omnia-training` does. Consider a CI smoke run of the example so it cannot rot again.
Author
Owner

Fix ready: #30 (branch fix/omni-28-bench-index, 645e14a). Root cause was a hardcoded rel vocab of 40 in the example's diagnostic embedding lookups; rel ids now reach 41, so any batch with registers panicked. Both nano 32 (227 samples/s) and tiny 32 (82 samples/s) print throughput; full release test suite passes.

Fix ready: https://git.breadway.dev/Breadway/omniastra/pulls/30 (branch fix/omni-28-bench-index, 645e14a). Root cause was a hardcoded rel vocab of 40 in the example's diagnostic embedding lookups; rel ids now reach 41, so any batch with registers panicked. Both nano 32 (227 samples/s) and tiny 32 (82 samples/s) print throughput; full release test suite passes.
Author
Owner

Independent review PASS on PR #30 head 645e14a (base 1913272), merged to main as 0710de2. Root cause confirmed by measurement: real nano batch carries max rel_ss=41, rel_as=40 (rel::VOCAB=42) while the example built dim-40 tables, hence the index < dim panic. Fix uses rel::VOCAB in all three diagnostic lookups plus trainer-canonical BatchOpts. Verified: bench nano 32 (87/94/78/84 samples/s) and tiny 32 (31/34/34/34) print throughput with no panic; bench_path_smoke passes; cargo test --workspace --release all green (training 10/10, OMNI-29 seeded test passed first run); clippy clean for omnia-model with only 4 pre-existing omnia-dsl lints workspace-wide; fmt drift pre-existing repo-wide, new test file clean. Review detail on PR: #30 (comment). Card left for coordinator verification, not moved to done.

Independent review PASS on PR #30 head 645e14a (base 1913272), merged to main as 0710de2. Root cause confirmed by measurement: real nano batch carries max rel_ss=41, rel_as=40 (rel::VOCAB=42) while the example built dim-40 tables, hence the index < dim panic. Fix uses rel::VOCAB in all three diagnostic lookups plus trainer-canonical BatchOpts. Verified: bench nano 32 (87/94/78/84 samples/s) and tiny 32 (31/34/34/34) print throughput with no panic; bench_path_smoke passes; cargo test --workspace --release all green (training 10/10, OMNI-29 seeded test passed first run); clippy clean for omnia-model with only 4 pre-existing omnia-dsl lints workspace-wide; fmt drift pre-existing repo-wide, new test file clean. Review detail on PR: https://git.breadway.dev/Breadway/omniastra/pulls/30#issuecomment-4654. Card left for coordinator verification, not moved to done.
Author
Owner

Verified on integrated main 0710de2 (merge of PR30, parents 1913272+645e14a, base unchanged so tree equals reviewed head): reviewer ran nano/tiny bench runs plus full release workspace suite at the head; no CI workflows in repo.

Verified on integrated main 0710de2 (merge of PR30, parents 1913272+645e14a, base unchanged so tree equals reviewed head): reviewer ran nano/tiny bench runs plus full release workspace suite at the head; no CI workflows in repo.
Sign in to join this conversation.
No labels
bug
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/omniastra#28
No description provided.