Skip to content

Commit

Permalink
Add missing elements to sft_trainer document (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
mutichung authored Nov 23, 2023
1 parent e7961e4 commit 3719f7a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/source/sft_trainer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ You can directly pass the kwargs of the `from_pretrained()` method to the [`SFTT

```python
model = AutoModelForCausalLM.from_pretrained("facebook/opt-350m", torch_dtype=torch.bfloat16)
```

```python
...
Expand All @@ -240,6 +241,9 @@ trainer = SFTTrainer(
"facebook/opt-350m",
train_dataset=dataset,
dataset_text_field="text",
model_init_kwargs={
"torch_dtype": torch.bfloat16,
},
)

trainer.train()
Expand Down

0 comments on commit 3719f7a

Please sign in to comment.