Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 09b798c

Browse files
authored
Merge pull request #18 from dave-gray101/llama2-chat-template
update chat message template
2 parents 0ffecda + 5890977 commit 09b798c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llama2-chat.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ prompt_templates:
2626
content: |
2727
{{if eq .RoleName "assistant"}}{{.Content}}{{else}}
2828
[INST]
29-
{{if .SystemPrompt}}{{.SystemPrompt}}{{else if eq .RoleName "system"}}<<SYS>>{{.Content}}<</SYS>>
30-
31-
{{else if .Content}}{{.Content}}{{end}}
29+
{{if eq .RoleName "system"}}<<SYS>>{{.Content}}<</SYS>>{{else if and (.SystemPrompt) (eq .MessageIndex 0)}}<<SYS>>{{.SystemPrompt}}<</SYS>>{{end}}
30+
{{if .Content}}{{.Content}}{{end}}
3231
[/INST]
3332
{{end}}

0 commit comments

Comments
 (0)