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
13ce3e4b
Unverified
Commit
13ce3e4b
authored
Nov 14, 2024
by
Patrick Yi
Committed by
GitHub
Nov 13, 2024
Browse files
Add download_dir ServerArgs property (#2027)
parent
df246e69
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
python/sglang/srt/model_executor/model_runner.py
python/sglang/srt/model_executor/model_runner.py
+4
-1
python/sglang/srt/server_args.py
python/sglang/srt/server_args.py
+7
-0
No files found.
python/sglang/srt/model_executor/model_runner.py
View file @
13ce3e4b
...
...
@@ -233,7 +233,10 @@ class ModelRunner:
# Prepare the vllm model config
monkey_patch_vllm_dummy_weight_loader
()
self
.
load_config
=
LoadConfig
(
load_format
=
self
.
server_args
.
load_format
)
self
.
load_config
=
LoadConfig
(
load_format
=
self
.
server_args
.
load_format
,
download_dir
=
self
.
server_args
.
download_dir
,
)
self
.
vllm_model_config
=
VllmModelConfig
(
model
=
self
.
server_args
.
model_path
,
quantization
=
self
.
server_args
.
quantization
,
...
...
python/sglang/srt/server_args.py
View file @
13ce3e4b
...
...
@@ -64,6 +64,7 @@ class ServerArgs:
random_seed
:
Optional
[
int
]
=
None
constrained_json_whitespace_pattern
:
Optional
[
str
]
=
None
watchdog_timeout
:
float
=
300
download_dir
:
Optional
[
str
]
=
None
# Logging
log_level
:
str
=
"info"
...
...
@@ -405,6 +406,12 @@ class ServerArgs:
default
=
ServerArgs
.
watchdog_timeout
,
help
=
"Set watchdog timeout in seconds. If a forward batch takes longer than this, the server will crash to prevent hanging."
,
)
parser
.
add_argument
(
"--download-dir"
,
type
=
str
,
default
=
ServerArgs
.
download_dir
,
help
=
"Model download directory."
,
)
# Logging
parser
.
add_argument
(
...
...
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