Skip to content

Tokenizer loading: This breaks quite a few things in a lot of places #27566

@DevasiaThomas

Description

@DevasiaThomas

https://github.com/huggingface/transformers/blame/638d49983f36af910934b38771b4e55c835c1774/src/transformers/tokenization_utils_base.py#L2253

I was trying to use text-generation-webui and all tokenizer loads, using quite a few loaders that depend on transformers libraries, are broken.

@ArthurZucker Were you just trying to override the special token values in init_kwargs?

I changed the statement as below, locally, to get things to work:
init_kwargs[key] = added_tokens_map.get(key, init_kwargs[key])

I didn't make a PR because I'm not sure what the overall intent is. Prior to this, the flow was different.

Appreciate your attention on this. Thanks :)

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