-
Notifications
You must be signed in to change notification settings - Fork 286
preserve properties from allowlist in Tokenizer #2604
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
preserve properties from allowlist in Tokenizer #2604
Conversation
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.
Pull Request Overview
This PR updates the tokenizer implementation to preserve selected properties from a whitelist instead of clearing all properties. The change allows specific OpenVINO hints and configuration options to be passed through to the tokenizer/detokenizer models on CPU.
- Introduces a
filter_properties
method that maintains only whitelisted properties - Replaces the previous behavior of clearing all properties with selective filtering
- Updates the comment to reflect the new filtering approach
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
properties = {}; | ||
// Filter properties by leaving only params from the allowlist | ||
filter_properties(properties); |
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.
This overload doesn't have a path so enable_save_ov_model
should result in failure. I think you shouldn't filter properties
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.
You shouldn't filter*
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.
If we don't filter, and allow all properties to pass to 'CPU' then it fails because cpu plugin
2025-08-12T13:35:28.4948146Z E Exception from src/inference/src/dev/plugin.cpp:53:
2025-08-12T13:35:28.4948893Z E Exception from src/plugins/intel_cpu/src/config.cpp:457:
2025-08-12T13:35:28.4949480Z E NotFound: Unsupported property NPUW_DEVICES by CPU plugin.
...
2025-08-12T13:35:28.4924214Z E Exception from src/plugins/intel_cpu/src/config.cpp:457:
2025-08-12T13:35:28.4924878Z E NotFound: Unsupported property prompt_lookup by CPU plugin.
...
and so on. We should leave only properties which core.compile_model(ov_[de]tokenizer, properties)
can handle.
I also didn't quite understand bout saved model. At this point regardless of whether i filter or we don't have 'enable_save_ov_model'
in properties. Could you please elaborate what did you mean?
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.
If there's no enable_save_ov_model
, what property leads to the exception?
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.
At least 3 arguments above NPUW_DEVICES
, prompt_lookup
, draft_model
, probably some more
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 guess that should do for now. But this is not a full list of valid properties. It will need to be converted to a black list instead of white list in the next PR because it's easier to resolve a problem reported as an error rather then just observe perf degradation.
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.
Agree with you
Co-authored-by: Copilot <[email protected]>
Ticket 172236 |
No description provided.