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
d9fccfef
"vscode:/vscode.git/clone" did not exist on "3245b10dac880b1c65594c75520f3fbf079ba07a"
Unverified
Commit
d9fccfef
authored
Jul 26, 2024
by
Liangsheng Yin
Committed by
GitHub
Jul 26, 2024
Browse files
Fix context length (#757)
parent
679ebcbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
python/sglang/srt/hf_transformers_utils.py
python/sglang/srt/hf_transformers_utils.py
+2
-0
No files found.
python/sglang/srt/hf_transformers_utils.py
View file @
d9fccfef
...
...
@@ -73,6 +73,8 @@ def get_context_length(config):
rope_scaling
=
getattr
(
config
,
"rope_scaling"
,
None
)
if
rope_scaling
:
rope_scaling_factor
=
config
.
rope_scaling
[
"factor"
]
if
"original_max_position_embeddings"
in
rope_scaling
:
rope_scaling_factor
=
1
if
config
.
rope_scaling
.
get
(
"rope_type"
,
None
)
==
"llama3"
:
rope_scaling_factor
=
1
else
:
...
...
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