@@ -5,8 +5,20 @@ import type { OllamaChatTemplateMapEntry } from "./types";
5
5
6
6
/**
7
7
* Skipped these models due to error:
8
- * - library/llama3:70b
9
- * - library/mistrallite:7b
8
+ * - library/gemma3:12b
9
+ * - library/llama3.3:70b-instruct-fp16
10
+ * - library/llama3.3:70b
11
+ * - library/llama3.1:8b
12
+ * - library/llama3.1:70b
13
+ * - library/llama3.1:8b-instruct-fp16
14
+ * - library/llama3.2-vision:11b
15
+ * - library/mistral-nemo:12b-instruct-2407-q2_K
16
+ * - library/llava:34b
17
+ * - library/deepcoder:1.5b-preview-fp16
18
+ * - library/firefunction-v2:70b
19
+ * - library/yi-coder:1.5b-base-fp16
20
+ * - library/tulu3:70b
21
+ * - library/command-a:111b-03-2025-fp16
10
22
*/
11
23
12
24
export const OLLAMA_CHAT_TEMPLATE_MAPPING : OllamaChatTemplateMapEntry [ ] = [
@@ -756,6 +768,17 @@ export const OLLAMA_CHAT_TEMPLATE_MAPPING: OllamaChatTemplateMapEntry[] = [
756
768
} ,
757
769
} ,
758
770
} ,
771
+ {
772
+ model : "library/mistral:7b-instruct-fp16" ,
773
+ gguf : "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token + ' ' }}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}" ,
774
+ ollama : {
775
+ template : "[INST] {{ .System }} {{ .Prompt }} [/INST]\n" ,
776
+ tokens : [ "[INST]" ] ,
777
+ params : {
778
+ stop : [ "[INST]" , "[/INST]" ] ,
779
+ } ,
780
+ } ,
781
+ } ,
759
782
{
760
783
model : "library/mixtral:8x22b" ,
761
784
gguf : "{%- if messages[0]['role'] == 'system' %}\n {%- set system_message = messages[0]['content'] %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set loop_messages = messages %}\n{%- endif %}\n\n{{- bos_token }}\n{%- for message in loop_messages %}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}\n {{- raise_exception('After the optional system message, conversation roles must alternate user/assistant/user/assistant/...') }}\n {%- endif %}\n {%- if message['role'] == 'user' %}\n {%- if loop.last and system_message is defined %}\n {{- '[INST] ' + system_message + '\\n\\n' + message['content'] + '[/INST]' }}\n {%- else %}\n {{- '[INST] ' + message['content'] + '[/INST]' }}\n {%- endif %}\n {%- elif message['role'] == 'assistant' %}\n {{- ' ' + message['content'] + eos_token}}\n {%- else %}\n {{- raise_exception('Only user and assistant roles are supported, with the exception of an initial optional system message!') }}\n {%- endif %}\n{%- endfor %}\n" ,
0 commit comments