Iker commited on
Commit
2cb7997
2 Parent(s): 08aa873 6cc3f7d

Merge branch 'main' into main

Browse files
Files changed (2) hide show
  1. README.md +3 -0
  2. translate.py +3 -1
README.md CHANGED
@@ -139,3 +139,6 @@ accelerate launch eval.py \
139
  ```
140
 
141
  If you want to save the results to a file use the `--output_path` flag.
 
 
 
 
139
  ```
140
 
141
  If you want to save the results to a file use the `--output_path` flag.
142
+
143
+ See [sample_text/en2es.m2m100_1.2B.json](sample_text/en2es.m2m100_1.2B.json) for a sample output.
144
+
translate.py CHANGED
@@ -64,7 +64,9 @@ def main(
64
  if not os.path.exists(os.path.dirname(output_path)):
65
  os.makedirs(os.path.dirname(output_path))
66
 
67
- accelerator = Accelerator(mixed_precision=precision if precision != "32" else "no")
 
 
68
 
69
  print("Loading tokenizer...")
70
  tokenizer = M2M100Tokenizer.from_pretrained(
 
64
  if not os.path.exists(os.path.dirname(output_path)):
65
  os.makedirs(os.path.dirname(output_path))
66
 
67
+ accelerator = Accelerator(
68
+ mixed_precision=precision if precision != "32" else "no", split_batches=True
69
+ )
70
 
71
  print("Loading tokenizer...")
72
  tokenizer = M2M100Tokenizer.from_pretrained(