Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ColossalAI
Commits
ddf879e2
Unverified
Commit
ddf879e2
authored
Jan 22, 2024
by
Desperado-Jia
Committed by
GitHub
Jan 22, 2024
Browse files
fix bug for mefture (#5299)
parent
f7e3f82a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
applications/Colossal-LLaMA-2/colossal_llama2/utils/neftune_patch.py
...s/Colossal-LLaMA-2/colossal_llama2/utils/neftune_patch.py
+4
-1
No files found.
applications/Colossal-LLaMA-2/colossal_llama2/utils/neftune_patch.py
View file @
ddf879e2
...
@@ -16,7 +16,10 @@ import torch
...
@@ -16,7 +16,10 @@ import torch
def
unwrap
(
model
):
def
unwrap
(
model
):
return
model
.
unwrap
().
module
if
hasattr
(
model
,
"module"
):
return
unwrap_model
(
model
.
module
)
else
:
return
model
def
neftune_post_forward_hook
(
module
,
input
,
output
):
def
neftune_post_forward_hook
(
module
,
input
,
output
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment