[Model] Introduce verify_and_update_model_config for VerifyAndUpdateConfig. (#31131)

Signed-off-by: wang.yuqi <yuqi.wang@daocloud.io>
Signed-off-by: wang.yuqi <noooop@126.com>
This commit is contained in:
wang.yuqi
2025-12-24 17:54:57 +08:00
committed by GitHub
parent b41aeb3468
commit bd89ce16d2
3 changed files with 48 additions and 31 deletions

View File

@@ -64,7 +64,6 @@ from .interfaces import (
SupportsLoRA,
SupportsPP,
)
from .interfaces_base import attn_type
from .utils import (
AutoWeightsLoader,
PPMissingLayer,
@@ -707,14 +706,12 @@ class LlamaForCausalLM(
return name, loaded_weight
@attn_type("encoder_only")
class LlamaBidirectionalForSequenceClassification(as_seq_cls_model(LlamaForCausalLM)):
# This class sets the correct attention type and pooling type
# through LlamaBidirectionalConfig.
pass
@attn_type("encoder_only")
class LlamaBidirectionalModel(as_embedding_model(LlamaForCausalLM)):
# This class sets the correct attention type and pooling type
# through LlamaBidirectionalConfig.