-
Notifications
You must be signed in to change notification settings - Fork 205
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 Qwen2-VL static generation #1512
base: main
Are you sure you want to change the base?
Conversation
The pipeline test will not pass until optimum-habana matches the latest changes in transformers huggingface/transformers#34769, namely the task name |
Are you saying we need transformer4.47 for this to work or can you update the examples/images-to-text/run_pipeline to support both cases? |
@@ -974,14 +979,16 @@ def generate( | |||
# 1. Handle `generation_config` and kwargs that might update it, and validate the `.generate()` call | |||
self._validate_model_class() | |||
tokenizer = kwargs.pop("tokenizer", None) # Pull this out first, we only use it for stopping criteria | |||
#assistant_tokenizer = kwargs.pop("assistant_tokenizer", None) # only used for assisted generation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove all this commented out codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is also affected by transformers 4.47. Will remove or uncomment it when transformers has its v4.47.0 release & optimum habana update to match 4.47.
if hpu_graphs and not lazy_mode: | ||
raise ValueError( | ||
"`hpu_graphs` is True but `lazy_mode` is False. HPU graphs require `lazy_mode` to be set to True." | ||
) | ||
num_virtual_tokens = kwargs.pop("num_virtual_tokens", 0) | ||
generation_config, model_kwargs = self._prepare_generation_config(generation_config, **kwargs) | ||
self._validate_model_kwargs(model_kwargs.copy()) | ||
self._validate_assistant(assistant_model) | ||
#self._validate_assistant(assistant_model, tokenizer, assistant_tokenizer) | ||
self._validate_assistant(assistant_model,) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file(utils.py) change needed? please remove if it's not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
@tthakkal Could you also review this please. THanks. |
Yes. An update to latest transformers is needed here. |
What does this PR do?
Add Qwen2-VL static generation.
Before submitting