[CI] Add PPL test for generation models (#24485)

Signed-off-by: wang.yuqi <noooop@126.com>
This commit is contained in:
wang.yuqi
2025-09-10 21:16:39 +08:00
committed by GitHub
parent d6069887c6
commit bd98842c8a
9 changed files with 211 additions and 7 deletions

View File

@@ -347,14 +347,15 @@ class ModelInfo:
name: str
architecture: str = ""
dtype: str = "auto"
hf_dtype: str = "float32"
hf_overrides: Optional[dict[str, Any]] = None
default_pooling_type: str = ""
mteb_score: Optional[float] = None
enable_test: bool = True
@dataclass
class EmbedModelInfo(ModelInfo):
mteb_score: Optional[float] = None
is_matryoshka: bool = False
matryoshka_dimensions: Optional[list[int]] = None
@@ -371,7 +372,7 @@ class LASTPoolingEmbedModelInfo(EmbedModelInfo):
@dataclass
class RerankModelInfo(ModelInfo):
pass
mteb_score: Optional[float] = None
@dataclass
@@ -384,6 +385,12 @@ class LASTPoolingRerankModelInfo(RerankModelInfo):
default_pooling_type: str = "LAST"
@dataclass
class GenerateModelInfo(ModelInfo):
hf_dtype: str = "auto"
hf_ppl: Optional[float] = None
def dummy_hf_overrides(
hf_config: PretrainedConfig,
*,