summaryrefslogtreecommitdiff
path: root/llama.cpp/models/templates/llama-cpp-rwkv-world.jinja
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
committerMitja Felicijan <mitja.felicijan@gmail.com>2026-02-12 20:57:17 +0100
commitb333b06772c89d96aacb5490d6a219fba7c09cc6 (patch)
tree211df60083a5946baa2ed61d33d8121b7e251b06 /llama.cpp/models/templates/llama-cpp-rwkv-world.jinja
downloadllmnpc-b333b06772c89d96aacb5490d6a219fba7c09cc6.tar.gz
Engage!
Diffstat (limited to 'llama.cpp/models/templates/llama-cpp-rwkv-world.jinja')
-rw-r--r--llama.cpp/models/templates/llama-cpp-rwkv-world.jinja34
1 files changed, 34 insertions, 0 deletions
diff --git a/llama.cpp/models/templates/llama-cpp-rwkv-world.jinja b/llama.cpp/models/templates/llama-cpp-rwkv-world.jinja
new file mode 100644
index 0000000..690223f
--- /dev/null
+++ b/llama.cpp/models/templates/llama-cpp-rwkv-world.jinja
@@ -0,0 +1,34 @@
+{%- if not add_generation_prompt is defined -%}
+ {%- set add_generation_prompt = true -%}
+{%- endif -%}
+{%- set ns = namespace(system_prompt='') -%}
+{%- for message in messages -%}
+ {%- if message['role'] == 'system' -%}
+ {%- set ns.system_prompt = message['content'] -%}
+ {%- endif -%}
+{%- endfor -%}
+{{bos_token}}
+{%- if ns.system_prompt != '' -%}
+{{- 'System: ' + ns.system_prompt + '\n\n' -}}
+{%- endif -%}
+{%- for message in messages -%}
+ {%- if message['role'] == 'user' -%}
+ {{- 'User: ' + message['content']|trim + '\n\n' -}}
+ {%- endif -%}
+ {%- if message['role'] == 'assistant' and message['content'] is not none -%}
+ {%- set content = message['content'] -%}
+ {%- if '</think>' in content -%}
+ {%- set content = content.split('</think>')[-1] -%}
+ {%- endif -%}
+ {{- 'Assistant: ' + content|trim + '\n\n' -}}
+ {%- endif -%}
+{%- endfor -%}
+{%- if add_generation_prompt -%}
+ {{- 'Assistant:' -}}
+ {%- if enable_thinking is defined and enable_thinking is false %}
+ {{- ' <think>\n</think>' }}
+ {%- endif %}
+ {%- if enable_thinking is defined and enable_thinking is true %}
+ {{- ' <think>' }}
+ {%- endif %}
+{%- endif -%} \ No newline at end of file