Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
c66c7f86
Unverified
Commit
c66c7f86
authored
Jul 30, 2024
by
Roger Wang
Committed by
GitHub
Jul 30, 2024
Browse files
[Bugfix] Fix PaliGemma MMP (#6930)
parent
6e063ea3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
vllm/model_executor/models/paligemma.py
vllm/model_executor/models/paligemma.py
+2
-5
No files found.
vllm/model_executor/models/paligemma.py
View file @
c66c7f86
...
...
@@ -9,7 +9,6 @@ from vllm.attention import AttentionMetadata
from
vllm.config
import
CacheConfig
,
MultiModalConfig
from
vllm.inputs
import
INPUT_REGISTRY
,
InputContext
,
LLMInputs
from
vllm.logger
import
init_logger
from
vllm.model_executor.layers.linear
import
ColumnParallelLinear
from
vllm.model_executor.layers.logits_processor
import
LogitsProcessor
from
vllm.model_executor.layers.quantization.base_config
import
(
QuantizationConfig
)
...
...
@@ -133,12 +132,10 @@ class PaliGemmaMultiModalProjector(nn.Module):
def
__init__
(
self
,
vision_hidden_size
:
int
,
projection_dim
:
int
):
super
().
__init__
()
self
.
linear
=
ColumnParallelLinear
(
vision_hidden_size
,
projection_dim
,
bias
=
True
)
self
.
linear
=
nn
.
Linear
(
vision_hidden_size
,
projection_dim
,
bias
=
True
)
def
forward
(
self
,
image_features
:
torch
.
Tensor
)
->
torch
.
Tensor
:
hidden_states
,
_
=
self
.
linear
(
image_features
)
hidden_states
=
self
.
linear
(
image_features
)
return
hidden_states
...
...
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