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
95099cbc
Commit
95099cbc
authored
May 23, 2025
by
zhuwenwen
Browse files
fix docstring
parent
c7880912
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
vllm/config.py
vllm/config.py
+4
-2
vllm/engine/arg_utils.py
vllm/engine/arg_utils.py
+4
-3
No files found.
vllm/config.py
View file @
95099cbc
...
...
@@ -2635,6 +2635,9 @@ class LoRAConfig:
max_cpu_loras
:
Optional
[
int
]
=
None
"""Maximum number of LoRAs to store in CPU memory. Must be >= than
`max_loras`."""
merge_lora
:
bool
=
False
"""Enable merge lora
"""
lora_target_modules
:
Optional
[
List
[
str
]]
=
None
"""List of lora module name, If not specified,
modules will be chosen according to the model architecture.
...
...
@@ -2653,8 +2656,6 @@ class LoRAConfig:
specified, only adapters trained with the base model scaling factor are
allowed."""
bias_enabled
:
bool
=
False
merge_lora
:
bool
=
False
lora_target_modules
:
Optional
[
List
[
str
]]
=
None
"""Enable bias for LoRA adapters."""
def
compute_hash
(
self
)
->
str
:
...
...
@@ -2677,6 +2678,7 @@ class LoRAConfig:
factors
.
append
(
self
.
lora_extra_vocab_size
)
factors
.
append
(
self
.
long_lora_scaling_factors
)
factors
.
append
(
self
.
bias_enabled
)
factors
.
append
(
self
.
merge_lora
)
hash_str
=
hashlib
.
md5
(
str
(
factors
).
encode
(),
usedforsecurity
=
False
).
hexdigest
()
return
hash_str
...
...
vllm/engine/arg_utils.py
View file @
95099cbc
...
...
@@ -280,7 +280,7 @@ class EngineArgs:
max_lora_rank
:
int
=
LoRAConfig
.
max_lora_rank
fully_sharded_loras
:
bool
=
LoRAConfig
.
fully_sharded_loras
max_cpu_loras
:
Optional
[
int
]
=
LoRAConfig
.
max_cpu_loras
merge_lora
:
bool
=
False
merge_lora
:
bool
=
LoRAConfig
.
merge_lora
lora_target_modules
:
Optional
[
List
[
str
]]
=
LoRAConfig
.
lora_target_modules
lora_dtype
:
Optional
[
Union
[
str
,
torch
.
dtype
]]
=
LoRAConfig
.
lora_dtype
lora_extra_vocab_size
:
int
=
LoRAConfig
.
lora_extra_vocab_size
...
...
@@ -706,8 +706,9 @@ class EngineArgs:
lora_group
.
add_argument
(
'--max-lora-rank'
,
**
lora_kwargs
[
"max_lora_rank"
])
lora_group
.
add_argument
(
'--merge-lora'
,
action
=
argparse
.
BooleanOptionalAction
,
help
=
'If set to True, the weights of the base layer will be merged with the weights of Lora.'
)
**
lora_kwargs
[
"merge-lora"
])
# action=argparse.BooleanOptionalAction,
# help='If set to True, the weights of the base layer will be merged with the weights of Lora.')
lora_group
.
add_argument
(
'--lora-target-modules'
,
**
lora_kwargs
[
"lora_target_modules"
])
lora_group
.
add_argument
(
'--lora-extra-vocab-size'
,
...
...
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