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 @@
564 "type": "context"564 "type": "context"
565 },565 },
566 {566 {
567 "filename": "presets/context/Llama 4 Instruct.json",
568 "type": "context"
569 },
570 {
567 "filename": "presets/context/Phi.json",571 "filename": "presets/context/Phi.json",
568 "type": "context"572 "type": "context"
569 },573 },
@@ -664,6 +668,10 @@
664 "type": "instruct"668 "type": "instruct"
665 },669 },
666 {670 {
671 "filename": "presets/instruct/Llama 4 Instruct.json",
672 "type": "instruct"
673 },
674 {
667 "filename": "presets/instruct/Phi.json",675 "filename": "presets/instruct/Phi.json",
668 "type": "instruct"676 "type": "instruct"
669 },677 },
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 @@
16 "input_suffix": "<|eot_id|>",16 "input_suffix": "<|eot_id|>",
17 "system_suffix": "<|eot_id|>",17 "system_suffix": "<|eot_id|>",
18 "user_alignment_message": "",18 "user_alignment_message": "",
19 "system_same_as_user": true,19 "system_same_as_user": false,
20 "last_system_sequence": "",20 "last_system_sequence": "",
21 "name": "Llama 3 Instruct"21 "name": "Llama 3 Instruct"
22}22}
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}