Fix some more Transformers nightly tests (#29872)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-12-02 21:49:44 +00:00
committed by GitHub
parent 3ff5b53bc2
commit 6fc5841db1
8 changed files with 75 additions and 27 deletions

View File

@@ -1576,15 +1576,6 @@ class Tarsier2ForConditionalGeneration(Qwen2VLForConditionalGeneration):
}
)
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
# Tarsier2 uses llava as model_type, which will create a Qwen2VLConfig
# as text_config, we need to reconstruct Qwen2VLConfig from LlavaConfig.
config = vllm_config.model_config.hf_config
qwen2vl_config = config.text_config
qwen2vl_config.architectures = config.architectures
vllm_config.model_config.hf_config = qwen2vl_config
super().__init__(vllm_config=vllm_config, prefix=prefix)
def load_weights(self, weights: Iterable[tuple[str, torch.Tensor]]) -> set[str]:
skip_prefixes = []
if self.visual is None: