-
Notifications
You must be signed in to change notification settings - Fork 2.3k
docs: Expand training customization examples #4427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
docs: Expand training customization examples #4427
Conversation
Resolves huggingface#4379 - Add custom callbacks example for logging and monitoring - Add custom evaluation metrics example - Add mixed precision training example (bf16/fp16) - Add gradient accumulation example - Add custom data collator example - Update introduction for better clarity
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
- Clarify that bf16 is the default in mixed precision section - Move gradient accumulation section to reducing memory guide - Expand gradient accumulation examples to include DPO, SFT, and Reward trainers Addresses review comments from @qgallouedec on PR #4427
|
I've addressed both review comments:
Ready for re-review! |
sergiopaniego
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!!
I'd aim on reducing the code snippets content, only including the relevant part. Otherwise it's complicated to understand what's been added. A good example of this is the subsection Use the accelerator cache optimizer, where it directly points to the added param.
Btw the optimize_device_cache is no longer part of the codebase so that subsection can actually be removed :)
Summary
This PR addresses issue #4379 by expanding the Training Customization documentation section with 5 new comprehensive examples, rather than removing it.
Resolves #4379
Changes Made
New Examples Added (5):
Documentation Improvements:
Statistics
Verification
✅ All imports verified against codebase
✅ All config options verified in DPOConfig
✅ DataCollatorForPreference import path corrected
✅ Consistent code style with existing examples
✅ Examples apply to most/all trainers as stated
Test Plan