twnvy/ edge-lm:latest

21 5 months ago

A token-efficient thinking model that rivals the CoT of much larger models with only 3 billion parameters.

thinking
47b45d398494 · 542B
{{- if .System }}{{ .System }}{{ end }}
{{- range $i, $_ := .Messages }}
{{- $last := eq (len (slice $.Messages $i)) 1}}
{{- if eq .Role "user" }}<|start_header_id|>user<|end_header_id|>
{{ .Content }}<|eot_id|>
{{- else if eq .Role "assistant" }}<|start_header_id|>assistant<|end_header_id|>
{{- if and $last .Thinking }}
<think>
{{ .Thinking }}
</think>
{{- end }}
{{ .Content }}<|eot_id|>
{{- end }}
{{- if and $last (ne .Role "assistant") }}<|start_header_id|>assistant<|end_header_id|>
<think>
{{- end }}
{{- end }}