{ "add_prefix_space": false, "added_tokens_decoder": { "0": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "4": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "5": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "6": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "7": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "8": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "9": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "10": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "11": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "12": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "13": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "14": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "15": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "16": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "49152": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "49153": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "49154": { "content": "", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [ "", "", "" ], "bos_token": "<|im_start|>", "chat_template": "{%- set config = namespace(has_system_message=false, has_tools=false) -%}{%- set system_messages = messages | selectattr('role', 'equalto', 'system') | list -%}{%- set config.has_system_message = system_messages | length > 0 -%}{%- set config.has_tools = tools is not none and tools | length > 0 -%}{%- if not config.has_system_message -%}{%- set messages = [{ \"content\": \"You are an AI agent acting as a human assistant.\", \"role\": \"system\" }] + messages -%}{%- endif -%}{%- for message in messages -%}{% if loop.first %}{{ bos_token }}{% endif %}{{ message.role | capitalize }}:{{ ' ' }}{%- if message.role == 'system' -%}{{ message.content }}{%- if config.has_tools -%}{{ '\n\n' }}You are aware of the following tools in your environment:\n{\n \"tools\": [\n {% for tool in tools %}\n {\n \"function\": {\n \"description\": \"{{ tool.function.description }}\",\n \"name\": \"{{ tool.function.name }}\",\n \"parameters\": {{ tool.function.parameters | tojson }}\n },\n \"type\": \"{{ tool.type }}\"\n }{% if not loop.last %},{% endif %}\n\n {% endfor %}\n ]\n}\n\nIf you would like to suggest one or more tool calls, please respond in the following format:\n{\n \"finish_reason\": \"tool_calls\",\n \"tool_calls\": [\n {\n \"arguments\": \"{\\\"parameter_name\\\": \\\"parameter_value\\\"}\",\n \"id\": \"call_id\",\n \"name\": \"tool_name\"\n }\n ]\n}\n{%- endif -%}{{ '\n' }}{%- endif -%}{%- if message.role == 'user' -%}{% if message['content'] is string %}{{message['content']}}{% else %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] in ['image', 'image_url'] %}{{ '' }}{% endif %}{% endfor %}{% endif %}{{ '\n' }}{%- endif -%}{%- if message.role == 'assistant' -%}{% generation %}{%- if message.tool_calls | default(false) -%}\n{\n \"finish_reason\": \"tool_calls\",\n \"tool_calls\": [\n {% for tool_call in message.tool_calls %}\n {\n \"arguments\": {{ tool_call.function.arguments | tojson }},\n \"id\": \"{{ tool_call.id }}\",\n \"name\": \"{{ tool_call.function.name }}\"\n }{% if not loop.last %},{% endif %}\n\n {% endfor %}\n ]\n}\n{%- else -%}{{ message.content }}{%- endif -%}{% endgeneration %}{{ '\n' }}{%- endif -%}{%- if message.role == 'tool' -%}\n{\n \"content\": {{ message.content | tojson }},\n \"name\": \"{{ message.name }}\",\n \"tool_call_id\": \"{{ message.tool_call_id }}\"\n}\n{{ '\n' }}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%}Assistant:{{ ' ' }}{%- endif -%}", "clean_up_tokenization_spaces": false, "eos_token": "", "legacy": false, "model_max_length": 16384, "pad_token": "<|im_end|>", "padding_side": "left", "processor_class": "Idefics3Processor", "tokenizer_class": "GPT2Tokenizer", "truncation_side": "left", "unk_token": "<|endoftext|>", "vocab_size": 49152 }