[Model][LoRA] Enable LoRA support for VoyageQwen3BidirectionalEmbedModel (#57708)

Signed-off-by: Mahir Dursunoglu <142054011+mahird3@users.noreply.github.com>
This commit is contained in:
mahird3
2026-09-20 09:50:00 +00:00
committed by GitHub
parent e5fce7b56b
commit 0748d3bd57
+7 -1
View File
@@ -8,6 +8,7 @@ import torch
import torch.nn as nn
from vllm.config import VllmConfig
from vllm.model_executor.models.interfaces import SupportsLoRA
from vllm.model_executor.models.qwen3 import Qwen3Model
from vllm.model_executor.models.utils import AutoWeightsLoader, maybe_prefix
from vllm.sequence import IntermediateTensors
@@ -15,7 +16,7 @@ from vllm.sequence import IntermediateTensors
WeightItem = tuple[str, torch.Tensor]
class VoyageQwen3BidirectionalEmbedModel(nn.Module):
class VoyageQwen3BidirectionalEmbedModel(nn.Module, SupportsLoRA):
"""Qwen3Model + Voyage embedding head + bidirectional attention.
Checkpoint conventions (HF):
@@ -30,6 +31,11 @@ class VoyageQwen3BidirectionalEmbedModel(nn.Module):
- No "model." prefix
"""
packed_modules_mapping = {
"qkv_proj": ["q_proj", "k_proj", "v_proj"],
"gate_up_proj": ["gate_proj", "up_proj"],
}
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__()
self.config = vllm_config.model_config.hf_config