Skip to content

[Usage]: Pass multiple LoRA modules through YAML config #9655

Closed as not planned
@andreapairon

Description

@andreapairon

How would you like to use vllm

I would like to pass multiple LoRA modules to the vLLM engine, but currently I'm receiving error while parsing the lora_modules property.

The LoRAParserAction class receives a Sequence[str] in case you want to use multiple LoRA modules.

I have a YAML config file in which I declare the vLLM engine arguments, like this:

model: ai-models/Meta-Llama-3.1-8B-Instruct-rev-5206a32
tokenizer_mode: auto
dtype: half
lora_modules: "ai-models/adv_perizia_exp7_run6=ai-models/adv_perizia_exp7_run6"
max_num_batched_tokens: 32768
max_num_seqs: 192
gpu_memory_utilization: 0.95
tensor_parallel_size: <RAY_LLM_NUM_WORKERS>
max_model_len: 32768

In that way (name=path for the LoRA module), all works and I'm able to perform inference with LoRA (I set enable_lora argument later in the code, not in the YAML file).
Now I would like to pass multiple lora_modules, but I'm receiving parsing error in every different ways I tried:

lora_modules: "ai-models/adv_perizia_exp7_run6=ai-models/adv_perizia_exp7_run6 ai-models/perizia_exp7_run3=ai-models/perizia_exp7_run3" (blanks space between LoRA modules)

lora_modules:
      - "ai-models/adv_perizia_exp7_run6=ai-models/adv_perizia_exp7_run6"
      - "ai-models/perizia_exp7_run3=ai-models/perizia_exp7_run3"

lora_modules: ["ai-models/adv_perizia_exp7_run6=ai-models/adv_perizia_exp7_run6","ai-models/perizia_exp7_run3=ai-models/perizia_exp7_run3"]

lora_modules: > "ai-models/adv_perizia_exp7_run6=ai-models/adv_perizia_exp7_run6\nai-models/perizia_exp7_run3=ai-models/perizia_exp7_run3" (\n between LoRA modules)

How can I pass multiple LoRA modules correctly? Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleOver 90 days of inactivityusageHow to use vllm

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions