Add ability to replace oot ops when using lora (#37181)

Signed-off-by: Kyuyeun Kim <kyuyeunk@google.com>
This commit is contained in:
Kyuyeun Kim
2026-03-16 18:04:15 -07:00
committed by GitHub
parent 6c1cfbad32
commit 0a0a1a198b
6 changed files with 16 additions and 11 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import torch.nn.functional as F
from transformers import PretrainedConfig
from vllm.config.lora import LoRAConfig
from vllm.model_executor.custom_op import maybe_get_oot_by_class
from vllm.model_executor.layers.vocab_parallel_embedding import VocabParallelEmbedding
from vllm.platforms import current_platform
@@ -132,7 +133,7 @@ class VocabParallelEmbeddingWithLoRA(BaseLayerWithLoRA):
packed_modules_list: list,
model_config: PretrainedConfig | None = None,
) -> bool:
return type(source_layer) is VocabParallelEmbedding
return type(source_layer) is maybe_get_oot_by_class(VocabParallelEmbedding)
@property
def weight(self):