Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
467164ea
Unverified
Commit
467164ea
authored
May 08, 2024
by
Raushan Turganbay
Committed by
GitHub
May 08, 2024
Browse files
Llava: remove dummy labels (#30706)
remove labels from llavas
parent
1872bde7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
4 deletions
+0
-4
src/transformers/models/llava/modeling_llava.py
src/transformers/models/llava/modeling_llava.py
+0
-2
src/transformers/models/vipllava/modeling_vipllava.py
src/transformers/models/vipllava/modeling_vipllava.py
+0
-2
No files found.
src/transformers/models/llava/modeling_llava.py
View file @
467164ea
...
...
@@ -442,8 +442,6 @@ class LlavaForConditionalGeneration(LlavaPreTrainedModel):
inputs_embeds
,
attention_mask
,
labels
,
position_ids
=
self
.
_merge_input_ids_with_image_features
(
image_features
,
inputs_embeds
,
input_ids
,
attention_mask
,
labels
)
if
labels
is
None
:
labels
=
torch
.
full_like
(
attention_mask
,
self
.
config
.
ignore_index
).
to
(
torch
.
long
)
# In case input_ids.shape[1] == 1 & pixel_values==None & past_key_values != None, we are in the case of
# generation with cache
...
...
src/transformers/models/vipllava/modeling_vipllava.py
View file @
467164ea
...
...
@@ -436,8 +436,6 @@ class VipLlavaForConditionalGeneration(VipLlavaPreTrainedModel):
inputs_embeds
,
attention_mask
,
labels
,
position_ids
=
self
.
_merge_input_ids_with_image_features
(
image_features
,
inputs_embeds
,
input_ids
,
attention_mask
,
labels
)
if
labels
is
None
:
labels
=
torch
.
full_like
(
attention_mask
,
self
.
config
.
ignore_index
).
to
(
torch
.
long
)
else
:
# In case input_ids.shape[1] == 1 & pixel_values==None & past_key_values != None, we are in the case of
# generation with cache
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment