Fix peft integration (#38841)

Update peft.py
This commit is contained in:
Cyril Vallez 2025-06-16 10:39:25 +02:00 committed by GitHub
parent 608884960e
commit 9300728665
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,6 @@ from ..utils import (
is_torch_available,
logging,
)
from ..modeling_utils import VLMS
if is_torch_available():
@ -45,6 +44,26 @@ MIN_PEFT_VERSION = "0.5.0"
logger = logging.get_logger(__name__)
# DO NOT MODIFY, KEPT FOR BC ONLY
VLMS = [
"aria",
"ayavision",
"emu3",
"fuyu",
"gotocr2",
"gemma3",
"internvl",
"llava", # all llava prefixed models fall under this check
"mistral3",
"mllama",
"paligemma",
"qwen2vl",
"qwen2_5_vl",
"videollava",
"vipllava",
]
class PeftAdapterMixin:
"""
A class containing all functions for loading and using adapters weights that are supported in PEFT library. For