-
Notifications
You must be signed in to change notification settings - Fork 274
Auto-install fused lm_head + cross_entropy forward (opt-in) #657
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
Changes from all commits
680c9a3
920bea4
85a8192
db90fa1
eb4f63f
c33abf4
ab283b9
db4e5ea
ec66bc6
1d8bc08
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -382,6 +382,15 @@ def filter(self, x): return not (self.text in x.getMessage()) | |
| from .temporary_patches import ( | ||
| encode_conversations_with_harmony, | ||
| ) | ||
|
|
||
| # Fused lm_head + cross_entropy auto-installer. On by default; set | ||
| # UNSLOTH_FUSED_FORWARD=0 to disable. | ||
| try: | ||
| from .fused_losses.forward_install import install_modeling_import_hook as _install_fused_forward | ||
| _install_fused_forward() | ||
| del _install_fused_forward | ||
| except Exception: | ||
|
|
||
| pass | ||
|
Comment on lines
+388
to
+393
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The broad References
|
||
| from .rl_environments import ( | ||
| check_python_modules, | ||
| create_locked_down_function, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.