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
b01011d2
Commit
b01011d2
authored
Oct 27, 2025
by
zhuwenwen
Browse files
update scaling_alpha
parent
f386ba88
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
vllm/config/model.py
vllm/config/model.py
+2
-2
vllm/model_executor/layers/rotary_embedding/__init__.py
vllm/model_executor/layers/rotary_embedding/__init__.py
+3
-2
No files found.
vllm/config/model.py
View file @
b01011d2
...
...
@@ -1871,8 +1871,8 @@ def _get_and_verify_max_len(
"original_max_position_embeddings"
]
# see DynamicNTKAlphaRotaryEmbedding
if
rope_scaling
[
"type"
]
==
"dynamic"
and
"alpha"
in
rope_scaling
:
scaling_factor
=
1
# if "alpha" in rope_scaling and
rope_scaling["type"] == "dynamic":
#
scaling_factor = 1
derived_max_model_len
*=
scaling_factor
...
...
vllm/model_executor/layers/rotary_embedding/__init__.py
View file @
b01011d2
...
...
@@ -137,10 +137,11 @@ def get_rope(
scaling_alpha
,
dtype
)
elif
"factor"
in
rope_scaling
:
scaling_factor
=
rope_scaling
[
"factor"
]
if
"alpha"
in
rope_scaling
:
scaling_alpha
=
rope_scaling
[
"alpha"
]
if
scaling_alpha
:
rotary_emb
=
DynamicNTKAlphaRotaryEmbedding
(
head_size
,
rotary_dim
,
max_position
,
base
,
is_neox_style
,
rope_
scaling
[
"
alpha
"
]
,
dtype
)
scaling
_
alpha
,
dtype
)
else
:
rotary_emb
=
DynamicNTKScalingRotaryEmbedding
(
head_size
,
rotary_dim
,
max_position
,
base
,
is_neox_style
,
...
...
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