Skip to content

Can't import TITAN using transformers>=5.0.0 #43

@quentinblampey

Description

@quentinblampey

Hello,

When using transformers>=5.0.0, we receive the following error when trying to import TITAN:

RuntimeError: Tensor.item() cannot be called on meta tensors

To reproduce it, you can simply run the code from the README using transformers>=5.0.0:

from huggingface_hub import login
from transformers import AutoModel 

login()  # login with your User Access Token, found at https://huggingface.co/settings/tokens

titan = AutoModel.from_pretrained('MahmoodLab/TITAN', trust_remote_code=True)
conch, eval_transform = titan.return_conch()

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