Unverified Commit e5f71eca authored by Zafir Stojanovski's avatar Zafir Stojanovski Committed by GitHub
Browse files

Updated docs of `forward` in `Idefics2ForConditionalGeneration` with correct...

Updated docs of `forward` in `Idefics2ForConditionalGeneration` with correct `ignore_index` value (#30678)

updated docs of `forward` in `Idefics2ForConditionalGeneration` with correct `ignore_index` value
parent 9c8979e3
...@@ -1776,9 +1776,9 @@ class Idefics2ForConditionalGeneration(Idefics2PreTrainedModel): ...@@ -1776,9 +1776,9 @@ class Idefics2ForConditionalGeneration(Idefics2PreTrainedModel):
Args: Args:
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
Labels for computing the masked language modeling loss. Indices should either be in `[0, ..., Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored config.vocab_size]` or `model.image_token_id` (where `model` is your instance of `Idefics2ForConditionalGeneration`).
(masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`. Tokens with indices set to `model.image_token_id` are ignored (masked), the loss is only
computed for the tokens with labels in `[0, ..., config.vocab_size]`.
Returns: Returns:
Example: Example:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment