train: --eval-ckpt eval-only mode (v0-vs-v1 same-set val loss)

Expose eval_loss() and add a --eval-ckpt <path> branch to bin/train: load an
existing checkpoint into a model of the given arch and score it on the held-out
val split, then exit. Lets v0 and v1 be measured on the identical validation set
(the acceptance metric) without a separate eval binary.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 18:44:40 +08:00
parent e44e50ef78
commit ec8114ecbc
3 changed files with 17 additions and 3 deletions

View File

@@ -19,4 +19,4 @@ pub mod sample;
mod train_loop;
#[cfg(not(no_cuda))]
pub use train_loop::{TrainConfig, TrainResult, train};
pub use train_loop::{TrainConfig, TrainResult, eval_loss, train};