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
1b2c440c
Unverified
Commit
1b2c440c
authored
Oct 09, 2025
by
Jee Jee Li
Committed by
GitHub
Oct 08, 2025
Browse files
[Core] Relax the LoRA max rank (#26461)
Signed-off-by:
Jee Jee Li
<
pandaleefree@gmail.com
>
parent
0f29dca9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
vllm/config/lora.py
vllm/config/lora.py
+1
-1
vllm/v1/worker/lora_model_runner_mixin.py
vllm/v1/worker/lora_model_runner_mixin.py
+4
-4
No files found.
vllm/config/lora.py
View file @
1b2c440c
...
@@ -103,7 +103,7 @@ class LoRAConfig:
...
@@ -103,7 +103,7 @@ class LoRAConfig:
# Setting the maximum rank to 512 should be able to satisfy the vast
# Setting the maximum rank to 512 should be able to satisfy the vast
# majority of applications.
# majority of applications.
possible_max_ranks
=
(
8
,
16
,
32
,
64
,
128
,
256
,
320
,
512
)
possible_max_ranks
=
(
1
,
8
,
16
,
32
,
64
,
128
,
256
,
320
,
512
)
possible_lora_extra_vocab_size
=
(
256
,
512
)
possible_lora_extra_vocab_size
=
(
256
,
512
)
if
self
.
max_lora_rank
not
in
possible_max_ranks
:
if
self
.
max_lora_rank
not
in
possible_max_ranks
:
raise
ValueError
(
raise
ValueError
(
...
...
vllm/v1/worker/lora_model_runner_mixin.py
View file @
1b2c440c
...
@@ -28,8 +28,6 @@ logger = init_logger(__name__)
...
@@ -28,8 +28,6 @@ logger = init_logger(__name__)
# Defined as a mixin for GPUModelRunner
# Defined as a mixin for GPUModelRunner
class
LoRAModelRunnerMixin
:
class
LoRAModelRunnerMixin
:
LORA_WARMUP_RANK
=
8
def
load_lora_model
(
def
load_lora_model
(
self
,
model
:
nn
.
Module
,
vllm_config
:
VllmConfig
,
device
:
torch
.
device
self
,
model
:
nn
.
Module
,
vllm_config
:
VllmConfig
,
device
:
torch
.
device
)
->
nn
.
Module
:
)
->
nn
.
Module
:
...
@@ -96,7 +94,9 @@ class LoRAModelRunnerMixin:
...
@@ -96,7 +94,9 @@ class LoRAModelRunnerMixin:
assert
self
.
lora_manager
is
not
None
,
"LoRA is not enabled"
assert
self
.
lora_manager
is
not
None
,
"LoRA is not enabled"
num_loras
=
lora_config
.
max_loras
num_loras
=
lora_config
.
max_loras
lora_warmup_rank
=
(
lora_config
.
max_lora_rank
if
lora_config
.
max_lora_rank
<
8
else
8
)
# Make dummy lora requests
# Make dummy lora requests
lora_requests
:
set
[
LoRARequest
]
=
{
lora_requests
:
set
[
LoRARequest
]
=
{
LoRARequest
(
LoRARequest
(
...
@@ -111,7 +111,7 @@ class LoRAModelRunnerMixin:
...
@@ -111,7 +111,7 @@ class LoRAModelRunnerMixin:
# Add the dummy LoRAs here so _set_active_loras doesn't try to
# Add the dummy LoRAs here so _set_active_loras doesn't try to
# load from disk.
# load from disk.
for
lr
in
lora_requests
:
for
lr
in
lora_requests
:
self
.
lora_manager
.
add_dummy_lora
(
lr
,
rank
=
self
.
LORA_WARMUP_RANK
)
self
.
lora_manager
.
add_dummy_lora
(
lr
,
rank
=
lora_warmup_rank
)
yield
yield
...
...
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