Skip to content

Commit

Permalink
Add tokenizer to MLM Trainer (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewtun authored Dec 28, 2022
1 parent af0c221 commit 1d4e07f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions chapters/en/chapter7/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ trainer = Trainer(
train_dataset=downsampled_dataset["train"],
eval_dataset=downsampled_dataset["test"],
data_collator=data_collator,
tokenizer=tokenizer,
)
```

Expand Down
1 change: 1 addition & 0 deletions chapters/fr/chapter7/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ trainer = Trainer(
train_dataset=downsampled_dataset["train"],
eval_dataset=downsampled_dataset["test"],
data_collator=data_collator,
tokenizer=tokenizer,
)
```

Expand Down
1 change: 1 addition & 0 deletions chapters/ja/chapter7/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ trainer = Trainer(
train_dataset=downsampled_dataset["train"],
eval_dataset=downsampled_dataset["test"],
data_collator=data_collator,
tokenizer=tokenizer,
)
```

Expand Down
1 change: 1 addition & 0 deletions chapters/vi/chapter7/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@ trainer = Trainer(
train_dataset=downsampled_dataset["train"],
eval_dataset=downsampled_dataset["test"],
data_collator=data_collator,
tokenizer=tokenizer,
)
```

Expand Down
1 change: 1 addition & 0 deletions chapters/zh-CN/chapter7/3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ trainer = Trainer(
train_dataset=downsampled_dataset["train"],
eval_dataset=downsampled_dataset["test"],
data_collator=data_collator,
tokenizer=tokenizer,
)
```

Expand Down
2 changes: 1 addition & 1 deletion utils/generate_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def build_notebook(fname, title, output_dir="."):
installs = ["!pip install datasets evaluate transformers[sentencepiece]"]
if section_name in sections_with_accelerate:
installs.append("!pip install accelerate")
installs.append("# To run the training on TPU, you will need to uncomment the followin line:")
installs.append("# To run the training on TPU, you will need to uncomment the following line:")
installs.append(
"# !pip install cloud-tpu-client==0.10 torch==1.9.0 https://storage.googleapis.com/tpu-pytorch/wheels/torch_xla-1.9-cp37-cp37m-linux_x86_64.whl"
)
Expand Down

0 comments on commit 1d4e07f

Please sign in to comment.