//! Training stack (Phase T6): LR schedule, global-norm grad clipping, checkpoint //! save/load, the GPT-2 BPE data pipeline (reusing xserv's tokenizer), an //! autoregressive sampler, and the training loop that wires them onto the T5 //! `TinyTransformer` + the hand-written AdamW (`xtrain-optim`). //! //! Host-only pieces (LR schedule, grad-norm math) always compile so the crate //! `cargo check`s on a GPU-less host; everything that touches GPU tensors is //! gated behind `not(no_cuda)`. pub mod clip; pub mod data; pub mod schedule; #[cfg(not(no_cuda))] pub mod checkpoint; #[cfg(not(no_cuda))] pub mod sample; #[cfg(not(no_cuda))] mod train_loop; #[cfg(not(no_cuda))] pub use train_loop::{TrainConfig, TrainResult, eval_loss, train};