salamandra-2b-instruct_tools / tokenizer_config.json
Ankush
add model exp6.1
741cd32
{
"add_bos_token": true,
"add_eos_token": false,
"add_prefix_space": false,
"added_tokens_decoder": {
"0": {
"content": "<unk>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"1": {
"content": "<s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"2": {
"content": "</s>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"3": {
"content": "<pad>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"4": {
"content": "<|im_start|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"5": {
"content": "<|im_end|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"6": {
"content": "<|reserved_token_1|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"7": {
"content": "<|reserved_token_2|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"8": {
"content": "<|reserved_token_3|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"9": {
"content": "<|reserved_token_4|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"10": {
"content": "<|reserved_token_5|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"11": {
"content": "<|reserved_token_6|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"12": {
"content": "<|reserved_token_7|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"13": {
"content": "<|reserved_token_8|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"14": {
"content": "<|reserved_token_9|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"15": {
"content": "<|reserved_token_10|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"16": {
"content": "<|reserved_token_11|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"17": {
"content": "<|reserved_token_12|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"18": {
"content": "<|reserved_token_13|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"19": {
"content": "<|reserved_token_14|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"20": {
"content": "<|reserved_token_15|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"21": {
"content": "<|reserved_token_16|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"22": {
"content": "<|reserved_token_17|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"23": {
"content": "<|reserved_token_18|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"24": {
"content": "<|reserved_token_19|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"25": {
"content": "<|reserved_token_20|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"26": {
"content": "<|reserved_token_21|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"27": {
"content": "<|reserved_token_22|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"28": {
"content": "<|reserved_token_23|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"29": {
"content": "<|reserved_token_24|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"30": {
"content": "<|reserved_token_25|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"31": {
"content": "<|reserved_token_26|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"32": {
"content": "<|reserved_token_27|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"33": {
"content": "<|reserved_token_28|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"34": {
"content": "<|reserved_token_29|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"35": {
"content": "<|reserved_token_30|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"36": {
"content": "<|reserved_token_31|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"37": {
"content": "<|reserved_token_32|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"38": {
"content": "<|reserved_token_33|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"39": {
"content": "<|reserved_token_34|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"40": {
"content": "<|reserved_token_35|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"41": {
"content": "<|reserved_token_36|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"42": {
"content": "<|reserved_token_37|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"43": {
"content": "<|reserved_token_38|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"44": {
"content": "<|reserved_token_39|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"45": {
"content": "<|reserved_token_40|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"46": {
"content": "<|reserved_token_41|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"47": {
"content": "<|reserved_token_42|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"48": {
"content": "<|reserved_token_43|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"49": {
"content": "<|reserved_token_44|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"50": {
"content": "<|reserved_token_45|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"51": {
"content": "<|reserved_token_46|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"52": {
"content": "<|reserved_token_47|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"53": {
"content": "<|reserved_token_48|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"54": {
"content": "<|reserved_token_49|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"55": {
"content": "<|reserved_token_50|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"56": {
"content": "<|reserved_token_51|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"57": {
"content": "<|reserved_token_52|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"58": {
"content": "<|reserved_token_53|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"59": {
"content": "<|reserved_token_54|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"60": {
"content": "<|reserved_token_55|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"61": {
"content": "<|reserved_token_56|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"62": {
"content": "<|reserved_token_57|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"63": {
"content": "<|reserved_token_58|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"64": {
"content": "<|reserved_token_59|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"65": {
"content": "<|reserved_token_60|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"66": {
"content": "<|reserved_token_61|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"67": {
"content": "<|reserved_token_62|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"68": {
"content": "<|reserved_token_63|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"69": {
"content": "<|reserved_token_64|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"70": {
"content": "<|reserved_token_65|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"71": {
"content": "<|reserved_token_66|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"72": {
"content": "<|reserved_token_67|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"73": {
"content": "<|reserved_token_68|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"74": {
"content": "<|reserved_token_69|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"75": {
"content": "<|reserved_token_70|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"76": {
"content": "<|reserved_token_71|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"77": {
"content": "<|reserved_token_72|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"78": {
"content": "<|reserved_token_73|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"79": {
"content": "<|reserved_token_74|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"80": {
"content": "<|reserved_token_75|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"81": {
"content": "<|reserved_token_76|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"82": {
"content": "<|reserved_token_77|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"83": {
"content": "<|reserved_token_78|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"84": {
"content": "<|reserved_token_79|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"85": {
"content": "<|reserved_token_80|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"86": {
"content": "<|reserved_token_81|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"87": {
"content": "<|reserved_token_82|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"88": {
"content": "<|reserved_token_83|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"89": {
"content": "<|reserved_token_84|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"90": {
"content": "<|reserved_token_85|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"91": {
"content": "<|reserved_token_86|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"92": {
"content": "<|reserved_token_87|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"93": {
"content": "<|reserved_token_88|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"94": {
"content": "<|reserved_token_89|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"95": {
"content": "<|reserved_token_90|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"96": {
"content": "<|reserved_token_91|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"97": {
"content": "<|reserved_token_92|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"98": {
"content": "<|reserved_token_93|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"99": {
"content": "<|reserved_token_94|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"100": {
"content": "<|reserved_token_95|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"101": {
"content": "<|reserved_token_96|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"102": {
"content": "<|reserved_token_97|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"103": {
"content": "<|reserved_token_98|>",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": true
},
"104": {
"content": "\\r",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"105": {
"content": "▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"106": {
"content": "▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"107": {
"content": "▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"108": {
"content": "▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"109": {
"content": "▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"110": {
"content": "▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"111": {
"content": "▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"112": {
"content": "▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"113": {
"content": "▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"114": {
"content": "▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"115": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"116": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"117": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"118": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"119": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"120": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"121": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"122": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"123": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"124": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"125": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"126": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"127": {
"content": "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"128": {
"content": "\t\t",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"129": {
"content": "\t\t\t",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"130": {
"content": "\t\t\t\t",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"131": {
"content": "\t\t\t\t\t",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"132": {
"content": "\t\t\t\t\t\t",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"133": {
"content": "\n\n",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"134": {
"content": "\n\n\n",
"lstrip": false,
"normalized": false,
"rstrip": false,
"single_word": false,
"special": false
},
"256000": {
"content": "<tool_call>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": false
},
"256001": {
"content": "<tools>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": false
},
"256002": {
"content": "</tool_call>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": false
},
"256003": {
"content": "</tools>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": false
},
"256004": {
"content": "</tool_response>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": false
},
"256005": {
"content": "<tool_response>",
"lstrip": false,
"normalized": true,
"rstrip": false,
"single_word": false,
"special": false
}
},
"additional_special_tokens": [
"<|im_start|>",
"<|im_end|>"
],
"bos_token": "<s>",
"chat_template": "{%- set tools = tools if tools is defined else None -%}\n{%- set date_string = date_string if date_string is defined else \"1 Sep 2024\" -%}\n\n{%- set system_message = messages[0].content if messages[0].role == \"system\" else \"\" -%}\n{%- if messages[0].role == \"system\" -%}\n {%- set messages = messages[1:] -%}\n{%- endif -%}\n\n{%- if not tool_prompt -%}\n {%- set tool_prompt = \"For each function call return a json object with function name and arguments within <tool_call> </tool_call> tags with the following schema:\n<tool_call>\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-dict>}\n</tool_call>\" -%}\n{%- endif -%}\n\n{%- if system_message or tools -%}\n {{- '<|im_start|>system\n'}}\n{%- endif -%}\n\n{%- if system_message %}\n {{- system_message + \"\n\"}}\n{%- endif -%}\n\n{%- if tools -%}\n {{- \"You are a function-calling AI model. You are provided with function signatures within <tools> </tools> XML tags. You may call one or more functions to assist with the user query. Don't make assumptions about what values to plug into functions.\n\" }}\n {{- \"<tools>\n\" }}\n {{- tools }}\n {{- \"\n</tools>\n\" }}\n {{- tool_prompt -}}\n{%- endif -%}\n\n{%- if system_message or tools -%}\n {{- '<|im_end|>\n'}}\n{%- endif -%}\n\n{# Main message loop #}\n{%- for message in messages -%}\n {%- if message.role == \"user\" or message.role == \"assistant\" or message.role == \"tool\" -%}\n {%- if loop.first and message.role != \"user\" -%}\n {{ raise_exception(\"Invalid sequence: The first message role must be 'user' after 'system' if provided .\") }}\n {%- endif -%}\n\n {%- if not loop.first and message.role in [\"user\", \"assistant\"] and message.role == loop.previtem.role -%}\n {{ raise_exception(\"Invalid sequence: Consecutive messages cannot have the same role ('user' or 'assistant').\") }}\n {%- endif -%}\n\n {%- if message.role == \"user\" and not loop.first and loop.previtem.role != \"assistant\" -%}\n {{ raise_exception(\"Invalid sequence: A 'user' message must be preceded by an 'assistant' message.\") }}\n {%- endif -%}\n\n {%- if message.role == \"tool\" and not loop.first and loop.previtem.role not in [\"assistant\", \"tool\"] -%}\n {{ raise_exception(\"Invalid sequence: A 'tool' message must be preceded by 'assistant' or 'tool'.\") }}\n {%- endif -%}\n {%- else -%}\n {{- raise_exception(\"Invalid role detected: only 'user', 'assistant', or 'tool' roles are accepted.\") }}\n {%- endif -%}\n {%- if message.role == \"user\" or (message.role == \"assistant\" and message.tool_calls is not defined) -%}\n {{- '<|im_start|>' + message.role + '\n' + message.content | trim + '<|im_end|>\n'}}\n {%- elif message.role == \"assistant\" -%}\n {{- '<|im_start|>' + message.role }}\n {%- for tool_call in message.tool_calls -%}\n {{ '\n<tool_call>\n' }}\n {%- if tool_call.function -%}\n {\"name\": \"{{ tool_call.function.name }}\", \"arguments\": {{ tool_call.function.arguments | tojson }} }\n {%- else -%}\n {\"name\": \"{{ tool_call.name }}\", \"arguments\": {{ tool_call.arguments | tojson }} }\n {%- endif -%}\n {{ '\n</tool_call>' }}\n {%- endfor -%}\n {{- '<|im_end|>\n' }}\n {%- elif message.role == \"tool\" -%}\n {%- if loop.previtem and loop.previtem.role != \"tool\" -%}\n {{- '<|im_start|>tool\n' }}\n {%- endif -%}\n {{- '<tool_response>\n' }} \n {{- message.content }}\n {{- '\n</tool_response>\n' }}\n {%- if loop.last or loop.nextitem.role != \"tool\" -%}\n {{- '<|im_end|>\n'}}\n {%- endif -%}\n {%- endif -%}\n{%- endfor -%}\n\n{# Prompt for assistant generation if needed #}\n{%- if add_generation_prompt -%}\n {{- '<|im_start|>assistant\n' }}\n{%- endif -%}",
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"legacy": true,
"model_max_length": 8192,
"pad_token": "<unk>",
"padding_side": "right",
"sp_model_kwargs": {},
"spaces_between_special_tokens": false,
"tokenizer_class": "LlamaTokenizer",
"unk_token": "<unk>",
"use_default_system_prompt": false
}