完成 TinyInfiniTrain 全部作业与 A100 完整训练实验 - #11
Open
pikaxinge wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
完成 TinyInfiniTrain 全部六项作业,并在不修改公开测试文件的前提下通过全部 8 个测试:
在基础作业之外,本提交增加了可中断续跑的 GPT-2 完整训练 runner、Adam checkpoint、early stopping、逐 step/epoch 指标、学习率对照实验和静态曲线生成脚本。
作业报告
报告逐题记录了对应测例、调用链、公式、边界检查、实现中解决的问题和验证结论,并将公开
test_gpt2的短程轨迹验证与完整数据集训练实验明确分开。测试结果
验证环境:GCC 13.4、CUDA 12.6、NVIDIA A100-SXM4-40GB。
test_gpt21e-3测试中的固定 seed 生成文本以
The meaning of life is开头。相对官方基线,test/和.github/均无改动。完整训练实验
模型从 GPT-2 124M 预训练权重开始,在完整 Tiny Shakespeare train/validation split 上使用 FP32 Adam 微调。训练覆盖 305,216 target tokens/epoch,验证覆盖 32,704 target tokens/次;所有分段运行均通过 checkpoint 连续恢复,逐 step 的 global step 无缺失、无重复。
基线
lr=1e-4实验:训练 loss 持续下降而 validation loss 后期上升,表明数据集上出现过拟合,因此最终使用
best.ckpt,不把 early-stop 时的final.ckpt当作最佳模型。同 seed、同数据顺序且只改变学习率的对照结果:
1e-45e-52e-5因此默认学习率更新为
2e-5,并保留patience=3、min_delta=0.005的 early stopping。该对照为单 seed 配置选择实验,不声称跨 seed 统计显著性。实验产物与复现
cuda_async_pool_peak_bytes只表示 CUDA async default memory pool 的 high-water mark,不等价于整卡峰值显存。大型 checkpoint 未纳入 Git;仓库保留 CSV、JSON、曲线和固定 prompt 文本用于复核实验结论。