Open
Conversation
Collaborator
|
Collaborator
|
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.
InfiniTrain FlashAttention 实验报告
1. 功能正确性验证
1.1 训练日志
logs_baseline_smoke/gpt2_smoke.log、logs_flash_smoke/gpt2_smoke.loglogs_baseline_smoke/llama3_smoke.log、logs_flash_smoke/llama3_smoke.log1.2 对比方案
--flash,走 CUDA fused kernel)1.3 精度对齐验证
scripts/compare_loss.py对比两组日志 loss 曲线,允许浮点误差。2. 性能评估报告
2.1 实验环境说明
2.2 实验配置
scripts/test_config_baseline_smoke.json、scripts/test_config_flash_smoke_compare_fixed.json2.3 性能指标
ms字段tok/s字段peak used、peak reserved字段2.4 结果展示
scripts/summarize_perf.py自动生成表格:表格示例:
Speedup = baseline avg ms / flash avg ms
显存节省比例 = (baseline - flash) / baseline
3. 代码提交与可复现性
3.1 PR 提交
3.2 完整运行脚本
scripts/run_models_and_profile.bashscripts/test_config_baseline_smoke.jsonscripts/test_config_flash_smoke_compare_fixed.json3.3 复现流程
如需更大规模/更长训练实验,可调整配置文件中的 batch_size、num_iteration 等参数。
如需 PyTorch FlashAttention 对比,可参考 PyTorch 官方实现和日志格式,或补充相关脚本。
如有 reviewer 复现问题,可参考本报告的命令和脚本说明。