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

Fixed json strings grammar by blacklisting character control set #5888

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

ExtReMLapin
Copy link
Contributor

@ExtReMLapin ExtReMLapin commented Mar 5, 2024

This time it works.

At the first try I tried to disable only \n, which made appear quickly \r, and after brutforcing jsons for 30mins It gave me an error on a 0x1B character.

For curious people, I was using mistral 7b 0.2 instruct.

Initial incomplete fix : #5885

@ExtReMLapin
Copy link
Contributor Author

I'll let run my "bruteforce" script for some time before marking it as ready for review

(Generating jsons in a loop and trying to parse it in python)

@ExtReMLapin ExtReMLapin marked this pull request as ready for review March 5, 2024 15:22
@ExtReMLapin
Copy link
Contributor Author

Good to go this time !

@ggerganov ggerganov merged commit 3de3167 into ggerganov:master Mar 5, 2024
12 checks passed
@ExtReMLapin ExtReMLapin deleted the fixed-json-strings-grammar branch March 5, 2024 17:17
hazelnutcloud pushed a commit to hazelnutcloud/llama.cpp that referenced this pull request Mar 10, 2024
* Prevent control characters from being served in json string

* Prevent control characters from being served in json string (array)
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this pull request Mar 13, 2024
* Prevent control characters from being served in json string

* Prevent control characters from being served in json string (array)
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
* Prevent control characters from being served in json string

* Prevent control characters from being served in json string (array)
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.

3 participants