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
11fd7ea6
Unverified
Commit
11fd7ea6
authored
Nov 19, 2024
by
Patrick von Platen
Committed by
GitHub
Nov 19, 2024
Browse files
[Pixtral-Large] Pixtral actually has no bias in vision-lang adapter (#10449)
parent
f028dff3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
vllm/model_executor/models/pixtral.py
vllm/model_executor/models/pixtral.py
+3
-2
No files found.
vllm/model_executor/models/pixtral.py
View file @
11fd7ea6
...
...
@@ -331,6 +331,7 @@ class VisionEncoderArgs:
num_attention_heads
:
int
rope_theta
:
float
# for rope-2D
image_token_id
:
int
adapter_bias
:
bool
=
True
def
_reshape_for_broadcast
(
freqs_cis
:
torch
.
Tensor
,
...
...
@@ -595,10 +596,10 @@ class VisionLanguageAdapter(nn.Module):
self
.
w_in
=
nn
.
Linear
(
args
.
hidden_size
,
dim
,
bias
=
True
,
bias
=
args
.
adapter_bias
,
)
self
.
gelu
=
nn
.
GELU
()
self
.
w_out
=
nn
.
Linear
(
dim
,
dim
,
bias
=
True
)
self
.
w_out
=
nn
.
Linear
(
dim
,
dim
,
bias
=
args
.
adapter_bias
)
def
forward
(
self
,
x
:
torch
.
Tensor
)
->
torch
.
Tensor
:
return
self
.
w_out
(
self
.
gelu
(
self
.
w_in
(
x
)))
...
...
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