Skip to content
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

Documentation about autocast #17

Open
jxmorris12 opened this issue Jan 3, 2023 · 0 comments
Open

Documentation about autocast #17

jxmorris12 opened this issue Jan 3, 2023 · 0 comments

Comments

@jxmorris12
Copy link

jxmorris12 commented Jan 3, 2023

This isn't really an issue per se, but I found that if you wrap the entire call grad_cache.GradCache(...) in torch autocast, you will run into weird errors. This happens by default in the huggingface trainer, which wraps the call to self.compute_loss() in autocast context manager within training_step by default.

Maybe you can add a note about this gotcha in the readme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant