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 : fix crash when prompt exceeds context size #3996

Merged
merged 1 commit into from
Nov 11, 2023

Conversation

z80maniac
Copy link
Contributor

This fixes #3817.

In the current version a prompt gets properly truncated only when the cache_prompt is set. This PR just moves the entire truncation logic up one level, so now the prompt gets always truncated if it exceeds the context size.

Verified

This commit was signed with the committer’s verified signature.
jcubic Jakub T. Jankiewicz
@jhen0409 jhen0409 merged commit d96ca7d into ggml-org:master Nov 11, 2023
olexiyb pushed a commit to Sanctum-AI/llama.cpp that referenced this pull request Nov 23, 2023
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.

server crashes when prompt exceeds context size
2 participants