mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 11:11:05 +06:00
Update convert_marian_to_pytorch.py (#16124)
Configuration `tied-embeddings-all` implies `tied-embeddings-src`
This commit is contained in:
parent
2de99e6c43
commit
9e9f6b8a45
@ -480,6 +480,8 @@ class OpusState:
|
||||
if "Wpos" in self.state_dict:
|
||||
raise ValueError("Wpos key in state dictionary")
|
||||
self.state_dict = dict(self.state_dict)
|
||||
if cfg["tied-embeddings-all"]:
|
||||
cfg["tied-embeddings-src"] = True
|
||||
self.share_encoder_decoder_embeddings = cfg["tied-embeddings-src"]
|
||||
|
||||
# create the tokenizer here because we need to know the eos_token_id
|
||||
|
Loading…
Reference in New Issue
Block a user