Skip to content

Commit dee8546

Browse files
authored
Increase OpusTrainer batch size (#1243)
1 parent a7b8f0e commit dee8546

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pipeline/train/train.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828

2929
CJK_LANGS = ["zh", "ja", "ko"]
30+
OPUS_TRAINER_CHUNK_SIZE = 128
3031

3132

3233
class ModelType(Enum):
@@ -390,6 +391,8 @@ def get_opustrainer_cmd(self):
390391
"config": self.opustrainer_config,
391392
"log-file": self.artifacts / "opustrainer.log",
392393
"log-level": "INFO",
394+
"batch-size": str(OPUS_TRAINER_CHUNK_SIZE * os.cpu_count()),
395+
"chunk-size": str(OPUS_TRAINER_CHUNK_SIZE),
393396
}
394397
),
395398
]

0 commit comments

Comments
 (0)