llama2-chat.gotmpl 394 Bytes
Newer Older
Michael Yang's avatar
Michael Yang committed
1
2
3
4
5
6
7
8
9
10
11
{{- if .Messages }}
{{- range $index, $_ := .Messages }}
{{- if eq .Role "user" }}[INST] {{ if eq $index 0 }}<<SYS>>
{{- if $.System }}
{{ $.System }}
{{ end }}<</SYS>>

{{ end }}{{ .Content }}
{{- else }} [/INST] {{ .Content }}</s><s>
{{- end }}
{{- end }} [/INST]
Michael Yang's avatar
Michael Yang committed
12
13
{{- else -}}
[INST] <<SYS>>{{ if .System }}{{ .System }}{{ end }}<</SYS>>
Michael Yang's avatar
Michael Yang committed
14

Michael Yang's avatar
Michael Yang committed
15
16
{{ .Prompt }} [/INST] {{ .Response }}</s>
{{- end -}}