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
f645eb69
Unverified
Commit
f645eb69
authored
Jan 08, 2025
by
Jee Jee Li
Committed by
GitHub
Jan 08, 2025
Browse files
[Bugfix] Add checks for LoRA and CPU offload (#11810)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
f4923cb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/config.py
vllm/config.py
+6
-0
No files found.
vllm/config.py
View file @
f645eb69
...
@@ -2051,6 +2051,11 @@ class LoRAConfig:
...
@@ -2051,6 +2051,11 @@ class LoRAConfig:
f
"max_cpu_loras (
{
self
.
max_cpu_loras
}
) must be >= "
f
"max_cpu_loras (
{
self
.
max_cpu_loras
}
) must be >= "
f
"max_loras (
{
self
.
max_loras
}
)"
)
f
"max_loras (
{
self
.
max_loras
}
)"
)
def
verify_with_cache_config
(
self
,
cache_config
:
CacheConfig
):
# TODO LoRA supports CPU offload.
if
cache_config
.
cpu_offload_gb
>
0
:
raise
ValueError
(
"CPU offload is not supported with LoRA yet."
)
def
verify_with_model_config
(
self
,
model_config
:
ModelConfig
):
def
verify_with_model_config
(
self
,
model_config
:
ModelConfig
):
if
self
.
lora_dtype
in
(
None
,
"auto"
):
if
self
.
lora_dtype
in
(
None
,
"auto"
):
self
.
lora_dtype
=
model_config
.
dtype
self
.
lora_dtype
=
model_config
.
dtype
...
@@ -3138,6 +3143,7 @@ class VllmConfig:
...
@@ -3138,6 +3143,7 @@ class VllmConfig:
self
.
cache_config
.
verify_with_parallel_config
(
self
.
parallel_config
)
self
.
cache_config
.
verify_with_parallel_config
(
self
.
parallel_config
)
if
self
.
lora_config
:
if
self
.
lora_config
:
self
.
lora_config
.
verify_with_cache_config
(
self
.
cache_config
)
self
.
lora_config
.
verify_with_model_config
(
self
.
model_config
)
self
.
lora_config
.
verify_with_model_config
(
self
.
model_config
)
self
.
lora_config
.
verify_with_scheduler_config
(
self
.
lora_config
.
verify_with_scheduler_config
(
self
.
scheduler_config
)
self
.
scheduler_config
)
...
...
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