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
65f56f49
"vscode:/vscode.git/clone" did not exist on "6a3f9fda83ed383f43e3bb0c36158309ff3faa3d"
Unverified
Commit
65f56f49
authored
Dec 22, 2022
by
Jiarui Fang
Committed by
GitHub
Dec 22, 2022
Browse files
[example] gpt demo more accuracy tflops (#2178)
parent
ab54fed2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
examples/language/gpt/train_gpt_demo.py
examples/language/gpt/train_gpt_demo.py
+1
-0
No files found.
examples/language/gpt/train_gpt_demo.py
View file @
65f56f49
...
...
@@ -283,6 +283,7 @@ def main():
optimizer
.
sync_grad
()
optimizer
.
step
()
logger
.
info
(
get_mem_info
(
prefix
=
f
'[
{
n
+
1
}
/
{
NUM_STEPS
}
] Optimizer step '
),
ranks
=
[
0
])
torch
.
cuda
.
synchronize
()
step_time
=
time
()
-
start
logger
.
info
(
f
'[
{
n
+
1
}
/
{
NUM_STEPS
}
] Loss:
{
loss
.
item
():.
3
f
}
, Step time:
{
step_time
:.
3
f
}
s, TFLOPS:
{
get_tflops_func
(
step_time
):.
3
f
}
'
,
...
...
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