Skip to content

Commit 53023c5

Browse files
committed
Fix nmt weight conversion
1 parent 5d8ca2f commit 53023c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/enc_dec/convert_checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def parse_nmt_config(args, model):
331331
config["decoder"]["q_scaling"] = '1'
332332
config["decoder"]["rescale_before_lm_head"] = 'false'
333333
config['decoder']['has_model_final_layernorm'] = 'false'
334-
config['decoder']['vocab_size'] = str(len(model.src_dict)) # fairseq naming
334+
config['decoder']['vocab_size'] = str(len(model.tgt_dict)) # fairseq naming
335335

336336
config["structure"] = dict()
337337
config["structure"]["t5_with_bias"] = "true"

0 commit comments

Comments
 (0)