feat: Complete LoRA support for MiniMaxM2 Fixes #32736 (#32763)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
david guan
2026-01-24 20:48:46 +08:00
committed by GitHub
parent 9ad7f89f55
commit bc0d291bfe
2 changed files with 11 additions and 3 deletions

View File

@@ -59,7 +59,7 @@ from vllm.model_executor.model_loader.weight_utils import (
)
from vllm.sequence import IntermediateTensors
from .interfaces import SupportsPP
from .interfaces import SupportsLoRA, SupportsPP
from .utils import (
AutoWeightsLoader,
PPMissingLayer,
@@ -484,7 +484,15 @@ class MiniMaxM2Model(nn.Module):
return loaded_params
class MiniMaxM2ForCausalLM(nn.Module, SupportsPP):
class MiniMaxM2ForCausalLM(nn.Module, SupportsLoRA, SupportsPP):
packed_modules_mapping = {
"qkv_proj": [
"q_proj",
"k_proj",
"v_proj",
],
}
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
super().__init__()
config = vllm_config.model_config.hf_config