ArissBandoss commited on
Commit
090b150
·
verified ·
1 Parent(s): 49dc84f

Update goai_helpers/goai_traduction.py

Browse files
Files changed (1) hide show
  1. goai_helpers/goai_traduction.py +2 -0
goai_helpers/goai_traduction.py CHANGED
@@ -24,6 +24,8 @@ def goai_traduction(text, src_lang, tgt_lang):
24
 
25
  tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token, truncation=True, max_length=512)
26
  model = AutoModelForSeq2SeqLM.from_pretrained(model_id, token=auth_token).to(device)
 
 
27
 
28
  tgt_lang_id = tokenizer.convert_tokens_to_ids(tgt_lang)
29
 
 
24
 
25
  tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token, truncation=True, max_length=512)
26
  model = AutoModelForSeq2SeqLM.from_pretrained(model_id, token=auth_token).to(device)
27
+ print(model.lm_head.weight.shape) # doit être [vocab_size, hidden_size]
28
+ print(model.model.shared.weight.shape) # idem
29
 
30
  tgt_lang_id = tokenizer.convert_tokens_to_ids(tgt_lang)
31