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
chenpangpang
transformers
Commits
a95ced62
Commit
a95ced62
authored
Sep 09, 2019
by
VictorSanh
Browse files
[Distillation] save last chkpt as `pytorch_model.bin`
parent
84d346b6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
examples/distillation/distiller.py
examples/distillation/distiller.py
+4
-1
No files found.
examples/distillation/distiller.py
View file @
a95ced62
...
@@ -295,7 +295,10 @@ class Distiller:
...
@@ -295,7 +295,10 @@ class Distiller:
if
self
.
is_master
:
logger
.
info
(
f
'--- Ending epoch
{
self
.
epoch
}
/
{
self
.
params
.
n_epoch
-
1
}
'
)
if
self
.
is_master
:
logger
.
info
(
f
'--- Ending epoch
{
self
.
epoch
}
/
{
self
.
params
.
n_epoch
-
1
}
'
)
self
.
end_epoch
()
self
.
end_epoch
()
if
self
.
is_master
:
logger
.
info
(
'Training is finished'
)
if
self
.
is_master
:
logger
.
info
(
f
'Save very last checkpoint as `pytorch_model.bin`.'
)
self
.
save_checkpoint
(
checkpoint_name
=
f
'pytorch_model.bin'
)
logger
.
info
(
'Training is finished'
)
def
step
(
self
,
def
step
(
self
,
input_ids
:
torch
.
tensor
,
input_ids
:
torch
.
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