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
ae1cb4ec
".circleci/vscode:/vscode.git/clone" did not exist on "5f616a2b962cac01b6fcb68096d752a2d8d4050e"
Unverified
Commit
ae1cb4ec
authored
Nov 10, 2020
by
Shichao Sun
Committed by
GitHub
Nov 10, 2020
Browse files
[s2s/distill] hparams.tokenizer_name = hparams.teacher (#8382)
parent
aec51e56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
0 deletions
+1
-0
examples/seq2seq/distillation.py
examples/seq2seq/distillation.py
+1
-0
No files found.
examples/seq2seq/distillation.py
View file @
ae1cb4ec
...
@@ -45,6 +45,7 @@ class BartSummarizationDistiller(SummarizationModule):
...
@@ -45,6 +45,7 @@ class BartSummarizationDistiller(SummarizationModule):
)
)
if
hparams
.
length_penalty
!=
-
1
:
if
hparams
.
length_penalty
!=
-
1
:
student
.
config
.
length_penalty
=
hparams
.
length_penalty
student
.
config
.
length_penalty
=
hparams
.
length_penalty
hparams
.
tokenizer_name
=
hparams
.
teacher
# Use teacher's tokenizer
super
().
__init__
(
hparams
,
model
=
student
,
config
=
student
.
config
)
super
().
__init__
(
hparams
,
model
=
student
,
config
=
student
.
config
)
model_type
=
student
.
config
.
model_type
model_type
=
student
.
config
.
model_type
self
.
e_layer_ids
,
self
.
d_layer_ids
=
e_layer_ids
,
d_layer_ids
# type: List[int], List[int]
self
.
e_layer_ids
,
self
.
d_layer_ids
=
e_layer_ids
,
d_layer_ids
# type: List[int], List[int]
...
...
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