Iker commited on
Commit
6cc3f7d
1 Parent(s): 2268075

Fix error on multi-gpu eval

Browse files
Files changed (2) hide show
  1. README.md +1 -1
  2. translate.py +3 -1
README.md CHANGED
@@ -123,4 +123,4 @@ accelerate launch eval.py \
123
 
124
  If you want to save the results to a file use the `--output_path` flag.
125
 
126
-
 
123
 
124
  If you want to save the results to a file use the `--output_path` flag.
125
 
126
+ See [sample_text/en2es.m2m100_1.2B.json](sample_text/en2es.m2m100_1.2B.json) for a sample output.
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(