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 Parameter to Control Input Length in run_pipeline.py for Image-to-Text Examples #1669

Open
kalyank007 opened this issue Dec 26, 2024 · 2 comments

Comments

@kalyank007
Copy link

I would like to request the addition of a parameter to control the input length in the run_pipeline.py script for image-to-text examples. This would allow users to specify how the input sequences are padded or truncated, making the script more flexible for different use cases.

If --max_input_tokens > 0: Pad and truncate input sequences to the specified number of tokens.
If --max_input_tokens == 0 (default): default behavior, Do not truncate input sequences and use the full input prompt.

The primary motivation for this feature request is to enable benchmarking of the run_pipeline.py script for various input and output token lengths. Currently, the script uses a fixed length for default input, limiting its flexibility for benchmarking use cases. By introducing a parameter to control the input length, users can measure the script's performance with different input lengths to better understand how token length impacts runtime, memory usage, and overall throughput.

@kalyank007
Copy link
Author

@sywangyi, Could you please take a look at this issue. Let me know if you need any clarification or additional details. Your support on this is much appreciated!

@sywangyi
Copy link
Collaborator

truncate will not be used, since it may delete the image token id by mistake

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

No branches or pull requests

2 participants