File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
src/unitxt/catalog/formats Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 22from unitxt .formats import SystemFormat
33
44format = SystemFormat (
5- demo_format = "{source}\n {target_prefix}{target}\n \n " ,
6- model_input_format = "{system_prompt}{instruction}{demos}{source}\n {target_prefix}" ,
5+ demo_format = "{source}\\ N {target_prefix}{target}\n \n " ,
6+ model_input_format = "{system_prompt}\\ N {instruction}\\ N {demos}{source}\\ N {target_prefix}" ,
77)
88
99add_to_catalog (format , "formats.empty" , overwrite = True )
Original file line number Diff line number Diff line change 99# {{ user_msg_1 }} [/INST] {{ model_answer_1 }} </s><s>[INST] {{ user_msg_2 }} [/INST]
1010format = SystemFormat (
1111 demo_format = "{source} [/INST] {target_prefix}{target} </s><s>[INST] " ,
12- model_input_format = "[INST] <<SYS>>\n {system_prompt}\n \n {instruction}<<SYS>>\n \n \n {demos}{source} [/INST]{target_prefix}" ,
12+ model_input_format = "[INST] <<SYS>>\n {system_prompt}\\ N {instruction}<</ SYS>>\n \n \n {demos}{source} [/INST] {target_prefix}" ,
1313)
1414
1515add_to_catalog (format , "formats.llama2" , overwrite = True )
Original file line number Diff line number Diff line change 11{
22 "type" : " system_format" ,
3- "demo_format" : " {source}\n {target_prefix}{target}\n\n " ,
4- "model_input_format" : " {system_prompt}{instruction}{demos}{source}\n {target_prefix}"
3+ "demo_format" : " {source}\\ N {target_prefix}{target}\n\n " ,
4+ "model_input_format" : " {system_prompt}\\ N {instruction}\\ N {demos}{source}\\ N {target_prefix}"
55}
Original file line number Diff line number Diff line change 11{
22 "type" : " system_format" ,
33 "demo_format" : " {source} [/INST] {target_prefix}{target} </s><s>[INST] " ,
4- "model_input_format" : " [INST] <<SYS>>\n {system_prompt}\n\n {instruction}<<SYS>>\n\n\n {demos}{source} [/INST]{target_prefix}"
4+ "model_input_format" : " [INST] <<SYS>>\n {system_prompt}\\ N {instruction}<</ SYS>>\n\n\n {demos}{source} [/INST] {target_prefix}"
55}
You can’t perform that action at this time.
0 commit comments