{"_id":"69352acd329352fc31d925b5","id":"zai-org/GLM-4.6V","private":false,"pipeline_tag":"image-text-to-text","library_name":"transformers","tags":["transformers","safetensors","glm4v_moe","image-text-to-text","conversational","zh","en","arxiv:2507.01006","license:mit","endpoints_compatible","deploy:azure","region:us"],"downloads":5597,"likes":398,"modelId":"zai-org/GLM-4.6V","author":"zai-org","sha":"4e2d47eb0b41c5280d8294b17cef9e94fdcfff46","lastModified":"2025-12-09T05:34:59.000Z","gated":false,"disabled":false,"model-index":null,"config":{"architectures":["Glm4vMoeForConditionalGeneration"],"model_type":"glm4v_moe","tokenizer_config":{"eos_token":"<|endoftext|>","pad_token":"<|endoftext|>"},"chat_template_jinja":"[gMASK]<sop>\n{%- if tools -%}\n<|system|>\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>\n{% for tool in tools %}\n{{ tool | tojson(ensure_ascii=False) }}\n{% endfor %}\n</tools>\n\nFor each function call, output the function name and arguments within the following XML format:\n<tool_call>{function-name}\n<arg_key>{arg-key-1}</arg_key>\n<arg_value>{arg-value-1}</arg_value>\n<arg_key>{arg-key-2}</arg_key>\n<arg_value>{arg-value-2}</arg_value>\n...\n</tool_call>{%- endif -%}\n{%- macro visible_text(content) -%}\n    {%- if content is string -%}\n        {{- content }}\n    {%- elif content is iterable and content is not mapping -%}\n        {%- for item in content -%}\n            {%- if item is mapping and item.type == 'text' -%}\n                {{- item.text }}\n            {%- elif item is mapping and (item.type == 'image' or 'image' in item) -%}\n                <|begin_of_image|><|image|><|end_of_image|>\n            {%- elif item is mapping and (item.type == 'video' or 'video' in item) -%}\n                <|begin_of_video|><|video|><|end_of_video|>\n            {%- elif item is string -%}\n                {{- item }}\n            {%- endif -%}\n        {%- endfor -%}\n    {%- else -%}\n        {{- content }}\n    {%- endif -%}\n{%- endmacro -%}\n{%- set ns = namespace(last_user_index=-1) %}\n{%- for m in messages %}\n    {%- if m.role == 'user' %}\n        {% set ns.last_user_index = loop.index0 -%}\n    {%- endif %}\n{%- endfor %}\n{% for m in messages %}\n{%- if m.role == 'user' -%}<|user|>\n{% if m.content is string %}\n{{ m.content }}\n{%- else %}\n{%- for item in m.content %}\n{% if item.type == 'video' or 'video' in item %}\n<|begin_of_video|><|video|><|end_of_video|>{% elif item.type == 'image' or 'image' in item %}\n<|begin_of_image|><|image|><|end_of_image|>{% elif item.type == 'text' %}\n{{ item.text }}\n{%- endif %}\n{%- endfor %}\n{%- endif %}\n{{- '/nothink' if (enable_thinking is defined and not enable_thinking and not visible_text(m.content).endswith(\"/nothink\")) else '' -}}\n{%- elif m.role == 'assistant' -%}\n<|assistant|>\n{%- set reasoning_content = '' %}\n{%- set content = visible_text(m.content) %}\n{%- if m.reasoning_content is string %}\n    {%- set reasoning_content = m.reasoning_content %}\n{%- else %}\n    {%- if '</think>' in content %}\n        {%- set reasoning_content = content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n        {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n    {%- endif %}\n{%- endif %}\n{%- if loop.index0 > ns.last_user_index and reasoning_content -%}\n{{ '\\n<think>' + reasoning_content.strip() +  '</think>'}}\n{%- else -%}\n{{ '\\n<think></think>' }}\n{%- endif -%}\n{%- if content.strip() -%}\n{{ '\\n' + content.strip() }}\n{%- endif -%}\n{% if m.tool_calls %}\n{% for tc in m.tool_calls %}\n{%- if tc.function %}\n    {%- set tc = tc.function %}\n{%- endif %}\n{{ '\\n<tool_call>' + tc.name }}\n{% set _args = tc.arguments %}\n{% for k, v in _args.items() %}\n<arg_key>{{ k }}</arg_key>\n<arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>\n{% endfor %}\n</tool_call>{% endfor %}\n{% endif %}\n{%- elif m.role == 'tool' -%}\n{%- if m.content is string -%}\n{%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n    {{- '<|observation|>' }}\n{%- endif %}\n{{- '\\n<tool_response>\\n' }}\n{{- m.content }}\n{{- '\\n</tool_response>' }}\n{% elif m.content is iterable and m.content is not mapping %}\n{%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n{{- '<|observation|>' }}\n{%- endif %}\n{{- '\\n<tool_response>\\n' }}\n{%- for tr in m.content -%}\n  {%- if tr is mapping and tr.type is defined -%}\n    {%- set t = tr.type | lower -%}\n    {%- if t == 'text' and tr.text is defined -%}\n{{ tr.text }}\n    {%- elif t in ['image', 'image_url'] -%}\n<|begin_of_image|><|image|><|end_of_image|>\n    {%- elif t in ['video', 'video_url'] -%}\n<|begin_of_video|><|video|><|end_of_video|>\n    {%- else -%}\n{{ tr | tojson(ensure_ascii=False) }}\n    {%- endif -%}\n  {%- else -%}\n{{ tr.output if tr.output is defined else tr }}\n  {%- endif -%}\n{%- endfor -%}\n{{- '\\n</tool_response>' }}\n{%- else -%}\n<|observation|>{% for tr in m.content %}\n\n<tool_response>\n{{ tr.output if tr.output is defined else tr }}\n</tool_response>{% endfor -%}\n{% endif -%}\n{# ====== 逻辑结束 ====== #}\n{%- elif m.role == 'system' -%}\n<|system|>\n{{ visible_text(m.content) }}\n{%- endif -%}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n<|assistant|>\n{{'<think></think>\\n' if (enable_thinking is defined and not enable_thinking) else ''}}\n{%- endif -%}"},"cardData":{"language":["zh","en"],"library_name":"transformers","license":"mit","pipeline_tag":"image-text-to-text"},"transformersInfo":{"auto_model":"AutoModelForMultimodalLM","pipeline_tag":"image-text-to-text","processor":"AutoProcessor"},"siblings":[{"rfilename":".gitattributes"},{"rfilename":"README.md"},{"rfilename":"chat_template.jinja"},{"rfilename":"config.json"},{"rfilename":"generation_config.json"},{"rfilename":"model-00001-of-00041.safetensors"},{"rfilename":"model-00002-of-00041.safetensors"},{"rfilename":"model-00003-of-00041.safetensors"},{"rfilename":"model-00004-of-00041.safetensors"},{"rfilename":"model-00005-of-00041.safetensors"},{"rfilename":"model-00006-of-00041.safetensors"},{"rfilename":"model-00007-of-00041.safetensors"},{"rfilename":"model-00008-of-00041.safetensors"},{"rfilename":"model-00009-of-00041.safetensors"},{"rfilename":"model-00010-of-00041.safetensors"},{"rfilename":"model-00011-of-00041.safetensors"},{"rfilename":"model-00012-of-00041.safetensors"},{"rfilename":"model-00013-of-00041.safetensors"},{"rfilename":"model-00014-of-00041.safetensors"},{"rfilename":"model-00015-of-00041.safetensors"},{"rfilename":"model-00016-of-00041.safetensors"},{"rfilename":"model-00017-of-00041.safetensors"},{"rfilename":"model-00018-of-00041.safetensors"},{"rfilename":"model-00019-of-00041.safetensors"},{"rfilename":"model-00020-of-00041.safetensors"},{"rfilename":"model-00021-of-00041.safetensors"},{"rfilename":"model-00022-of-00041.safetensors"},{"rfilename":"model-00023-of-00041.safetensors"},{"rfilename":"model-00024-of-00041.safetensors"},{"rfilename":"model-00025-of-00041.safetensors"},{"rfilename":"model-00026-of-00041.safetensors"},{"rfilename":"model-00027-of-00041.safetensors"},{"rfilename":"model-00028-of-00041.safetensors"},{"rfilename":"model-00029-of-00041.safetensors"},{"rfilename":"model-00030-of-00041.safetensors"},{"rfilename":"model-00031-of-00041.safetensors"},{"rfilename":"model-00032-of-00041.safetensors"},{"rfilename":"model-00033-of-00041.safetensors"},{"rfilename":"model-00034-of-00041.safetensors"},{"rfilename":"model-00035-of-00041.safetensors"},{"rfilename":"model-00036-of-00041.safetensors"},{"rfilename":"model-00037-of-00041.safetensors"},{"rfilename":"model-00038-of-00041.safetensors"},{"rfilename":"model-00039-of-00041.safetensors"},{"rfilename":"model-00040-of-00041.safetensors"},{"rfilename":"model-00041-of-00041.safetensors"},{"rfilename":"model.safetensors.index.json"},{"rfilename":"preprocessor_config.json"},{"rfilename":"tokenizer.json"},{"rfilename":"tokenizer_config.json"},{"rfilename":"video_preprocessor_config.json"}],"spaces":["akhaliq/anycoder","hadadxyz/ai","ginigen-ai/open-router-leaderboard","librarian-bots/dataset-card-drafter","MohanamaniDeepika/anycoder","lulavc/BubbleScribe","aigos/anycoder","HI7RAI/anycoder","YuZijie123/myyy-woof","Trkaga/anycoder","ZENLLC/anycoder","PARZ2344/PNGTECH","Rikishini/anycoder","Superwolff/anycoder","MediumArt/Judge-My","weiyi0119/DeepOperateAI","aitekphsoftware/zai-org-GLM-4.6V","shivay00001/codeasy","AleksKola874/anycoder","carlosdimare/zai-org-GLM-4.6V","AlexanderOG/anycoder","vakilrathod67/ai","KN3AUX-CODE/anycoder","superfluz/ai","637366heh/anycoder","weiyi0119/zai-org-GLM-4.6V","Dar1us-Khan/ai","network01/anycoder","Infeksion/anycoder","aiadventureryt/anycoder","Hasan01Barjawi/anycoder","FLODARELTIH/anycoder","joethuram/ai","VIDraft/anycoder2","ahwd/anycoder","amadsyufi/ai","charlieshawn/llm","damincordova/chat","Jemo215/anycoder2","ramirosolis/ai","tarunthethor/anycoder","inigovaldorin/ai","AnyCoderaw/anycoder","tariqimani/ai","hikapi/ai","DamianRoss/ai","siakatara/ai","wilsonses/ai","hekergod11/AI-Playground","madmaz/anycoder","Diehard704/anycoder","Amitda/anycoder","amanpmx/anycoder","Kalibro/ai","SampleCraft/hi","SampleCraft/ai","wang468/ai","abarra/demo","Mdz87/ai","cassianrook/anycoder","cassianrook/ai","asdadsd233/anycoder","indianboyz/anycoder","Linacre/ai","LuisJeRU/ai","raheem786/anycoder","Maher12345/ai","ashishninehertz/anycoder","vansh1190/Build","justinhearn/ai","timiu999/ai","ghost-logic/anycoder","shreerambhakt/anycoder","xe1stech/anycoder","wajahat-ali-mir-dev/anycoder","VikVib/ai","MadhavRupala/anycoder","Linacre/anycoder","BikoRiko/anycoder","z4iXsECHS6ND-heighTSAI-INSEGCSyX6T-SYS-ROD/anycoder","crabander/anycoder","Galaxydude2/anycoder","Saksak65/ai","Saksak65/Chat","bassetone/anycoder","AJ3S/anycoder","siu5/ccp","aiclass2026/anycoder","ashlarch100/anycoder","ankur030685/coder1","ankur030685/anycoder","binsmat/anycoder","ashlarch100/anycoder2","AIMLAtul/anycoder","Lx4n/anycoder","ssanjay22/anycoder","z4iXsECHS6ND-heighTSAI-INSEGCSyX6T-SYS-ROD/VOODOO.CO.OLDOlIUX","yuan111556/ai","duyet/anycoder","Cgjgj/anycoder123"],"createdAt":"2025-12-07T07:20:45.000Z","safetensors":{"parameters":{"BF16":107710927360,"F32":5760},"total":107710933120},"inference":"warm","usedStorage":215444371075}