[LoRA] Support dynamically initialize packed_modules_mapping for VLM with arbitrary components (#18987)

Signed-off-by: isotr0py <2037008807@qq.com>
Signed-off-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
Isotr0py
2025-06-01 11:06:57 +08:00
committed by GitHub
parent 6aa8f9a4e7
commit a35ca765a5
7 changed files with 32 additions and 38 deletions

View File

@@ -415,6 +415,10 @@ class InternVisionEncoder(nn.Module):
class InternVisionModel(nn.Module):
packed_modules_mapping = {
"qkv": ["qkv"],
}
def __init__(
self,
config: PretrainedConfig,