main.
The small function worth reading first
GRPOAlgorithm.score_group collects clean trainable traces, builds their shaped rewards and sampled-token lengths, calls the default or imported advantage function, checks its output and assigns token credit. The trainer remains responsible for the actual loss and optimizer update.
finish_run is another useful boundary. It requires a final checkpoint, produces a portable export, uploads it and calls verify_files. It records the verified commit before cleanup_models is allowed to remove owned model directories.
Neither boundary silently turns an integration pass into an evaluation claim.
Continue with the evidence index.