Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add Llama to mapping names in tokenization_auto.py#43911

Open
pavel-esir wants to merge 3 commits into
huggingface:mainfrom
pavel-esir:patch-1
Open

add Llama to mapping names in tokenization_auto.py#43911
pavel-esir wants to merge 3 commits into
huggingface:mainfrom
pavel-esir:patch-1

Conversation

@pavel-esir

Copy link
Copy Markdown
Contributor

What does this PR do?

Without this like AutoTokenizer.from_pretrained(...) does not create LlamaTokenizer object.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings. - Not applicable
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Without this like `AutoTokenizer.from_pretrained(...)` does not create LlamaTokenizer object.
@Rocketknight1

Copy link
Copy Markdown
Member

cc @itazap you mentioned this mapping might not be necessary? I'm not sure why llama is missing.

@apaniukov

Copy link
Copy Markdown

Fixes tokenizer from this repo. Currently instantiated as generic TokenizersBackend class without pre-tokenizer and not LlamaTokenizer.

@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: auto

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! sorry this does not make sense: you need either update the tokenizer.json on the hub, or the tokenizer_config.json needs the tokenizer_class to be valid.

This IS a breaking change closer to be a fix. What might be wrong is the conversion as well. as the tokenizer return is just converted from the tokenizer.model.

@apaniukov

Copy link
Copy Markdown

Hey! sorry this does not make sense: you need either update the tokenizer.json on the hub, or the tokenizer_config.json needs the tokenizer_class to be valid.

What is a valid tokenizer class in v5 and why this class in tokenizer_config.json invalid?

@ArthurZucker

Copy link
Copy Markdown
Collaborator

Sorry my bad, in this case we should indeed follow the class. #44127 fixes it!
But we should not add Llama by default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants