Skip to content

Commit

Permalink
Fixed typo in SFT trainer docs (#1788)
Browse files Browse the repository at this point in the history
'STFConfig' instead of 'SFTConfig' appears multiple times in the doc, causing error when running the code snippets.
  • Loading branch information
detsutut authored Jun 29, 2024
1 parent a57544f commit cd85b14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/source/sft_trainer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ dataset = load_dataset("philschmid/dolly-15k-oai-style", split="train")

...

sft_config = STFConfig(packing=True)
sft_config = SFTConfig(packing=True)
trainer = SFTTrainer(
"facebook/opt-350m",
args=sft_config,
Expand Down Expand Up @@ -290,7 +290,7 @@ def formatting_func(example):
text = f"### Question: {example['question']}\n ### Answer: {example['answer']}"
return text

sft_config = STFConfig(packing=True)
sft_config = SFTConfig(packing=True)
trainer = SFTTrainer(
"facebook/opt-350m",
train_dataset=dataset,
Expand Down Expand Up @@ -382,7 +382,7 @@ model = AutoModelForCausalLM.from_pretrained(
trainer = SFTTrainer(
model,
train_dataset=dataset,
args=STFConfig(),
args=SFTConfig(),
peft_config=peft_config,
)

Expand Down Expand Up @@ -502,11 +502,11 @@ To use it in `SFTTrainer` simply pass `neftune_noise_alpha` when creating your `

```python
from datasets import load_dataset
from trl import STFConfig, SFTTrainer
from trl import SFTConfig, SFTTrainer

dataset = load_dataset("imdb", split="train")

sft_config = STFConfig(
sft_config = SFTConfig(
neftune_noise_alpha=5,
)
trainer = SFTTrainer(
Expand Down

0 comments on commit cd85b14

Please sign in to comment.