Skip to content

vllm.transformers_utils.configs.tarsier2

Tarsier2Config

Bases: Qwen2VLConfig

Tarsier2's config.json is written such that AutoConfig.from_pretrained will create a deeply nested config consisting of:

  • LlavaConfig
  • Qwen2VLConfig
    • Qwen2VLTextConfig
    • Qwen2VLVisionConfig
  • Qwen2VLConfig
    • Qwen2VLTextConfig
    • Qwen2VLVisionConfig

When it should really just be a single Qwen2VLConfig.

This class is a hack to stop AutoConfig from creating the nested config structure.

Source code in vllm/transformers_utils/configs/tarsier2.py
class Tarsier2Config(Qwen2VLConfig):
    """
    Tarsier2's config.json is written such that AutoConfig.from_pretrained will create
    a deeply nested config consisting of:

    - LlavaConfig
      - Qwen2VLConfig
        - Qwen2VLTextConfig
        - Qwen2VLVisionConfig
      - Qwen2VLConfig
        - Qwen2VLTextConfig
        - Qwen2VLVisionConfig

    When it should really just be a single Qwen2VLConfig.

    This class is a hack to stop AutoConfig from creating the nested config structure.
    """

    model_type = "tarsier2"

model_type class-attribute instance-attribute

model_type = 'tarsier2'