Expand description
Training loop with progress monitoring, learning rate decay, and optional checkpointing.
§Training Flow
corpus ──► Vocabulary::build ──► Model::new
│
┌────────────────────────┘
▼
for each epoch:
shuffle sentences
for each sentence:
subsample tokens
for each (center, context) pair:
sample negatives
Model::update (SGD step)
update LR (linear decay)
record epoch loss
│
▼
Embeddings ──► .most_similar() / .analogy() / .save()Structs§
- Epoch
Stats - Recorded statistics for one epoch.
- Trainer
- Manages the full training pipeline.