Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
3d1cb0af
Unverified
Commit
3d1cb0af
authored
Jul 30, 2024
by
Yineng Zhang
Committed by
GitHub
Jul 30, 2024
Browse files
feat: add chat template for internlm2-chat (#802)
parent
7d352b4f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
python/sglang/srt/conversation.py
python/sglang/srt/conversation.py
+11
-0
No files found.
python/sglang/srt/conversation.py
View file @
3d1cb0af
...
@@ -436,3 +436,14 @@ register_conv_template(
...
@@ -436,3 +436,14 @@ register_conv_template(
sep2
=
"</s>"
,
sep2
=
"</s>"
,
)
)
)
)
# Reference: https://github.com/InternLM/lmdeploy/blob/387bf54b4f124e72aab30ae9755f562e435d3d01/lmdeploy/model.py#L425-L442
register_conv_template
(
Conversation
(
name
=
"internlm2-chat"
,
system_template
=
"<|im_start|>system
\n
{system_message}"
,
roles
=
(
"<|im_start|>user"
,
"<|im_start|>assistant"
),
sep
=
"
\n
"
,
stop_str
=
[
"<|im_end|>"
,
"<|action_end|>"
],
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment