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

add token_type_ids in lm forward signature #964

Merged
merged 8 commits into from
Oct 31, 2024

Conversation

eaidova
Copy link
Collaborator

@eaidova eaidova commented Oct 24, 2024

What does this PR do?

some tokenizers e.g. for https://huggingface.co/Qwen/Qwen-7B-Chat return token_type_ids output that does not used for this task, but bring some inconvenience with passing tokenizer provided output as is in model.generate (generate validates model inputs based on forward signature and failed with
ValueError: The following model_kwargs are not used by the model: ['token_type_ids'] (note: typos in the generate arguments will also show up in this list)

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@eaidova eaidova added the openvino-test Trigger OpenVINO slow tests label Oct 28, 2024
Copy link
Collaborator

@echarlaix echarlaix left a comment

Choose a reason for hiding this comment

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

LGTM!

optimum/intel/openvino/modeling_decoder.py Show resolved Hide resolved
@echarlaix echarlaix merged commit cead516 into huggingface:main Oct 31, 2024
14 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openvino-test Trigger OpenVINO slow tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants