Skip to content

Commit 11da27b

Browse files
committed
add ckpt_source flag to loraRequest, simplify tests
Signed-off-by: Venky Ganesh <[email protected]>
1 parent 8683024 commit 11da27b

File tree

6 files changed

+266
-537
lines changed

6 files changed

+266
-537
lines changed

tensorrt_llm/executor/request.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,15 @@ class LoRARequest:
2525
lora_name: str
2626
lora_int_id: int
2727
lora_path: str = ""
28+
lora_ckpt_source: str = "hf"
2829

2930
def __post_init__(self):
3031
if self.lora_path is not None and not os.path.exists(self.lora_path):
3132
raise ValueError(f"lora_path ({self.lora_path}) does not exist.")
33+
if self.lora_ckpt_source not in ["hf", "nemo"]:
34+
raise ValueError(
35+
f"lora_ckpt_source must be 'hf' or 'nemo', got '{self.lora_ckpt_source}'"
36+
)
3237

3338
@property
3439
def adapter_id(self):
@@ -42,6 +47,10 @@ def name(self):
4247
def path(self):
4348
return self.lora_path
4449

50+
@property
51+
def ckpt_source(self):
52+
return self.lora_ckpt_source
53+
4554

4655
@dataclass(slots=True)
4756
class PromptAdapterRequest:

tensorrt_llm/executor/worker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,8 @@ def _load_lora_adapter(self, lora_request: LoRARequest) -> bool:
349349
model_config=self._runtime_model_config if
350350
self._runtime_model_config is not None else self._lora_model_config,
351351
runtime_mapping=None,
352-
uids=[adapter_id])
352+
uids=[adapter_id],
353+
ckpt_source=lora_request.ckpt_source)
353354
return adapter_id in newly_loaded_uids
354355

355356
def _load_prompt_adapter(self,

tests/integration/defs/llmapi/test_llm_pytorch_nemo_lora.py

Lines changed: 0 additions & 296 deletions
This file was deleted.

tests/integration/test_lists/test-db/l0_h100.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ l0_h100:
2020
- unittest/_torch/modeling -k "modeling_mixtral"
2121
- unittest/_torch/modeling -k "modeling_nemotron"
2222
- unittest/_torch/modeling -k "modeling_gemma3"
23-
- unittest/llmapi/test_pytorch_nemo_lora.py
2423
- unittest/disaggregated/test_disagg_utils.py
2524
- unittest/disaggregated/test_router.py
2625
- unittest/disaggregated/test_remoteDictionary.py
@@ -189,7 +188,6 @@ l0_h100:
189188
- accuracy/test_llm_api_pytorch.py::TestDeepSeekV3Lite::test_no_kv_cache_reuse[quant_dtype=none-mtp_nextn=2-fp8kv=False-attention_dp=True-cuda_graph=True-overlap_scheduler=True]
190189
- accuracy/test_llm_api_pytorch.py::TestQwen3_30B_A3B::test_fp8_block_scales[latency]
191190
- accuracy/test_llm_api_pytorch.py::TestLlama3_1_8BInstruct::test_guided_decoding[llguidance]
192-
- llmapi/test_llm_pytorch_nemo_lora.py
193191

194192
- condition:
195193
ranges:

0 commit comments

Comments
 (0)