Skip to content

Commit ad1d4e6

Browse files
committed
disable tokenizers parallelism
1 parent 8015851 commit ad1d4e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

train.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ def train_model(config: ModelConfig):
302302

303303
if __name__ == '__main__':
304304
warnings.filterwarnings("ignore")
305+
306+
# Disable tokenizers parallelism (this is to avoid deadlocks when creating the tokenizers on multiple GPUs)
307+
os.environ["TOKENIZERS_PARALLELISM"] = "false"
308+
305309
config = get_default_config()
306310

307311
# Read command line arguments and overwrite config accordingly

0 commit comments

Comments
 (0)