{ "add_bos_token": false, "add_eos_token": false, "add_prefix_space": null, "added_tokens_decoder": { "151643": { "content": "<|begin▁of▁sentence|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151644": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151645": { "content": "<|end▁of▁sentence|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151646": { "content": "<|object_ref_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151647": { "content": "<|object_ref_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151648": { "content": "<|box_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151649": { "content": "<|box_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151650": { "content": "<|quad_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151651": { "content": "<|quad_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151652": { "content": "<|vision_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151653": { "content": "<|vision_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151654": { "content": "<|vision_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151655": { "content": "<|image_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151656": { "content": "<|video_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151657": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151658": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151659": { "content": "<|fim_prefix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151660": { "content": "<|fim_middle|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151661": { "content": "<|fim_suffix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151662": { "content": "<|fim_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151663": { "content": "<|repo_name|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151664": { "content": "<|file_sep|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151665": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151666": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151667": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151668": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151669": { "content": "<|User|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151670": { "content": "<|Assistant|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151671": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151672": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151673": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151674": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151675": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151676": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151677": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151678": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151679": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false }, "151680": { "content": "", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": false } }, "bos_token": "<|begin▁of▁sentence|>", "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}\n{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='', is_first_sp=true, is_last_user=false, has_execute=false) %}\n{%- for message in messages %}\n{%- if message['role'] == 'system' %}\n{%- if ns.is_first_sp %}\n{% set ns.system_prompt = ns.system_prompt + message['content'] %}\n{% set ns.is_first_sp = false %}\n{%- else %}\n{% set ns.system_prompt = ns.system_prompt + '\\n\\n' + message['content'] %}\n{%- endif %}\n{%- endif %}\n{%- if message['role'] == 'execute' %}\n{% set ns.has_execute = true %}\n{%- endif %}\n{%- endfor %}\n{{ bos_token }}{{ ns.system_prompt }}\n{%- for message in messages %}\n{% set content = message['content'] %}\n{%- if message['role'] == 'user' %}\n{%- set ns.is_tool = false -%}\n{%- set ns.is_first = false -%}\n{%- set ns.is_last_user = true -%}\n{{\n'<|User|>' + content + '<|Assistant|>'\n}}\n{%- endif %}\n{%- if message['role'] == 'assistant' %}\n{% if '' in content %}\n{% set content = content.split('')[-1] %}\n{% endif %}\n{%- endif %}\n{%- if message['role'] == 'assistant' and message['tool_calls'] is defined and message['tool_calls'] is not none %}\n{%- set ns.is_last_user = false -%}\n{%- if ns.is_tool %}\n{{\n'<|tool▁outputs▁end|>'\n}}\n{%- endif %}\n{%- set ns.is_first = false %}\n{%- set ns.is_tool = false -%}\n{%- set ns.is_output_first = true %}\n{%- for tool in message['tool_calls'] %}\n{%- if not ns.is_first %}\n{%- if content is none %}\n{{\n'<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'\n}}\n{%- else %}\n{{\ncontent + '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'\n}}\n{%- endif %}\n{%- set ns.is_first = true -%}\n{%- else %}\n{{\n'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'\n}}\n{%- endif %}\n{%- endfor %}\n{{\n'<|tool▁calls▁end|><|end▁of▁sentence|>'\n}}\n{%- endif %}\n{%- if message['role'] == 'assistant' and (message['tool_calls'] is not defined or message['tool_calls'] is none) %}\n{%- set ns.is_last_user = false -%}\n{%- if ns.is_tool %}\n{{\n'<|tool▁outputs▁end|>' + content + ('' if ns.has_execute else '<|end▁of▁sentence|>')\n}}\n{%- set ns.is_tool = false -%}\n{%- else %}\n{{\ncontent + ('' if ns.has_execute else '<|end▁of▁sentence|>')\n}}\n{%- endif %}\n{%- endif %}\n{%- if message['role'] == 'tool' %}\n{%- set ns.is_last_user = false -%}\n{%- set ns.is_tool = true -%}\n{%- if ns.is_output_first %}\n{{\n'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + content + '<|tool▁output▁end|>'\n}}\n{%- set ns.is_output_first = false %}\n{%- else %}\n{{\n'\\n<|tool▁output▁begin|>' + content + '<|tool▁output▁end|>'\n}}\n{%- endif %}\n{%- endif %}\n{%- if message['role'] == 'execute' %}\n{%- set ns.is_last_user = false -%}\n{{\n'\\n\\n' + content + '\\n\\n'\n}}\n{%- endif %}\n{%- endfor %}\n{% if ns.is_tool %}\n{{\n'<|tool▁outputs▁end|>'\n}}\n{% endif %}\n{% if add_generation_prompt and ns.is_last_user and not ns.is_tool %}\n{{\n'<|Assistant|>'\n}}\n{% endif %}", "clean_up_tokenization_spaces": false, "eos_token": "<|end▁of▁sentence|>", "extra_special_tokens": {}, "legacy": true, "model_max_length": 131072, "pad_token": "<|end▁of▁sentence|>", "sp_model_kwargs": {}, "tokenizer_class": "LlamaTokenizerFast", "unk_token": null, "use_default_system_prompt": false }