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
fecbb7c7
Unverified
Commit
fecbb7c7
authored
Aug 26, 2025
by
Wei
Committed by
GitHub
Aug 27, 2025
Browse files
[Bugfix][gpt-oss] passing the cache config in gpt-oss (#23613)
Signed-off-by:
Wei Wei
<
wwei6@meta.com
>
parent
6dab89b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
vllm/model_executor/models/gpt_oss.py
vllm/model_executor/models/gpt_oss.py
+6
-1
No files found.
vllm/model_executor/models/gpt_oss.py
View file @
fecbb7c7
...
...
@@ -174,12 +174,15 @@ class TransformerBlock(torch.nn.Module):
def
__init__
(
self
,
config
:
GptOssConfig
,
cache_config
:
CacheConfig
,
quant_config
:
QuantizationConfig
,
prefix
:
str
=
""
,
):
super
().
__init__
()
self
.
layer_idx
=
extract_layer_index
(
prefix
)
self
.
attn
=
OAIAttention
(
config
,
prefix
=
f
"
{
prefix
}
.attn"
)
self
.
attn
=
OAIAttention
(
config
,
prefix
=
f
"
{
prefix
}
.attn"
,
cache_config
=
cache_config
)
self
.
mlp
=
MLPBlock
(
config
,
self
.
layer_idx
,
quant_config
=
quant_config
,
...
...
@@ -203,6 +206,7 @@ class GptOssModel(nn.Module):
):
super
().
__init__
()
self
.
config
=
vllm_config
.
model_config
.
hf_config
self
.
cache_config
=
vllm_config
.
cache_config
self
.
quant_config
=
vllm_config
.
quant_config
self
.
parallel_config
=
vllm_config
.
parallel_config
self
.
config
.
hidden_size
=
self
.
config
.
hidden_size
...
...
@@ -213,6 +217,7 @@ class GptOssModel(nn.Module):
self
.
layers
=
torch
.
nn
.
ModuleList
([
TransformerBlock
(
self
.
config
,
cache_config
=
self
.
cache_config
,
quant_config
=
self
.
quant_config
,
prefix
=
maybe_prefix
(
prefix
,
f
"block.
{
layer_idx
}
"
),
)
for
layer_idx
in
range
(
self
.
config
.
num_hidden_layers
)
...
...
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