Minor error condition bug fix (#33781)

* Error condition bug fix

* Update error message

* Update src/transformers/models/qwen2_vl/modeling_qwen2_vl.py

Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>

* Making change in the rest of the repo

* Formatting

* Formatting with ruff

---------

Co-authored-by: Pavel Iakubovskii <qubvel@gmail.com>
This commit is contained in:
Hamza Tahboub
2024-10-03 23:25:32 -07:00
committed by GitHub
parent 550673a70c
commit 2bd4d5897d
48 changed files with 49 additions and 143 deletions

View File

@@ -882,7 +882,7 @@ class DummyModel(DummyPreTrainedModel):
if (input_ids is None) ^ (inputs_embeds is not None):
raise ValueError(
"You cannot specify both input_ids and inputs_embeds at the same time, and must specify either one"
"You must specify exactly one of input_ids or inputs_embeds"
)
if self.gradient_checkpointing and self.training and use_cache:

View File

@@ -759,7 +759,7 @@ class MyNewModel2Model(MyNewModel2PreTrainedModel):
if (input_ids is None) ^ (inputs_embeds is not None):
raise ValueError(
"You cannot specify both input_ids and inputs_embeds at the same time, and must specify either one"
"You must specify exactly one of input_ids or inputs_embeds"
)
if self.gradient_checkpointing and self.training and use_cache: