ArissBandoss commited on
Commit
7b6884e
·
verified ·
1 Parent(s): 386146f

Update goai_helpers/goai_traduction.py

Browse files
Files changed (1) hide show
  1. goai_helpers/goai_traduction.py +7 -3
goai_helpers/goai_traduction.py CHANGED
@@ -39,9 +39,13 @@ def goai_traduction(text, src_lang, tgt_lang):
39
 
40
  # Bloquer complètement le token EOS jusqu'à un certain point
41
  outputs = model.generate(
42
- **inputs,
43
- forced_bos_token_id=tgt_lang_id,
44
- max_new_tokens=1024
 
 
 
 
45
  )
46
 
47
  # Décodage
 
39
 
40
  # Bloquer complètement le token EOS jusqu'à un certain point
41
  outputs = model.generate(
42
+ **inputs,
43
+ forced_bos_token_id=tgt_lang_id,
44
+ max_new_tokens=1024,
45
+ early_stopping=False,
46
+ num_beams=5,
47
+ no_repeat_ngram_size=0,
48
+ length_penalty=1.0
49
  )
50
 
51
  # Décodage