-
Notifications
You must be signed in to change notification settings - Fork 637
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
Refactor of models and trainers with base class for common methods #306
Open
PierpaoloSorbellini
wants to merge
42
commits into
main
Choose a base branch
from
refactor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
2b8e301
Refactor models and trainers with base_class for common methods
PierpaoloSorbellini 5e0ded8
Revert "Release ChatLLaMA 0.0.4"
PierpaoloSorbellini 3fa5c53
Merge branch 'main' of https://github.com/nebuly-ai/nebullvm into main
PierpaoloSorbellini ab1f09e
Refactor of models and trainers with base class for common methods
PierpaoloSorbellini 3d54d50
Fix comments and values in the config.yaml
PierpaoloSorbellini 9f5eab4
Add load 8 bit from HF
PierpaoloSorbellini dc46ee4
Add check on load int 8
PierpaoloSorbellini c1d03d3
Add Reward and Critic support for LoRA PEFT
PierpaoloSorbellini 36c350d
Add SelfInstruct Dataset from HF
PierpaoloSorbellini bb92ee7
Fix imports
6fc94d3
Add logging with proper class
dc2489f
Fix logs for deepspeed
0b0795d
Fix early logs with multi-GPUs
01be6dc
Fix MultiGPU for accelerate
13b1abd
Fix batch-size for accelerate
db8b3c2
Add multi gpu training to readme.md
d771fb2
Fix fp16 training
e5f959c
Merge branch 'main' into refactor
PierpaoloSorbellini d5084e5
Fix Distributed training for RLHF
PierpaoloSorbellini 2ec5eaa
Add new models
PierpaoloSorbellini 33e97e2
Add decapoda models
PierpaoloSorbellini 8332a26
Add unsupported model message
PierpaoloSorbellini 32ddfa2
Change sing to KL div accordingly to issue #298
PierpaoloSorbellini aa9881c
Fix imports order
PierpaoloSorbellini b10f1dc
Add cases for lora-peft model loading
PierpaoloSorbellini 86a699b
Merge branch 'refactor' of https://github.com/nebuly-ai/nebullvm into…
PierpaoloSorbellini 1f29ba4
Fix Actor 8bit training
PierpaoloSorbellini 1836788
Adjust code comments to match new adjustments
PierpaoloSorbellini 966a19d
Fix device error when using vanilla pytorch trainig
PierpaoloSorbellini feacb88
Fix RLHF with fp16
PierpaoloSorbellini f894494
Move grad scaler into base class
PierpaoloSorbellini b56185f
Add check on 8bit load and distributed training
PierpaoloSorbellini 5699aaa
Add template to self-instruct dataset
PierpaoloSorbellini 5c83927
Fix checkpoints name in actor training
PierpaoloSorbellini a205ee6
Fix slow loss computation
PierpaoloSorbellini bb386c4
Fix checkpoints also in reward models
PierpaoloSorbellini 22a64af
Fix checkpoint for rl
PierpaoloSorbellini 10211c6
Add n_checkpoints for all the training with old checkpoints removal
PierpaoloSorbellini 442b396
Improve datasets quality with reward model negative examples
PierpaoloSorbellini 71a6c02
Merge branch 'main' of https://github.com/nebuly-ai/nebullvm into main
PierpaoloSorbellini 1189787
Merge branch 'main' into refactor
PierpaoloSorbellini 98b96c2
Fix merge issues
PierpaoloSorbellini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix fp16 training
- Loading branch information
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
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.
do we need to auto-cast to fp16 all the tensors? Shouldn't this be a config param?
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.
just following documentation...
https://pytorch.org/docs/stable/notes/amp_examples.html
wrt to casting manually the tensors, this is better with less problem with types in the embedding.
It is not a config param because if you do not use fp16 you would use fp32 and is probably worse.
not seen the point of adding the option for fp32.
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.
But what if I want to train the model in fp32 precision? (DeepSpeed for instance allows the user to select the precision)