Skip to content

Incompatibility with transformers v5 #42

@QGBrabant

Description

@QGBrabant

Hello,

When trying to use the encode_queries function of Splade, I got the error:

AttributeError: BertTokenizer has no attribute batch_encode_plus. Did you mean: '_encode_plus'?

I was using the v5 of the transformers library. The error disappears when switching to transformer v4. From what I understood, in transformers v5, tokenizers use a single encode function and batch_encode_plus is not a thing anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions