fuzzy-mittenz
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -132,6 +132,64 @@ You are Kaiju, a creative and motivated Intelligence given a body of flesh bone
|
|
132 |
This model was Trained with "The Key" TTT* dataset and comes close to a state change in some areas, it was converted to GGUF format from [`suayptalha/HomerCreativeAnvita-Mix-Qw7B`](https://huggingface.co/suayptalha/HomerCreativeAnvita-Mix-Qw7B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
133 |
Refer to the [original model card](https://huggingface.co/suayptalha/HomerCreativeAnvita-Mix-Qw7B) for more details on the model.
|
134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
## Use with llama.cpp
|
136 |
Install llama.cpp through brew (works on Mac and Linux)
|
137 |
|
|
|
132 |
This model was Trained with "The Key" TTT* dataset and comes close to a state change in some areas, it was converted to GGUF format from [`suayptalha/HomerCreativeAnvita-Mix-Qw7B`](https://huggingface.co/suayptalha/HomerCreativeAnvita-Mix-Qw7B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
133 |
Refer to the [original model card](https://huggingface.co/suayptalha/HomerCreativeAnvita-Mix-Qw7B) for more details on the model.
|
134 |
|
135 |
+
## Jinja chat template
|
136 |
+
|
137 |
+
```
|
138 |
+
{%- if tools %}
|
139 |
+
{{- '<|im_start|>system\n' }}
|
140 |
+
{%- if messages[0]['role'] == 'system' %}
|
141 |
+
{{- messages[0]['content'] }}
|
142 |
+
{%- else %}
|
143 |
+
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
|
144 |
+
{%- endif %}
|
145 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
146 |
+
{%- for tool in tools %}
|
147 |
+
{{- "\n" }}
|
148 |
+
{{- tool | tojson }}
|
149 |
+
{%- endfor %}
|
150 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
151 |
+
{%- else %}
|
152 |
+
{%- if messages[0]['role'] == 'system' %}
|
153 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
154 |
+
{%- else %}
|
155 |
+
{{- '<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n' }}
|
156 |
+
{%- endif %}
|
157 |
+
{%- endif %}
|
158 |
+
{%- for message in messages %}
|
159 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
160 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
161 |
+
{%- elif message.role == "assistant" %}
|
162 |
+
{{- '<|im_start|>' + message.role }}
|
163 |
+
{%- if message.content %}
|
164 |
+
{{- '\n' + message.content }}
|
165 |
+
{%- endif %}
|
166 |
+
{%- for tool_call in message.tool_calls %}
|
167 |
+
{%- if tool_call.function is defined %}
|
168 |
+
{%- set tool_call = tool_call.function %}
|
169 |
+
{%- endif %}
|
170 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
171 |
+
{{- tool_call.name }}
|
172 |
+
{{- '", "arguments": ' }}
|
173 |
+
{{- tool_call.arguments | tojson }}
|
174 |
+
{{- '}\n</tool_call>' }}
|
175 |
+
{%- endfor %}
|
176 |
+
{{- '<|im_end|>\n' }}
|
177 |
+
{%- elif message.role == "tool" %}
|
178 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
179 |
+
{{- '<|im_start|>user' }}
|
180 |
+
{%- endif %}
|
181 |
+
{{- '\n<tool_response>\n' }}
|
182 |
+
{{- message.content }}
|
183 |
+
{{- '\n</tool_response>' }}
|
184 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
185 |
+
{{- '<|im_end|>\n' }}
|
186 |
+
{%- endif %}
|
187 |
+
{%- endif %}
|
188 |
+
{%- endfor %}
|
189 |
+
{%- if add_generation_prompt %}
|
190 |
+
{{- '<|im_start|>assistant\n' }}
|
191 |
+
{%- endif %}
|
192 |
+
```
|
193 |
## Use with llama.cpp
|
194 |
Install llama.cpp through brew (works on Mac and Linux)
|
195 |
|