-
Notifications
You must be signed in to change notification settings - Fork 650
Support custom processor args in ModelParams
#1634
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
Conversation
processor args in ModelParamsprocessor args in ModelParams
| Processors are used in Oumi for vision-language models to process image and | ||
| text inputs. This field is optional and can be left empty for text-only models, | ||
| or if 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.
nit: consider mentioning that they'll override model-specific default values for these kwargs, if present.
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.
updated
| raise ValueError( | ||
| "processor_kwargs attempts to override the following " | ||
| f"reserved fields: {conflicting_keys}. " | ||
| "Use properties of ModelParams instead." |
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.
As far as I can tell, is trust_remote_code the only ModelParams property which is used in processor creation? Is there a chance of any false errors here, where a kwarg key conflicts with a ModelParams property, but that property isn't used in processor creation?
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 validation logic is a bit inexact but should work in practice (we can always modify it if it something unexpected happens )
This is also based on two existing precedents: https://github.com/search?q=repo%3Aoumi-ai%2Foumi%20conflicting_keys&type=code
Description
-- Update
ModelParamsto includeprocessor_args-- Update
build_processor()and most of its invocations, exceptvision_language_conversation_feature_generator.py, which will be handled as a follow-up (it's a more involved change)Related issues
Towards OPE-1185
Before submitting
Reviewers
At least one review from a member of
oumi-ai/oumi-staffis required.