CoolFace
Modelpublic

junior0091/test

sourceHugging Faceapache-2.0updated 2d agoView on Hugging Face
0likes24downloads
tokenizer_config.json307 linesDownload Raw Back to root
1{2  "add_prefix_space": false,3  "audio_bos_token": "<|audio_start|>",4  "audio_eos_token": "<|audio_end|>",5  "audio_token": "<|audio_pad|>",6  "backend": "tokenizers",7  "bos_token": null,8  "clean_up_tokenization_spaces": false,9  "eos_token": "<|im_end|>",10  "errors": "replace",11  "image_token": "<|image_pad|>",12  "is_local": true,13  "local_files_only": false,14  "max_length": 4096,15  "model_max_length": 262144,16  "model_specific_special_tokens": {17    "audio_bos_token": "<|audio_start|>",18    "audio_eos_token": "<|audio_end|>",19    "audio_token": "<|audio_pad|>",20    "image_token": "<|image_pad|>",21    "video_token": "<|video_pad|>",22    "vision_bos_token": "<|vision_start|>",23    "vision_eos_token": "<|vision_end|>"24  },25  "pad_to_multiple_of": null,26  "pad_token": "<|endoftext|>",27  "pad_token_type_id": 0,28  "padding_side": "left",29  "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",30  "processor_class": "Qwen3VLProcessor",31  "split_special_tokens": false,32  "stride": 0,33  "tokenizer_class": "TokenizersBackend",34  "truncation_side": "right",35  "truncation_strategy": "longest_first",36  "unk_token": null,37  "video_token": "<|video_pad|>",38  "vision_bos_token": "<|vision_start|>",39  "vision_eos_token": "<|vision_end|>",40  "added_tokens_decoder": {41    "248044": {42      "content": "<|endoftext|>",43      "single_word": false,44      "lstrip": false,45      "rstrip": false,46      "normalized": false,47      "special": true48    },49    "248045": {50      "content": "<|im_start|>",51      "single_word": false,52      "lstrip": false,53      "rstrip": false,54      "normalized": false,55      "special": true56    },57    "248046": {58      "content": "<|im_end|>",59      "single_word": false,60      "lstrip": false,61      "rstrip": false,62      "normalized": false,63      "special": true64    },65    "248047": {66      "content": "<|object_ref_start|>",67      "single_word": false,68      "lstrip": false,69      "rstrip": false,70      "normalized": false,71      "special": true72    },73    "248048": {74      "content": "<|object_ref_end|>",75      "single_word": false,76      "lstrip": false,77      "rstrip": false,78      "normalized": false,79      "special": true80    },81    "248049": {82      "content": "<|box_start|>",83      "single_word": false,84      "lstrip": false,85      "rstrip": false,86      "normalized": false,87      "special": true88    },89    "248050": {90      "content": "<|box_end|>",91      "single_word": false,92      "lstrip": false,93      "rstrip": false,94      "normalized": false,95      "special": true96    },97    "248051": {98      "content": "<|quad_start|>",99      "single_word": false,100      "lstrip": false,101      "rstrip": false,102      "normalized": false,103      "special": true104    },105    "248052": {106      "content": "<|quad_end|>",107      "single_word": false,108      "lstrip": false,109      "rstrip": false,110      "normalized": false,111      "special": true112    },113    "248053": {114      "content": "<|vision_start|>",115      "single_word": false,116      "lstrip": false,117      "rstrip": false,118      "normalized": false,119      "special": true120    },121    "248054": {122      "content": "<|vision_end|>",123      "single_word": false,124      "lstrip": false,125      "rstrip": false,126      "normalized": false,127      "special": true128    },129    "248055": {130      "content": "<|vision_pad|>",131      "single_word": false,132      "lstrip": false,133      "rstrip": false,134      "normalized": false,135      "special": true136    },137    "248056": {138      "content": "<|image_pad|>",139      "single_word": false,140      "lstrip": false,141      "rstrip": false,142      "normalized": false,143      "special": true144    },145    "248057": {146      "content": "<|video_pad|>",147      "single_word": false,148      "lstrip": false,149      "rstrip": false,150      "normalized": false,151      "special": true152    },153    "248058": {154      "content": "<tool_call>",155      "single_word": false,156      "lstrip": false,157      "rstrip": false,158      "normalized": false,159      "special": false160    },161    "248059": {162      "content": "</tool_call>",163      "single_word": false,164      "lstrip": false,165      "rstrip": false,166      "normalized": false,167      "special": false168    },169    "248060": {170      "content": "<|fim_prefix|>",171      "single_word": false,172      "lstrip": false,173      "rstrip": false,174      "normalized": false,175      "special": false176    },177    "248061": {178      "content": "<|fim_middle|>",179      "single_word": false,180      "lstrip": false,181      "rstrip": false,182      "normalized": false,183      "special": false184    },185    "248062": {186      "content": "<|fim_suffix|>",187      "single_word": false,188      "lstrip": false,189      "rstrip": false,190      "normalized": false,191      "special": false192    },193    "248063": {194      "content": "<|fim_pad|>",195      "single_word": false,196      "lstrip": false,197      "rstrip": false,198      "normalized": false,199      "special": false200    },201    "248064": {202      "content": "<|repo_name|>",203      "single_word": false,204      "lstrip": false,205      "rstrip": false,206      "normalized": false,207      "special": false208    },209    "248065": {210      "content": "<|file_sep|>",211      "single_word": false,212      "lstrip": false,213      "rstrip": false,214      "normalized": false,215      "special": false216    },217    "248066": {218      "content": "<tool_response>",219      "single_word": false,220      "lstrip": false,221      "rstrip": false,222      "normalized": false,223      "special": false224    },225    "248067": {226      "content": "</tool_response>",227      "single_word": false,228      "lstrip": false,229      "rstrip": false,230      "normalized": false,231      "special": false232    },233    "248068": {234      "content": "<think>",235      "single_word": false,236      "lstrip": false,237      "rstrip": false,238      "normalized": false,239      "special": false240    },241    "248069": {242      "content": "</think>",243      "single_word": false,244      "lstrip": false,245      "rstrip": false,246      "normalized": false,247      "special": false248    },249    "248070": {250      "content": "<|audio_start|>",251      "single_word": false,252      "lstrip": false,253      "rstrip": false,254      "normalized": false,255      "special": true256    },257    "248071": {258      "content": "<|audio_end|>",259      "single_word": false,260      "lstrip": false,261      "rstrip": false,262      "normalized": false,263      "special": true264    },265    "248072": {266      "content": "<tts_pad>",267      "single_word": false,268      "lstrip": false,269      "rstrip": false,270      "normalized": false,271      "special": true272    },273    "248073": {274      "content": "<tts_text_bos>",275      "single_word": false,276      "lstrip": false,277      "rstrip": false,278      "normalized": false,279      "special": true280    },281    "248074": {282      "content": "<tts_text_eod>",283      "single_word": false,284      "lstrip": false,285      "rstrip": false,286      "normalized": false,287      "special": true288    },289    "248075": {290      "content": "<tts_text_bos_single>",291      "single_word": false,292      "lstrip": false,293      "rstrip": false,294      "normalized": false,295      "special": true296    },297    "248076": {298      "content": "<|audio_pad|>",299      "single_word": false,300      "lstrip": false,301      "rstrip": false,302      "normalized": false,303      "special": true304    }305  },306  "chat_template": "{%- set image_count = namespace(value=0) %}\n{%- set video_count = namespace(value=0) %}\n{%- macro render_content(content, do_vision_count, is_system_content=false) %}\n    {%- if content is string %}\n        {{- content }}\n    {%- elif content is iterable and content is not mapping %}\n        {%- for item in content %}\n            {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}\n                {%- if is_system_content %}\n                    {{- raise_exception('System message cannot contain images.') }}\n                {%- endif %}\n                {%- if do_vision_count %}\n                    {%- set image_count.value = image_count.value + 1 %}\n                {%- endif %}\n                {%- if add_vision_id %}\n                    {{- 'Picture ' ~ image_count.value ~ ': ' }}\n                {%- endif %}\n                {{- '<|vision_start|><|image_pad|><|vision_end|>' }}\n            {%- elif 'video' in item or item.type == 'video' %}\n                {%- if is_system_content %}\n                    {{- raise_exception('System message cannot contain videos.') }}\n                {%- endif %}\n                {%- if do_vision_count %}\n                    {%- set video_count.value = video_count.value + 1 %}\n                {%- endif %}\n                {%- if add_vision_id %}\n                    {{- 'Video ' ~ video_count.value ~ ': ' }}\n                {%- endif %}\n                {{- '<|vision_start|><|video_pad|><|vision_end|>' }}\n            {%- elif 'text' in item %}\n                {{- item.text }}\n            {%- else %}\n                {{- raise_exception('Unexpected item type in content.') }}\n            {%- endif %}\n        {%- endfor %}\n    {%- elif content is none or content is undefined %}\n        {{- '' }}\n    {%- else %}\n        {{- raise_exception('Unexpected content type.') }}\n    {%- endif %}\n{%- endmacro %}\n{%- if not messages %}\n    {{- raise_exception('No messages provided.') }}\n{%- endif %}\n{%- set sysns = namespace(count=0, text='') %}\n{%- for message in messages %}\n    {%- if sysns.count == loop.index0 and (message.role == 'system' or message.role == 'developer') %}\n        {%- set sys_content = render_content(message.content, false, true)|trim %}\n        {%- if sys_content %}\n            {%- set sysns.text = sysns.text + ('\\n' if sysns.text else '') + sys_content %}\n        {%- endif %}\n        {%- set sysns.count = sysns.count + 1 %}\n    {%- endif %}\n{%- endfor %}\n{%- set num_sys = sysns.count %}\n{%- set merged_system = sysns.text %}\n{%- set reasoning_instructions = '' %}\n{%- if enable_thinking is undefined or enable_thinking is true %}\n    {%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}\n    {%- if resolved_reasoning_effort == 'high' %}\n        {%- set resolved_reasoning_effort = 'xhigh' %}\n    {%- endif %}\n    {%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}\n        {{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}\n    {%- endif %}\n    {%- if resolved_reasoning_effort == 'xhigh' %}\n        {%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}\n    {%- elif resolved_reasoning_effort == 'low' %}\n        {%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}\n    {%- endif %}\n{%- endif %}\n{%- if tools and tools is iterable and tools is not mapping %}\n    {{- '<|im_start|>system\\n' }}\n    {%- if reasoning_instructions %}\n        {{- reasoning_instructions + '\\n\\n' }}\n    {%- endif %}\n    {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n<tools>\" }}\n    {%- for tool in tools %}\n        {{- \"\\n\" }}\n        {{- tool | tojson }}\n    {%- endfor %}\n    {{- \"\\n</tools>\" }}\n    {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n    {%- if merged_system %}\n        {{- '\\n\\n' + merged_system }}\n    {%- endif %}\n    {{- '<|im_end|>\\n' }}\n{%- else %}\n    {%- if merged_system %}\n        {{- '<|im_start|>system\\n' + (reasoning_instructions + '\\n\\n' if reasoning_instructions else '')  + merged_system + '<|im_end|>\\n' }}\n    {%- elif reasoning_instructions %}\n        {{- '<|im_start|>system\\n' + reasoning_instructions + '<|im_end|>\\n' }}\n    {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n    {%- set index = (messages|length - 1) - loop.index0 %}\n    {%- if ns.multi_step_tool and message.role == \"user\" %}\n        {%- set content = render_content(message.content, false)|trim %}\n        {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}\n            {%- set ns.multi_step_tool = false %}\n            {%- set ns.last_query_index = index %}\n        {%- endif %}\n    {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n    {%- if loop.index0 >= num_sys %}\n    {%- set content = render_content(message.content, true)|trim %}\n    {%- if message.role == \"system\" or message.role == \"developer\" %}\n        {{- raise_exception('System message must be at the beginning.') }}\n    {%- elif message.role == \"user\" %}\n        {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n    {%- elif message.role == \"assistant\" %}\n        {%- set reasoning_content = '' %}\n        {%- if message.reasoning_content is string %}\n            {%- set reasoning_content = message.reasoning_content %}\n        {%- endif %}\n        {%- set reasoning_content = reasoning_content|trim %}\n        {%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}\n            {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content + '\\n</think>\\n\\n' + content }}\n        {%- else %}\n            {{- '<|im_start|>' + message.role + '\\n' + content }}\n        {%- endif %}\n        {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}\n            {%- for tool_call in message.tool_calls %}\n                {%- if tool_call.function is defined %}\n                    {%- set tool_call = tool_call.function %}\n                {%- endif %}\n                {%- if tool_call.name is not defined or tool_call.name is none %}\n                    {{- raise_exception('Tool call is missing a function name.') }}\n                {%- endif %}\n                {%- if loop.first %}\n                    {%- if content|trim %}\n                        {{- '\\n\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n                    {%- else %}\n                        {{- '<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n                    {%- endif %}\n                {%- else %}\n                    {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n                {%- endif %}\n                {%- if tool_call.arguments is mapping %}\n                    {%- for args_name, args_value in tool_call.arguments|items %}\n                        {{- '<parameter=' + args_name + '>\\n' }}\n                        {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}\n                        {{- args_value }}\n                        {{- '\\n</parameter>\\n' }}\n                    {%- endfor %}\n                {%- elif tool_call.arguments is string %}\n                    {%- if tool_call.arguments|trim %}\n                        {{- raise_exception('Tool call arguments for function \"' + (tool_call.name | string) + '\" were passed as a JSON string. Parse them into an object before calling apply_chat_template.') }}\n                    {%- endif %}\n                {%- elif tool_call.arguments is defined and tool_call.arguments is not none %}\n                    {{- raise_exception('Tool call arguments for function \"' + (tool_call.name | string) + '\" must be an object/mapping or a JSON string.') }}\n                {%- endif %}\n                {{- '</function>\\n</tool_call>' }}\n            {%- endfor %}\n        {%- endif %}\n        {{- '<|im_end|>\\n' }}\n    {%- elif message.role == \"tool\" %}\n        {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n            {{- '<|im_start|>user' }}\n        {%- endif %}\n        {{- '\\n<tool_response>\\n' }}\n        {{- content }}\n        {{- '\\n</tool_response>' }}\n        {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n            {{- '<|im_end|>\\n' }}\n        {%- elif loop.last %}\n            {{- '<|im_end|>\\n' }}\n        {%- endif %}\n    {%- else %}\n        {{- raise_exception('Unexpected message role.') }}\n    {%- endif %}\n    {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n    {{- '<|im_start|>assistant\\n' }}\n    {%- if enable_thinking is defined and enable_thinking is false %}\n        {{- '<think>\\n\\n</think>\\n\\n' }}\n    {%- else %}\n        {{- '<think>\\n' }}\n    {%- endif %}\n{%- endif %}\n{#- Unsloth fixes - developer role, merged system messages, tool calling #}"307}