|
{ |
|
"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": "<repo_name>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"4": { |
|
"content": "<reponame>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"5": { |
|
"content": "<file_sep>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"6": { |
|
"content": "<filename>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"7": { |
|
"content": "<gh_stars>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"8": { |
|
"content": "<issue_start>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"9": { |
|
"content": "<issue_comment>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"10": { |
|
"content": "<issue_closed>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"11": { |
|
"content": "<jupyter_start>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"12": { |
|
"content": "<jupyter_text>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"13": { |
|
"content": "<jupyter_code>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"14": { |
|
"content": "<jupyter_output>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"15": { |
|
"content": "<jupyter_script>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"16": { |
|
"content": "<empty_output>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"49152": { |
|
"content": "<fake_token_around_image>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"49153": { |
|
"content": "<image>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
}, |
|
"49154": { |
|
"content": "<end_of_utterance>", |
|
"lstrip": false, |
|
"normalized": false, |
|
"rstrip": false, |
|
"single_word": false, |
|
"special": true |
|
} |
|
}, |
|
"additional_special_tokens": [ |
|
"<fake_token_around_image>", |
|
"<image>", |
|
"<end_of_utterance>" |
|
], |
|
"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 -%}<end_of_utterance>{{ '\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'] %}{{ '<image>' }}{% endif %}{% endfor %}{% endif %}<end_of_utterance>{{ '\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 %}<end_of_utterance>{{ '\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<end_of_utterance>{{ '\n' }}{%- endif -%}{%- endfor -%}{%- if add_generation_prompt -%}Assistant:{{ ' ' }}{%- endif -%}", |
|
"clean_up_tokenization_spaces": false, |
|
"eos_token": "<end_of_utterance>", |
|
"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 |
|
} |
|
|