Skip to content

Commit

Permalink
add docs (huggingface#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
younesbelkada authored Nov 14, 2023
1 parent be3faa7 commit e23a541
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/source/sft_trainer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ trainer = SFTTrainer(
trainer.train()
```

Make sure to have a `pad_token_id` which is different from `eos_token_id` which can result in the model not properly predicting EOS (End of Sentence) tokens during generation.

#### Using token_ids directly for `response_template`

Some tokenizers like Llama 2 (`meta-llama/Llama-2-XXb-hf`) tokenize sequences differently depending whether they have context or not. For example:
Expand Down

0 comments on commit e23a541

Please sign in to comment.