Skip to content

[Usage]: Best way to batch requests with different lora ids #10761

Closed

Description

@ShuaiShao93

System Info

System Information:

  • OS:
  • Python version:
  • CUDA version:
  • GPU model(s):
  • Driver version:
  • TensorRT-LLM version:

Detailed output:

Paste the output of the above commands here

How would you like to use TensorRT-LLM

Assume model is llama 3.1 8B, and we use multi lora. What’s the best routing strategy in inference?

  1. Can requests in 1 batch have different lora ids? Does it have negative impact compared to 1 batch having same lora ids?
  2. Is it true that kv cache can’t be shared across different lora ids? Thus it is beneficial to route requests with same lora id to the same trtllm instance?
  3. Are there any other reasons why we prefer routing requests with same lora id to the same trtllm instance?

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and checked the documentation and examples for answers to frequently asked questions.

Activity

  1. added
    Lora/P-tuningParameter-Efficient Fine-Tuning (PEFT) like LoRA/P-tuning in TRTLLM: adapter use & perf.
    on Jan 16, 2026
  2. karljang commented on Jan 26, 2026

    @karljang
    Collaborator

    Hi @ShuaiShao93, here are the answers that I got.

    Question Answer
    Can batch have different LoRA IDs? ✅ Yes, fully supported
    Performance impact? ⚠️ Some overhead from LoRA cache management
    KV cache shared across LoRAs? ❌ No (when LoRA targets K/V projections)
    Route same LoRA to same instance? ✅ Yes, recommended for KV cache reuse + LoRA locality

    docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Lora/P-tuningParameter-Efficient Fine-Tuning (PEFT) like LoRA/P-tuning in TRTLLM: adapter use & perf.questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions