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
f9d72381
"vscode:/vscode.git/clone" did not exist on "d9eb9358ccf8803253d2f5cf7feafef13b60b8c5"
Unverified
Commit
f9d72381
authored
Jan 17, 2024
by
Lianmin Zheng
Committed by
GitHub
Jan 17, 2024
Browse files
Teak mem fraction (#20)
parent
bf51ddc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
python/sglang/srt/managers/router/model_runner.py
python/sglang/srt/managers/router/model_runner.py
+1
-1
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+7
-3
No files found.
python/sglang/srt/managers/router/model_runner.py
View file @
f9d72381
...
...
@@ -278,7 +278,7 @@ class ModelRunner:
load_format
=
self
.
load_format
,
revision
=
None
,
)
self
.
model
=
model
self
.
model
=
model
.
eval
()
def
profile_max_num_token
(
self
,
total_gpu_memory
):
available_gpu_memory
=
get_available_gpu_memory
(
...
...
python/sglang/srt/server_args.py
View file @
f9d72381
...
...
@@ -26,10 +26,14 @@ class ServerArgs:
if
self
.
tokenizer_path
is
None
:
self
.
tokenizer_path
=
self
.
model_path
if
self
.
mem_fraction_static
is
None
:
if
self
.
tp_size
>
1
:
self
.
mem_fraction_static
=
0.8
if
self
.
tp_size
>=
8
:
self
.
mem_fraction_static
=
0.80
elif
self
.
tp_size
>=
4
:
self
.
mem_fraction_static
=
0.82
elif
self
.
tp_size
>=
2
:
self
.
mem_fraction_static
=
0.85
else
:
self
.
mem_fraction_static
=
0.9
self
.
mem_fraction_static
=
0.9
0
@
staticmethod
def
add_cli_args
(
parser
:
argparse
.
ArgumentParser
):
...
...
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