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

fix(llama.cpp): disable infinite context shifting #1704

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

mudler
Copy link
Owner

@mudler mudler commented Feb 13, 2024

Infinite context loop might as well trigger an infinite loop of context shifting if the model hallucinates and does not stop answering. This has the unpleasant effect that the prediction never terminates, which is the case especially on small models which tends to hallucinate. The behavior is observable when the assigned slot exceed the context size, which triggers context shifting, and can be reproduced by specifying a really small context size window.

Workarounds #1333 by removing context-shifting until it is fixed upstream.

See also upstream issue: ggerganov/llama.cpp#3969

Copy link

netlify bot commented Feb 13, 2024

Deploy Preview for localai canceled.

Name Link
🔨 Latest commit 22f8902
🔍 Latest deploy log https://app.netlify.com/sites/localai/deploys/65cbadc119fb0100088729d5

Infinite context loop might as well trigger an infinite loop of context
shifting if the model hallucinates and does not stop answering.
This has the unpleasant effect that the predicion never terminates,
which is the case especially on small models which tends to hallucinate.

Workarounds #1333 by removing
context-shifting.

See also upstream issue: ggerganov/llama.cpp#3969
@mudler mudler added bug Something isn't working upstream issue labels Feb 13, 2024
@mudler mudler merged commit c56b6dd into master Feb 13, 2024
26 checks passed
@mudler mudler deleted the disable_context_shift branch February 13, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant