llama : fix llama_chat_format_single for mistral#8657
Merged
ngxson merged 3 commits intoggml-org:masterfrom Jul 24, 2024
Merged
llama : fix llama_chat_format_single for mistral#8657ngxson merged 3 commits intoggml-org:masterfrom
llama_chat_format_single for mistral#8657ngxson merged 3 commits intoggml-org:masterfrom
Conversation
HanClinto
approved these changes
Jul 23, 2024
Contributor
HanClinto
left a comment
There was a problem hiding this comment.
Looks good to me!
The added test is very good. Without the fix applied, I can confirm that the problem is exhibited (and the test fails), and then after applying the fix, the test passes, and behavior seems to match what's expected.
Can't ask for more than that! Nice fix! :)
llama_chat_format_single for mistralllama_chat_format_single for mistral
ggerganov
approved these changes
Jul 24, 2024
|
|
||
|
|
||
| // test llama_chat_format_single for user message | ||
| std::cout << "\n\n=== llama_chat_format_single (user message) ===\n\n"; |
Member
There was a problem hiding this comment.
nit : prefer printf over std::cout, mainly for consistency with the rest of the code
Contributor
Author
There was a problem hiding this comment.
Yup that makes sense, I changed to printf : 20f56a0
Will merge after CI pass
arthw
pushed a commit
to arthw/llama.cpp
that referenced
this pull request
Jul 27, 2024
* fix `llama_chat_format_single` for mistral * fix typo * use printf
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* fix `llama_chat_format_single` for mistral * fix typo * use printf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #8655
Fix
llama_chat_format_singleincorrectly format system message.Also added some logs and test cases for this.
The output with this PR: