Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use fallback config if class not defined #53

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Use fallback config if class not defined #53

merged 1 commit into from
Feb 29, 2024

Conversation

pcuenca
Copy link
Member

@pcuenca pcuenca commented Feb 29, 2024

Fixes distilgpt2 tokenization.

Previously, we only used the fallback configuration if there was no tokenizer_config.json in the model repo. These files are now being added to some repos in the context of removing dependencies with transformers' internals, like this PR:
huggingface/transformers#29112. But only keys removed from the hardcoded rules are being added to minimize potential breaking changes.

We now use the fallback config if tokenizer_config.json exists, no tokenizer class is specified, and we do have a fallback config for this architecture.

Fixes distilgpt2 tokenization.

Previously, we only used the fallback configuration if there was no
`tokenizer_config.json` in the model repo. These files are now being
added to some repos in the context of removing dependencies with
transformers' internals, like this PR:
huggingface/transformers#29112. But only keys
removed from the hardcoded rules are being added to minimize potential
breaking changes.

We now use the fallback config if tokenizer_config.json exists, no
tokenizer class is specified, and we do have a fallback config for this
architecture.
@pcuenca pcuenca merged commit 03d86ac into main Feb 29, 2024
@pcuenca pcuenca deleted the gpt2-fix branch February 29, 2024 16:34
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.

1 participant