Skip to content

Added Prompt length check for VLMs #422

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

asmigosw
Copy link
Contributor

Prompt length needs to be greater than the decoded image tokens + buffer, so in case user passes PL to be less than this value, VLM inference was failing, hence added a check to update the PL and CL accordingly.

Signed-off-by: Asmita Goswami <[email protected]>
f"Increasing increase the prompt length to at least {total_tokens + prompt_len}."
)
prompt_len = total_tokens + prompt_len
ctx_len = prompt_len + 50
Copy link
Contributor

Choose a reason for hiding this comment

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

from where this 50 is coming?

@asmigosw asmigosw marked this pull request as draft May 21, 2025 08:15
asmigosw added 3 commits May 21, 2025 08:29
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
Signed-off-by: Asmita Goswami <[email protected]>
@asmigosw asmigosw marked this pull request as ready for review May 21, 2025 08:35
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

Successfully merging this pull request may close these issues.

2 participants