Skip to content

[LoRA] update docs for LoRA#3798

Open
likholat wants to merge 3 commits into
openvinotoolkit:masterfrom
likholat:lora_docs
Open

[LoRA] update docs for LoRA#3798
likholat wants to merge 3 commits into
openvinotoolkit:masterfrom
likholat:lora_docs

Conversation

@likholat
Copy link
Copy Markdown
Contributor

@likholat likholat commented May 4, 2026

Description

Add documentation and runtime validation for LoRA adapter mode limitations in the ContinuousBatchingPipeline add_request + step() flow

Related to #3677

Checklist:

  • This PR follows GenAI Contributing guidelines.
  • Tests have been updated or added to cover the new code.
  • This PR fully addresses the ticket. - no ticket
  • I have made corresponding changes to the documentation.

Copilot AI review requested due to automatic review settings May 4, 2026 18:11
@github-actions github-actions Bot added category: continuous batching Continuous batching category: CPP API Changes in GenAI C++ public headers category: GGUF GGUF file reader labels May 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds runtime validation and API documentation notes to clarify which LoRA adapter modes are supported when using ContinuousBatchingPipeline::add_request() + step(), and adds a Python test to validate the new restriction.

Changes:

  • Added a runtime assertion in the Continuous Batching add_request() path to reject unsupported LoRA adapter modes.
  • Updated C++ API documentation comments to describe LoRA mode limitations for add_request()+step().
  • Added a Python test ensuring unsupported LoRA mode(s) are rejected by add_request().

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
tests/python_tests/test_continuous_batching.py Adds a regression test for rejecting unsupported LoRA mode in CB add_request().
src/cpp/src/continuous_batching/pipeline_impl.cpp Adds runtime validation for LoRA adapter modes in CB add_request().
src/cpp/src/continuous_batching/pipeline_base.hpp Documents LoRA adapter mode limitations for CB add_request() overloads.
src/cpp/include/openvino/genai/continuous_batching_pipeline.hpp Documents LoRA adapter mode limitations on the public CB API.

Comment thread src/cpp/src/continuous_batching/pipeline_impl.cpp
Comment thread src/cpp/src/continuous_batching/pipeline_base.hpp
Comment thread src/cpp/include/openvino/genai/continuous_batching_pipeline.hpp Outdated
Comment thread tests/python_tests/test_continuous_batching.py
Comment thread src/cpp/include/openvino/genai/continuous_batching_pipeline.hpp
Copilot AI review requested due to automatic review settings May 6, 2026 11:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment on lines +271 to +276
if (sampling_params.adapters.has_value()) {
const auto mode = sampling_params.adapters->get_mode();
OPENVINO_ASSERT(mode != AdapterConfig::MODE_DYNAMIC && mode != AdapterConfig::MODE_AUTO && mode != AdapterConfig::MODE_STATIC_RANK,
"MODE_DYNAMIC, MODE_AUTO, and MODE_STATIC_RANK LoRA adapters are not supported in the add_request() + step() flow. "
"Use MODE_STATIC or MODE_FUSE instead.");
}
Comment on lines +839 to +840
with pytest.raises(RuntimeError):
pipe.add_request(0, "test prompt", generation_config=config)
Comment on lines +199 to +200
/// @note LoRA adapters are only supported in MODE_STATIC or MODE_FUSE modes.
/// MODE_DYNAMIC, MODE_AUTO and MODE_STATIC_RANK are not supported in the add_request() + step() flow.
Comment on lines 81 to 85
/**
* Adds requests to awaiting queue using encoded inputs
* Adds requests to awaiting queue using encoded inputs.
* @note LoRA adapters are only supported in MODE_STATIC or MODE_FUSE modes.
* MODE_DYNAMIC, MODE_AUTO and MODE_STATIC_RANK are not supported in the add_request() + step() flow.
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: continuous batching Continuous batching category: CPP API Changes in GenAI C++ public headers category: GGUF GGUF file reader

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants