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
da885ed5
Unverified
Commit
da885ed5
authored
Mar 11, 2024
by
Camille Zhong
Committed by
GitHub
Mar 11, 2024
Browse files
fix tensor data update for gemini loss caluculation (#5442)
parent
8020f426
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
applications/Colossal-LLaMA-2/train.py
applications/Colossal-LLaMA-2/train.py
+1
-0
No files found.
applications/Colossal-LLaMA-2/train.py
View file @
da885ed5
...
@@ -56,6 +56,7 @@ def format_numel_str(numel: int) -> str:
...
@@ -56,6 +56,7 @@ def format_numel_str(numel: int) -> str:
def
all_reduce_mean
(
tensor
:
torch
.
Tensor
)
->
torch
.
Tensor
:
def
all_reduce_mean
(
tensor
:
torch
.
Tensor
)
->
torch
.
Tensor
:
dist
.
all_reduce
(
tensor
=
tensor
,
op
=
dist
.
ReduceOp
.
SUM
)
dist
.
all_reduce
(
tensor
=
tensor
,
op
=
dist
.
ReduceOp
.
SUM
)
tensor
=
tensor
.
data
tensor
.
div_
(
dist
.
get_world_size
())
tensor
.
div_
(
dist
.
get_world_size
())
return
tensor
return
tensor
...
...
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