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
zhaoyu6
sglang
Commits
9759d927
"vscode:/vscode.git/clone" did not exist on "7c2537941c4cafb713514540b13dcefffeca2e3d"
Unverified
Commit
9759d927
authored
Feb 24, 2024
by
Enrique Shockwave
Committed by
GitHub
Feb 24, 2024
Browse files
fix chatml template (#195)
parent
8d0a7fae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
python/sglang/lang/chat_template.py
python/sglang/lang/chat_template.py
+6
-6
No files found.
python/sglang/lang/chat_template.py
View file @
9759d927
...
...
@@ -106,9 +106,9 @@ register_chat_template(
name
=
"chatml"
,
default_system_prompt
=
None
,
role_prefix_and_suffix
=
{
"system"
:
(
"<|im_start|>system
\n
"
,
"
\n
<|im_end|>
\n
"
),
"user"
:
(
"<|im_start|>user
\n
"
,
"
\n
<|im_end|>
\n
"
),
"assistant"
:
(
"<|im_start|>assistant
\n
"
,
"
\n
<|im_end|>
\n
"
),
"system"
:
(
"<|im_start|>system
\n
"
,
"<|im_end|>
\n
"
),
"user"
:
(
"<|im_start|>user
\n
"
,
"<|im_end|>
\n
"
),
"assistant"
:
(
"<|im_start|>assistant
\n
"
,
"<|im_end|>
\n
"
),
},
style
=
ChatTemplateStyle
.
PLAIN
,
stop_str
=
(
"<|im_end|>"
,),
...
...
@@ -121,9 +121,9 @@ register_chat_template(
name
=
"chatml-llava"
,
default_system_prompt
=
"Answer the questions."
,
role_prefix_and_suffix
=
{
"system"
:
(
"<|im_start|>system
\n
"
,
"
\n
<|im_end|>
\n
"
),
"user"
:
(
"<|im_start|>user
\n
"
,
"
\n
<|im_end|>
\n
"
),
"assistant"
:
(
"<|im_start|>assistant
\n
"
,
"
\n
<|im_end|>
\n
"
),
"system"
:
(
"<|im_start|>system
\n
"
,
"<|im_end|>
\n
"
),
"user"
:
(
"<|im_start|>user
\n
"
,
"<|im_end|>
\n
"
),
"assistant"
:
(
"<|im_start|>assistant
\n
"
,
"<|im_end|>
\n
"
),
},
style
=
ChatTemplateStyle
.
PLAIN
,
stop_str
=
(
"<|im_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