Merge pull request #3846 from invisietch/staging chore: add llama 4 chat templates & separate system from user role in chat template for llama 3

57d30dae598db47758b5222798fe1bffc4e23d8f

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
4 files changed, +42 -1Showing whitespace changes
default/content/index.json+8 -0
@@ -564,6 +564,10 @@
564564 "type": "context"
565565 },
566566 {
567+ "filename": "presets/context/Llama 4 Instruct.json",
568+ "type": "context"
569+ },
570+ {
567571 "filename": "presets/context/Phi.json",
568572 "type": "context"
569573 },
@@ -664,6 +668,10 @@
664668 "type": "instruct"
665669 },
666670 {
671+ "filename": "presets/instruct/Llama 4 Instruct.json",
672+ "type": "instruct"
673+ },
674+ {
667675 "filename": "presets/instruct/Phi.json",
668676 "type": "instruct"
669677 },
default/content/presets/context/Llama 4 Instruct.json+11 -0
@@ -0,0 +1,11 @@
1+{
2+ "story_string": "<|begin_of_text|><|header_start|>system<|header_end|>\n\n{{#if system}}{{system}}\n{{/if}}{{#if wiBefore}}{{wiBefore}}\n{{/if}}{{#if description}}{{description}}\n{{/if}}{{#if personality}}{{char}}'s personality: {{personality}}\n{{/if}}{{#if scenario}}Scenario: {{scenario}}\n{{/if}}{{#if wiAfter}}{{wiAfter}}\n{{/if}}{{#if persona}}{{persona}}\n{{/if}}{{trim}}<|eot|>",
3+ "example_separator": "",
4+ "chat_start": "",
5+ "use_stop_strings": false,
6+ "allow_jailbreak": false,
7+ "always_force_name2": true,
8+ "trim_sentences": false,
9+ "single_line": false,
10+ "name": "Llama 4 Instruct"
11+}
default/content/presets/instruct/Llama 3 Instruct.json+1 -1
@@ -16,7 +16,7 @@
1616 "input_suffix": "<|eot_id|>",
1717 "system_suffix": "<|eot_id|>",
1818 "user_alignment_message": "",
1919 "system_same_as_user": truefalse,
2020 "last_system_sequence": "",
2121 "name": "Llama 3 Instruct"
2222}
default/content/presets/instruct/Llama 4 Instruct.json+22 -0
@@ -0,0 +1,22 @@
1+{
2+ "input_sequence": "<|header_start|>user<|header_end|>\n\n",
3+ "output_sequence": "<|header_start|>assistant<|header_end|>\n\n",
4+ "last_output_sequence": "",
5+ "system_sequence": "<|header_start|>system<|header_end|>\n\n",
6+ "stop_sequence": "<|eot|>",
7+ "wrap": false,
8+ "macro": true,
9+ "names_behavior": "always",
10+ "activation_regex": "",
11+ "system_sequence_prefix": "",
12+ "system_sequence_suffix": "",
13+ "first_output_sequence": "",
14+ "skip_examples": false,
15+ "output_suffix": "<|eot|>",
16+ "input_suffix": "<|eot|>",
17+ "system_suffix": "<|eot|>",
18+ "user_alignment_message": "",
19+ "system_same_as_user": false,
20+ "last_system_sequence": "",
21+ "name": "Llama 4 Instruct"
22+}