Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/source/en/main_classes/trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ when used with other models. When using it with your own model, make sure:
- your model can compute the loss if a `labels` argument is provided and that loss is returned as the first
element of the tuple (if your model returns tuples)
- your model can accept multiple label arguments (use `label_names` in [`TrainingArguments`] to indicate their name to the [`Trainer`]) but none of them should be named `"label"`

- For classification models, you should not set `label_names`; such models expect a single `labels` tensor. `label_names` is only required when your model’s `forward()` method genuinely accepts multiple label arguments (e.g., extractive QA).
</Tip>

## Trainer[[api-reference]]
Expand Down