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

server: multimodal - fix misreported prompt and num prompt tokens #392

Merged
merged 1 commit into from May 7, 2024

Conversation

cjpais
Copy link
Contributor

@cjpais cjpais commented May 2, 2024

Ported the code from llama.cpp PR 5896

Should address llama.cpp 5852 and llama.cpp 5863

To fix, we set the number of tokens processed to it's correct value in ingest_images where the prompt is tokenized for multimodal.

Additionally a fix for the prompt being set to the empty string for multimodal responses. Basically we iteratively rebuild the initial prompt since it was cleared.

Copy link
Collaborator

@jart jart left a comment

Choose a reason for hiding this comment

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

Thank you! I was wondering about that.

@jart jart merged commit a2d159e into Mozilla-Ocho:main May 7, 2024
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.

None yet

2 participants