Skip to content

llama : one-off chat template fix for Mistral-Small-2503 - #13398

Merged
ngxson merged 3 commits into
ggml-org:masterfrom
ngxson:xsn/oneoff_fix_mistral_tmpl
May 9, 2025
Merged

ngxson merged 3 commits into
ggml-org:masterfrom
ngxson:xsn/oneoff_fix_mistral_tmpl

Conversation

@ngxson

@ngxson ngxson commented May 9, 2025

Copy link
Copy Markdown
Collaborator

Mistral-Small-3.1-24B-Instruct-2503-GGUF does not have a default chat template, while there are already a lot of GGUF quants on the internet.

This is a one-off fix to prevent any issues that user may report about model's performance

@ngxson
ngxson requested a review from ggerganov May 9, 2025 08:03
@eskeletor97

Copy link
Copy Markdown

image
I don't know if that's correct either. V7 isn't the same as V7-tekken.
Regular V7 has spaces between sequences while tekken version doesn't. I don't know how much it impacts the performance, but it is a difference.

@ngxson

ngxson commented May 9, 2025 •

Copy link
Copy Markdown
Collaborator Author

I don't think V7-tekken even exists. Did you mean V3-tekken?

    { "mistral-v1",        LLM_CHAT_TEMPLATE_MISTRAL_V1        },
    { "mistral-v3",        LLM_CHAT_TEMPLATE_MISTRAL_V3        },
    { "mistral-v3-tekken", LLM_CHAT_TEMPLATE_MISTRAL_V3_TEKKEN },
    { "mistral-v7",        LLM_CHAT_TEMPLATE_MISTRAL_V7        },

I think mistral-small should use the same template as pixtral, though I'm not sure if it's v7 or v3

@eskeletor97

Copy link
Copy Markdown

Oh, so llama.cpp doesn't support that template? I mean it's listed in the description of the model and in their mistral-common library (they insist on using that as the ground truth).
Yes, V7-tekken exists.

@ngxson

ngxson commented May 9, 2025

Copy link
Copy Markdown
Collaborator Author

Ok thanks for the info, yes there is a diff between v7 and v7-tekken regarding the leading space, it should be correct with the latest commit

@ngxson ngxson mentioned this pull request May 9, 2025
8 tasks done
@ngxson
ngxson merged commit 3f96aef into ggml-org:master May 9, 2025
gabe-l-hart added a commit to gabe-l-hart/llama.cpp that referenced this pull request May 9, 2025
* origin/master: (39 commits)
server : vision support via libmtmd (ggml-org#12898)
sycl : implementation of reordered Q4_0 MMVQ for Intel GPUs (ggml-org#12858)
metal : optimize MoE for large batches (ggml-org#13388)
CUDA: FA support for Deepseek (Ampere or newer) (ggml-org#13306)
llama : do not crash if there is no CPU backend (ggml-org#13395)
CUDA: fix crash on large batch size for MoE models (ggml-org#13384)
imatrix : Add --parse-special for enabling parsing of special tokens in imatrix calculation (ggml-org#13389)
llama-run: add support for downloading models from ModelScope (ggml-org#13370)
mtmd : fix batch_view for m-rope (ggml-org#13397)
llama : one-off chat template fix for Mistral-Small-2503 (ggml-org#13398)
rpc : add rpc_msg_set_tensor_hash_req (ggml-org#13353)
vulkan: Allow up to 4096 elements for mul_mat_id row_ids (ggml-org#13326)
server : (webui) rename has_multimodal --> modalities (ggml-org#13393)
ci : limit write permission to only the release step + fixes (ggml-org#13392)
mtmd : Expose helper_decode_image_chunk (ggml-org#13366)
server : (webui) fix a very small misalignment (ggml-org#13387)
server : (webui) revamp the input area, plus many small UI improvements (ggml-org#13365)
convert : support rope_scaling type and rope_type (ggml-org#13349)
mtmd : fix the calculation of n_tokens for smolvlm (ggml-org#13381)
context : allow cache-less context for embeddings (ggml-org#13108)
...
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
AlexiAlp pushed a commit to minghaop/llama.cpp that referenced this pull request Jun 2, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
zommiommy pushed a commit to zommiommy/llama.cpp that referenced this pull request Aug 18, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
frostyautumnleaf pushed a commit to frostyautumnleaf/llama.cpp that referenced this pull request Oct 5, 2026
)

* llama : one-off chat template fix for Mistral-Small-2503

* update readme

* add mistral-v7-tekken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants