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

null grammar field after reset #3885

Merged
merged 1 commit into from
Nov 1, 2023
Merged

Conversation

l3utterfly
Copy link
Contributor

I think it's best practice to set the deleted field grammar to NULL after freeing memory.

I have a unique scenario where I'm clearing the ctx->parsed_grammar.rules manually before calling sampling_reset, so I can apply different grammars in the middle of the context. Because the grammar field was not set to NULL, subsequent sample calls crashes.

@ggerganov ggerganov merged commit e75dfdd into ggml-org:master Nov 1, 2023
@l3utterfly l3utterfly deleted the reset-grammar branch November 3, 2023 05:05
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.

2 participants