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
a9d18b51
Unverified
Commit
a9d18b51
authored
Nov 12, 2025
by
Jee Jee Li
Committed by
GitHub
Nov 12, 2025
Browse files
[Bugfix] Fix gpt_oss packed_modules_mapping (#28536)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
edb59a94
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
vllm/model_executor/models/gpt_oss.py
vllm/model_executor/models/gpt_oss.py
+5
-5
No files found.
vllm/model_executor/models/gpt_oss.py
View file @
a9d18b51
...
...
@@ -92,7 +92,7 @@ class OAIAttention(nn.Module):
self
.
scaling
=
self
.
head_dim
**-
0.5
self
.
rope_theta
=
config
.
rope_theta
self
.
qkv
=
QKVParallelLinear
(
self
.
qkv
_proj
=
QKVParallelLinear
(
hidden_size
=
self
.
hidden_size
,
head_size
=
self
.
head_dim
,
total_num_heads
=
self
.
num_attention_heads
,
...
...
@@ -129,7 +129,7 @@ class OAIAttention(nn.Module):
def
forward
(
self
,
hidden_states
:
torch
.
Tensor
,
positions
:
torch
.
Tensor
)
->
torch
.
Tensor
:
qkv
,
_
=
self
.
qkv
(
hidden_states
)
qkv
,
_
=
self
.
qkv
_proj
(
hidden_states
)
q
,
k
,
v
=
qkv
.
split
([
self
.
q_size
,
self
.
kv_size
,
self
.
kv_size
],
dim
=-
1
)
q
,
k
=
self
.
rotary_emb
(
positions
,
q
,
k
)
v
=
v
.
contiguous
()
...
...
@@ -606,9 +606,9 @@ class GptOssModel(nn.Module):
def
load_weights
(
self
,
weights
:
Iterable
[
tuple
[
str
,
torch
.
Tensor
]])
->
set
[
str
]:
stacked_params_mapping
=
[
# (param_name, shard_name, shard_id)
(
".qkv"
,
".q_proj"
,
"q"
),
(
".qkv"
,
".k_proj"
,
"k"
),
(
".qkv"
,
".v_proj"
,
"v"
),
(
".qkv
_proj
"
,
".q_proj"
,
"q"
),
(
".qkv
_proj
"
,
".k_proj"
,
"k"
),
(
".qkv
_proj
"
,
".v_proj"
,
"v"
),
]
tp_rank
=
get_tensor_model_parallel_rank
()
...
...
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