Skip to content

UnslothVisionDataCollator cannot handle a tuple as patch size #316

@anderlem

Description

@anderlem

UnslothVisionDataCollator expects that the model patch size is a single int at

self.patch_size = model.config.vision_config.patch_size
, but there are model configs such as https://huggingface.co/OpenGVLab/InternVL3-2B-hf/blob/main/config.json specifying a tuple of 2 ints. UnslothVisionDataCollator then crashes when it tries to do arithmetic with the patch size. This bug was did not exist in older unsloth-zoo versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions