-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[New Model] Devstral support #6547
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
[New Model] Devstral support #6547
Conversation
Signed-off-by: Xinyuan Tong <[email protected]>
Signed-off-by: Xinyuan Tong <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: Xinyuan Tong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for the new Devstral model by pulling in its system prompt, wiring up a conversation template, and handling its tokenizer.
- Introduces utilities to locate a local HF repo and read its
SYSTEM_PROMPT.txt
- Registers a “devstral” conversation template and matching function
- Applies a temporary tokenizer fallback for Devstral in the HF Transformers helper
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
python/sglang/srt/utils.py | Added find_local_repo_dir and read_system_prompt_from_file utilities |
python/sglang/srt/hf_transformers_utils.py | Mapped Devstral tokenizer to a Mistral Instruct tokenizer |
python/sglang/srt/function_call/qwen25_detector.py | Added tool_call_separator argument in EBNF builder call |
python/sglang/srt/function_call/mistral_detector.py | Added tool_call_separator argument in EBNF builder call |
python/sglang/srt/conversation.py | Imported prompt reader; registered Devstral template and matcher |
Comments suppressed due to low confidence (1)
python/sglang/srt/utils.py:2190
- Consider adding unit tests for
find_local_repo_dir
andread_system_prompt_from_file
(including edge cases like missing cache or files) to ensure this logic remains robust.
def read_system_prompt_from_file(model_name: str) -> str:
1e42b65
to
3fafcfd
Compare
Revert change with tool detector, which would be improved in #6597 |
@JustinTong0323 Please fix lint error |
Signed-off-by: Xinyuan Tong <[email protected]>
fixed, but it seems from main? Maybe a quick fix commit to main is better for all PRs |
Serve with command:
Motivation
Modifications
Checklist