Skip to content

Commit e230bf1

Browse files
committed
feat(example): add interactive TUI training demo
Add demo_tui example with real-time visualization of the AttnRes training process: loss curve (braille chart), depth attention weight heatmap with actual alpha computation, pseudo-query norm growth bars, and cycling algorithm step explainer. Uses ratatui + crossterm. Adds layers() and embed_tokens() accessors to AttnResTransformer for diagnostic extraction of attention weights during training. Remove obsolete implementation_plan.md.
1 parent 64601d3 commit e230bf1

5 files changed

Lines changed: 846 additions & 209 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ serde_json = "1"
2020
[dev-dependencies]
2121
proptest = "1"
2222
criterion = { version = "0.5", features = ["html_reports"] }
23+
ratatui = "0.29"
24+
crossterm = "0.28"
2325

2426
[[bench]]
2527
name = "attn_res_benchmark"
@@ -36,3 +38,7 @@ path = "examples/compare_residuals.rs"
3638
[[example]]
3739
name = "visualize_weights"
3840
path = "examples/visualize_weights.rs"
41+
42+
[[example]]
43+
name = "demo_tui"
44+
path = "examples/demo_tui.rs"

0 commit comments

Comments
 (0)