-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Issue when running latest Mistral model #4948
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
Comments
Hey @fciannella Mistral Small 3.1 is not yet supported. We are in the process of supporting it. You can track updates related to it here: Model coverage |
I'm selecting VLM on low-spec computes for a use case -- happy to help if support is needed |
Hi @fciannella @adarshxs, I just created a PR branch for Mistral 3.1 Support (#5099). Currently good with text generation, single image modality and tensor parallel serving. Multi-image modality is yet to be tested. If you are interested, feel free to take a look and test it out. We'd greatly appreciate anyone's feedback. |
Thanks @KivenChen. Cc @mickqian |
Still not working for me. Can you add detailed instructions on how to run it?
I am using `python3 -m sglang.launch_server --model-path mistralai/Mistral-Small-3.1-24B-Instruct-2503 --host 0.0.0.0 --port 30000` but getting the same error as before.
…On Sun, Apr 6, 2025 at 10:37 PM Adarsh Shirawalmath < ***@***.***> wrote:
Thanks @KivenChen <https://github.com/KivenChen>. Cc @mickqian
<https://github.com/mickqian>
—
Reply to this email directly, view it on GitHub
<#4948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLQL2KBBMEQCLDKU5ZEACL2YIFKZAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBSGA3TAMBSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: adarshxs]*adarshxs* left a comment (sgl-project/sglang#4948)
<#4948 (comment)>
Thanks @KivenChen <https://github.com/KivenChen>. Cc @mickqian
<https://github.com/mickqian>
—
Reply to this email directly, view it on GitHub
<#4948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLQL2KBBMEQCLDKU5ZEACL2YIFKZAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBSGA3TAMBSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
git checkout the dev branch (kivenchen/kgl/kiv__m1stral) and pip install from source (-e) should do the job. If not, the real cause can be found in server debug-level log as "Ignore import error...". |
Perfect, the server comes up. When testing I get this error:
```
[2025-04-08 08:28:20] INFO: XX.XX.XX.XX:57854 - "POST
/v1/chat/completions HTTP/1.1" 500 Internal Server Error
[2025-04-08 08:28:20] ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/app/kgl/python/sglang/srt/openai_api/adapter.py", line 960, in
v1_chat_generate_request
prompt_ids = tokenizer_manager.tokenizer.apply_chat_template(
File
"/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py",
line 1629, in apply_chat_template
chat_template = self.get_chat_template(chat_template, tools)
File
"/usr/local/lib/python3.10/dist-packages/transformers/tokenization_utils_base.py",
line 1822, in get_chat_template
raise ValueError(
ValueError: Cannot use chat template functions because
tokenizer.chat_template is not set and no template argument was passed! For
information about writing templates and setting
the tokenizer.chat_template attribute, please see the documentation at
https://huggingface.co/docs/transformers/main/en/chat_templating
```
I am sending a request like this:
```
import openai
client = openai.Client(base_url="http://localhost:30000/v1", api_key="None")
response = client.chat.completions.create(
model="mistralai/Mistral-Small-3.1-24B-Instruct-2503",
messages=[
{"role": "user", "content": "List 3 countries and their capitals."},
],
temperature=0,
max_tokens=64,
)
print_highlight(response)
```
And I am launching the server like this:
`python3 -m sglang.launch_server --model-path
mistralai/Mistral-Small-3.1-24B-Instruct-2503 --tp-size=4 --host 0.0.0.0
--port 30000`
I am using transformers 4.51.1
On Mon, Apr 7, 2025 at 4:59 PM Kiv Chen ***@***.***> wrote:
Still not working for me. Can you add detailed instructions on how to run
it?
I am using python3 -m sglang.launch_server --model-path
mistralai/Mistral-Small-3.1-24B-Instruct-2503 --host 0.0.0.0 --port 30000
but getting the same error as before.
On Sun, Apr 6, 2025 at 10:37 PM Adarsh Shirawalmath <
*@*.***> wrote:
Thanks @KivenChen <https://github.com/KivenChen>
https://github.com/KivenChen. Cc @mickqian <https://github.com/mickqian>
https://github.com/mickqian
—
Reply to this email directly, view it on GitHub
#4948 (comment)
<#4948 (comment)>
,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACLQL2KBBMEQCLDKU5ZEACL2YIFKZAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBSGA3TAMBSG4
.
You are receiving this because you were mentioned.Message ID:
*@*.***>
[image: adarshxs]*adarshxs* left a comment (#4948
<#4948>)
#4948 (comment)
<#4948 (comment)>
Thanks @KivenChen <https://github.com/KivenChen>
https://github.com/KivenChen. Cc @mickqian <https://github.com/mickqian>
https://github.com/mickqian
—
Reply to this email directly, view it on GitHub
#4948 (comment)
<#4948 (comment)>
,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACLQL2KBBMEQCLDKU5ZEACL2YIFKZAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBSGA3TAMBSG4
.
You are receiving this because you were mentioned.Message ID:
*@*.***>
git checkout the dev branch (kivenchen/kgl/kiv__m1stral) and pip install
from source (-e) should do the job. If not, the real cause can be found in
server debug-level log as "Ignore import error...".
—
Reply to this email directly, view it on GitHub
<#4948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLQL2O2IXRNBBN3NY6V2OL2YMGONAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBUHA4DQNZZHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: KivenChen]*KivenChen* left a comment (sgl-project/sglang#4948)
<#4948 (comment)>
Still not working for me. Can you add detailed instructions on how to run
it?
I am using python3 -m sglang.launch_server --model-path
mistralai/Mistral-Small-3.1-24B-Instruct-2503 --host 0.0.0.0 --port 30000
but getting the same error as before.
On Sun, Apr 6, 2025 at 10:37 PM Adarsh Shirawalmath <
*@*.***> wrote:
Thanks @KivenChen <https://github.com/KivenChen>
https://github.com/KivenChen. Cc @mickqian <https://github.com/mickqian>
https://github.com/mickqian
—
Reply to this email directly, view it on GitHub
#4948 (comment)
<#4948 (comment)>
,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACLQL2KBBMEQCLDKU5ZEACL2YIFKZAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBSGA3TAMBSG4
.
You are receiving this because you were mentioned.Message ID:
*@*.***>
[image: adarshxs]*adarshxs* left a comment (#4948
<#4948>)
#4948 (comment)
<#4948 (comment)>
Thanks @KivenChen <https://github.com/KivenChen>
https://github.com/KivenChen. Cc @mickqian <https://github.com/mickqian>
https://github.com/mickqian
—
Reply to this email directly, view it on GitHub
#4948 (comment)
<#4948 (comment)>
,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACLQL2KBBMEQCLDKU5ZEACL2YIFKZAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBSGA3TAMBSG4
.
You are receiving this because you were mentioned.Message ID:
*@*.***>
git checkout the dev branch (kivenchen/kgl/kiv__m1stral) and pip install
from source (-e) should do the job. If not, the real cause can be found in
server debug-level log as "Ignore import error...".
—
Reply to this email directly, view it on GitHub
<#4948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLQL2O2IXRNBBN3NY6V2OL2YMGONAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBUHA4DQNZZHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
When using mistral 3.0 I was not having any of these issues.
|
@fciannella It seems the chat template isn't registered successfully. You can either:
|
Works for me now (I only use it for text for now). Thank you so much! |
Is structured output working for you? I am always getting a None as reply
when trying structured output.
…On Tue, Apr 8, 2025 at 12:23 PM Kiv Chen ***@***.***> wrote:
@fciannella <https://github.com/fciannella> It seems the chat template
isn't registered. The repo does have a chat_template.json but it's
actually Jinja format.
You can either
1. add "--chat-template llama-2" to command. It's compatible.
2. copy that format string in chat_template.json, print it (so that we
get rid of \ns), put the content into some
converted_chat_template.jinja, and use "--chat-template
converted_chat_template.jinja"
—
Reply to this email directly, view it on GitHub
<#4948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLQL2MHSFPHRDGD35EHAZL2YQO3DAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBXGQ2TGOBXGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
*KivenChen* left a comment (sgl-project/sglang#4948)
<#4948 (comment)>
@fciannella <https://github.com/fciannella> It seems the chat template
isn't registered. The repo does have a chat_template.json but it's
actually Jinja format.
You can either
1. add "--chat-template llama-2" to command. It's compatible.
2. copy that format string in chat_template.json, print it (so that we
get rid of \ns), put the content into some
converted_chat_template.jinja, and use "--chat-template
converted_chat_template.jinja"
—
Reply to this email directly, view it on GitHub
<#4948 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACLQL2MHSFPHRDGD35EHAZL2YQO3DAVCNFSM6AAAAAB2ES54YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBXGQ2TGOBXGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Haven't tested yet. Since Mistral has their own standards, did their docs mention anything special? |
FYI using tools doesn't work with the branch as-is. |
@justicel It seems this involves sglang's tool call parsers, same for structured output @fciannella. I'll be back with details. Meanwhile I'm working on clearing mistral 3.1's upstream dependencies. #5084 |
SGL actually have Mistral tool call parser. Have you tried this tool calling template? |
FYI structured output works as expected tested with official example |
Uh oh!
There was an error while loading. Please reload this page.
I am trying to run mistralai/Mistral-Small-3.1-24B-Instruct-2503
I am getting this error:
Is it a support issue or it is just about updating some files? The 2501 version was working!
The text was updated successfully, but these errors were encountered: