Refactor of models and trainers with base class for common methods - #306
Refactor of models and trainers with base class for common methods#306PierpaoloSorbellini wants to merge 42 commits into
Conversation
This reverts commit 156fa19.
| # pytorch mixed precison | ||
| with torch.autocast( | ||
| device_type=self.config.device_type, | ||
| dtype=torch.float16, |
There was a problem hiding this comment.
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.
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.
But what if I want to train the model in fp32 precision? (DeepSpeed for instance allows the user to select the precision)
|
@PierpaoloSorbellini please add a description of what this PR is adding in terms of features and which bugs it is fixing. |
Uh oh!
There was an error while loading. Please reload this page.