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
change
sglang
Commits
357921aa
Unverified
Commit
357921aa
authored
Jun 27, 2025
by
Xinyuan Tong
Committed by
GitHub
Jun 27, 2025
Browse files
Fix: Minicpm (#7612)
Signed-off-by:
Xinyuan Tong
<
justinning0323@outlook.com
>
parent
c071198c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
python/sglang/srt/models/minicpmo.py
python/sglang/srt/models/minicpmo.py
+2
-2
No files found.
python/sglang/srt/models/minicpmo.py
View file @
357921aa
...
@@ -32,7 +32,7 @@ from transformers.activations import ACT2FN
...
@@ -32,7 +32,7 @@ from transformers.activations import ACT2FN
from
transformers.cache_utils
import
DynamicCache
,
EncoderDecoderCache
from
transformers.cache_utils
import
DynamicCache
,
EncoderDecoderCache
from
transformers.modeling_outputs
import
BaseModelOutputWithPast
,
ModelOutput
from
transformers.modeling_outputs
import
BaseModelOutputWithPast
,
ModelOutput
from
transformers.models.whisper.modeling_whisper
import
(
from
transformers.models.whisper.modeling_whisper
import
(
W
HISPER_ATTENTION_CLASSES
,
W
hisperAttention
,
WhisperConfig
,
WhisperConfig
,
WhisperEncoder
,
WhisperEncoder
,
)
)
...
@@ -1090,7 +1090,7 @@ class MiniCPMWhisperEncoderLayer(nn.Module):
...
@@ -1090,7 +1090,7 @@ class MiniCPMWhisperEncoderLayer(nn.Module):
def
__init__
(
self
,
config
:
WhisperConfig
,
layer_idx
:
int
=
None
):
def
__init__
(
self
,
config
:
WhisperConfig
,
layer_idx
:
int
=
None
):
super
().
__init__
()
super
().
__init__
()
self
.
embed_dim
=
config
.
d_model
self
.
embed_dim
=
config
.
d_model
self
.
self_attn
=
W
HISPER_ATTENTION_CLASSES
[
config
.
_attn_implem
ent
at
ion
]
(
self
.
self_attn
=
W
hisperAtt
ention
(
embed_dim
=
self
.
embed_dim
,
embed_dim
=
self
.
embed_dim
,
num_heads
=
config
.
encoder_attention_heads
,
num_heads
=
config
.
encoder_attention_heads
,
dropout
=
config
.
attention_dropout
,
dropout
=
config
.
attention_dropout
,
...
...
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