xinference 1.8.1rc1__py3-none-any.whl → 1.9.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of xinference might be problematic. Click here for more details.

Files changed (108) hide show
  1. xinference/_version.py +3 -3
  2. xinference/api/restful_api.py +2 -1
  3. xinference/core/model.py +8 -4
  4. xinference/core/supervisor.py +2 -3
  5. xinference/core/worker.py +7 -5
  6. xinference/deploy/cmdline.py +2 -0
  7. xinference/deploy/local.py +5 -0
  8. xinference/deploy/test/test_cmdline.py +1 -1
  9. xinference/deploy/worker.py +6 -0
  10. xinference/model/audio/cosyvoice.py +0 -1
  11. xinference/model/audio/model_spec.json +44 -20
  12. xinference/model/core.py +3 -0
  13. xinference/model/embedding/flag/core.py +5 -0
  14. xinference/model/embedding/llama_cpp/core.py +22 -19
  15. xinference/model/embedding/sentence_transformers/core.py +18 -4
  16. xinference/model/embedding/vllm/core.py +36 -9
  17. xinference/model/image/cache_manager.py +56 -0
  18. xinference/model/image/core.py +9 -0
  19. xinference/model/image/model_spec.json +178 -1
  20. xinference/model/image/stable_diffusion/core.py +155 -23
  21. xinference/model/llm/cache_manager.py +17 -3
  22. xinference/model/llm/harmony.py +245 -0
  23. xinference/model/llm/llama_cpp/core.py +41 -40
  24. xinference/model/llm/llm_family.json +688 -11
  25. xinference/model/llm/llm_family.py +1 -1
  26. xinference/model/llm/sglang/core.py +108 -5
  27. xinference/model/llm/transformers/core.py +20 -18
  28. xinference/model/llm/transformers/gemma3.py +1 -1
  29. xinference/model/llm/transformers/gpt_oss.py +91 -0
  30. xinference/model/llm/transformers/multimodal/core.py +1 -1
  31. xinference/model/llm/transformers/multimodal/gemma3.py +1 -1
  32. xinference/model/llm/transformers/multimodal/glm4_1v.py +2 -2
  33. xinference/model/llm/transformers/multimodal/ovis2.py +1 -1
  34. xinference/model/llm/transformers/multimodal/qwen-omni.py +7 -8
  35. xinference/model/llm/transformers/multimodal/qwen2_vl.py +9 -6
  36. xinference/model/llm/transformers/utils.py +1 -33
  37. xinference/model/llm/utils.py +61 -7
  38. xinference/model/llm/vllm/core.py +44 -8
  39. xinference/model/rerank/__init__.py +66 -23
  40. xinference/model/rerank/cache_manager.py +35 -0
  41. xinference/model/rerank/core.py +87 -339
  42. xinference/model/rerank/custom.py +33 -8
  43. xinference/model/rerank/model_spec.json +251 -212
  44. xinference/model/rerank/rerank_family.py +137 -0
  45. xinference/model/rerank/sentence_transformers/__init__.py +13 -0
  46. xinference/model/rerank/sentence_transformers/core.py +337 -0
  47. xinference/model/rerank/vllm/__init__.py +13 -0
  48. xinference/model/rerank/vllm/core.py +156 -0
  49. xinference/model/utils.py +108 -0
  50. xinference/model/video/model_spec.json +95 -1
  51. xinference/thirdparty/cosyvoice/bin/export_jit.py +3 -4
  52. xinference/thirdparty/cosyvoice/bin/export_onnx.py +49 -126
  53. xinference/thirdparty/cosyvoice/bin/{inference.py → inference_deprecated.py} +1 -0
  54. xinference/thirdparty/cosyvoice/bin/train.py +23 -3
  55. xinference/thirdparty/cosyvoice/cli/cosyvoice.py +8 -4
  56. xinference/thirdparty/cosyvoice/cli/frontend.py +4 -4
  57. xinference/thirdparty/cosyvoice/cli/model.py +53 -75
  58. xinference/thirdparty/cosyvoice/dataset/dataset.py +5 -18
  59. xinference/thirdparty/cosyvoice/dataset/processor.py +24 -25
  60. xinference/thirdparty/cosyvoice/flow/decoder.py +24 -433
  61. xinference/thirdparty/cosyvoice/flow/flow.py +6 -14
  62. xinference/thirdparty/cosyvoice/flow/flow_matching.py +33 -145
  63. xinference/thirdparty/cosyvoice/hifigan/generator.py +169 -1
  64. xinference/thirdparty/cosyvoice/llm/llm.py +108 -17
  65. xinference/thirdparty/cosyvoice/transformer/upsample_encoder.py +14 -115
  66. xinference/thirdparty/cosyvoice/utils/common.py +20 -0
  67. xinference/thirdparty/cosyvoice/utils/executor.py +8 -4
  68. xinference/thirdparty/cosyvoice/utils/file_utils.py +45 -1
  69. xinference/thirdparty/cosyvoice/utils/losses.py +37 -0
  70. xinference/thirdparty/cosyvoice/utils/mask.py +35 -1
  71. xinference/thirdparty/cosyvoice/utils/train_utils.py +24 -6
  72. xinference/thirdparty/cosyvoice/vllm/cosyvoice2.py +103 -0
  73. xinference/types.py +2 -0
  74. xinference/ui/gradio/chat_interface.py +2 -0
  75. xinference/ui/gradio/media_interface.py +353 -7
  76. xinference/ui/web/ui/build/asset-manifest.json +3 -3
  77. xinference/ui/web/ui/build/index.html +1 -1
  78. xinference/ui/web/ui/build/static/js/main.1086c759.js +3 -0
  79. xinference/ui/web/ui/build/static/js/main.1086c759.js.map +1 -0
  80. xinference/ui/web/ui/node_modules/.cache/babel-loader/28012da921a51f1082549956d3ae82acd769a754b22afda9acddd98a4daf9ea4.json +1 -0
  81. xinference/ui/web/ui/node_modules/.cache/babel-loader/3c5758bd12fa334294b1de0ff6b1a4bac8d963c45472eab9dc3e530d82aa6b3f.json +1 -0
  82. xinference/ui/web/ui/node_modules/.cache/babel-loader/475936ebe725eca62a6f52ce182c06a19b2cef4df9545a05ed0591ee0c539d43.json +1 -0
  83. xinference/ui/web/ui/node_modules/.cache/babel-loader/8b8cd408ccfbe115acef27ccfa5b233da8597131a2a5712add13e1e4d5d4504b.json +1 -0
  84. xinference/ui/web/ui/node_modules/.cache/babel-loader/a3eb18af328280b139693c9092dff2a0ef8c9a967e6c8956ceee0996611f1984.json +1 -0
  85. xinference/ui/web/ui/node_modules/.cache/babel-loader/aee5aaba26f2b1e816a3ea9efa68bad8b95695a3d80adcfd8dd57a7bb17ac71a.json +1 -0
  86. xinference/ui/web/ui/node_modules/.cache/babel-loader/d5c224be7081f18cba1678b7874a9782eba895df004874ff8f243f94ba79942a.json +1 -0
  87. xinference/ui/web/ui/node_modules/.cache/babel-loader/f7f18bfb539b036a6a342176dd98a85df5057a884a8da978d679f2a0264883d0.json +1 -0
  88. xinference/ui/web/ui/src/locales/en.json +2 -0
  89. xinference/ui/web/ui/src/locales/ja.json +2 -0
  90. xinference/ui/web/ui/src/locales/ko.json +2 -0
  91. xinference/ui/web/ui/src/locales/zh.json +2 -0
  92. {xinference-1.8.1rc1.dist-info → xinference-1.9.1.dist-info}/METADATA +15 -10
  93. {xinference-1.8.1rc1.dist-info → xinference-1.9.1.dist-info}/RECORD +98 -89
  94. xinference/ui/web/ui/build/static/js/main.b969199a.js +0 -3
  95. xinference/ui/web/ui/build/static/js/main.b969199a.js.map +0 -1
  96. xinference/ui/web/ui/node_modules/.cache/babel-loader/1409a96b9f9f9f5de99a89ab0f738f6da62b449521b0a8d3e4efcf7f5c23534d.json +0 -1
  97. xinference/ui/web/ui/node_modules/.cache/babel-loader/3d2a89f0eccc1f90fc5036c9a1d587c2120e6a6b128aae31d1db7d6bad52722b.json +0 -1
  98. xinference/ui/web/ui/node_modules/.cache/babel-loader/43b889c3a8e2634092ade463d52481c7c5581c72ded8f23bc5f012ea0ef8cea5.json +0 -1
  99. xinference/ui/web/ui/node_modules/.cache/babel-loader/5d47532fb42128280d87f57c8a0b02bc1930f7ef764aa7e90579247df18bba83.json +0 -1
  100. xinference/ui/web/ui/node_modules/.cache/babel-loader/830882bb275468a969614824a9ab8983f874b4581f2eb625e9c66426cdc65e5b.json +0 -1
  101. xinference/ui/web/ui/node_modules/.cache/babel-loader/8e5cb82c2ff3299c6a44563fe6b1c5515c9750613c51bb63abee0b1d70fc5019.json +0 -1
  102. xinference/ui/web/ui/node_modules/.cache/babel-loader/9df08abcb5a7c1e48a4eb25c5d5f5d7253ea6854a4397e6d74d1fd75a14acda1.json +0 -1
  103. xinference/ui/web/ui/node_modules/.cache/babel-loader/b99034986a06445701accc7a4914bb9320947435e8d4e15793392ca4f679316c.json +0 -1
  104. /xinference/ui/web/ui/build/static/js/{main.b969199a.js.LICENSE.txt → main.1086c759.js.LICENSE.txt} +0 -0
  105. {xinference-1.8.1rc1.dist-info → xinference-1.9.1.dist-info}/WHEEL +0 -0
  106. {xinference-1.8.1rc1.dist-info → xinference-1.9.1.dist-info}/entry_points.txt +0 -0
  107. {xinference-1.8.1rc1.dist-info → xinference-1.9.1.dist-info}/licenses/LICENSE +0 -0
  108. {xinference-1.8.1rc1.dist-info → xinference-1.9.1.dist-info}/top_level.txt +0 -0
@@ -4767,6 +4767,7 @@
4767
4767
  {
4768
4768
  "model_format": "pytorch",
4769
4769
  "model_size_in_billions": 671,
4770
+ "activated_size_in_billions": 37,
4770
4771
  "model_src": {
4771
4772
  "huggingface": {
4772
4773
  "quantizations": [
@@ -4846,6 +4847,7 @@
4846
4847
  {
4847
4848
  "model_format": "pytorch",
4848
4849
  "model_size_in_billions": 671,
4850
+ "activated_size_in_billions": 37,
4849
4851
  "model_src": {
4850
4852
  "huggingface": {
4851
4853
  "quantizations": [
@@ -4866,6 +4868,7 @@
4866
4868
  {
4867
4869
  "model_format": "awq",
4868
4870
  "model_size_in_billions": 671,
4871
+ "activated_size_in_billions": 37,
4869
4872
  "model_src": {
4870
4873
  "huggingface": {
4871
4874
  "quantizations": [
@@ -4885,6 +4888,7 @@
4885
4888
  {
4886
4889
  "model_format": "ggufv2",
4887
4890
  "model_size_in_billions": 671,
4891
+ "activated_size_in_billions": 37,
4888
4892
  "model_src": {
4889
4893
  "huggingface": {
4890
4894
  "quantizations": [
@@ -5215,6 +5219,7 @@
5215
5219
  {
5216
5220
  "model_format": "mlx",
5217
5221
  "model_size_in_billions": 671,
5222
+ "activated_size_in_billions": 37,
5218
5223
  "model_src": {
5219
5224
  "huggingface": {
5220
5225
  "quantizations": [
@@ -5255,13 +5260,15 @@
5255
5260
  ],
5256
5261
  "model_ability": [
5257
5262
  "chat",
5258
- "reasoning"
5263
+ "reasoning",
5264
+ "tools"
5259
5265
  ],
5260
5266
  "model_description": "DeepSeek-R1, which incorporates cold-start data before RL. DeepSeek-R1 achieves performance comparable to OpenAI-o1 across math, code, and reasoning tasks.",
5261
5267
  "model_specs": [
5262
5268
  {
5263
5269
  "model_format": "pytorch",
5264
5270
  "model_size_in_billions": 671,
5271
+ "activated_size_in_billions": 37,
5265
5272
  "model_src": {
5266
5273
  "huggingface": {
5267
5274
  "quantizations": [
@@ -5280,6 +5287,7 @@
5280
5287
  {
5281
5288
  "model_format": "gptq",
5282
5289
  "model_size_in_billions": 671,
5290
+ "activated_size_in_billions": 37,
5283
5291
  "model_src": {
5284
5292
  "huggingface": {
5285
5293
  "quantizations": [
@@ -5300,7 +5308,7 @@
5300
5308
  }
5301
5309
  }
5302
5310
  ],
5303
- "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='', is_first_sp=true) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{% set ns.system_prompt = ns.system_prompt + message['content'] %}{% set ns.is_first_sp = false %}{%- else %}{% set ns.system_prompt = ns.system_prompt + '\\n\\n' + message['content'] %}{%- endif %}{%- endif %}{%- endfor %}{{ bos_token }}{{ ns.system_prompt }}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and 'tool_calls' in message %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls'] %}{%- if not ns.is_first %}{%- if message['content'] is none %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- else %}{{'<|Assistant|>' + message['content'] + '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- endif %}{%- set ns.is_first = true -%}{%- else %}{{'\\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- endif %}{%- endfor %}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- if message['role'] == 'assistant' and 'tool_calls' not in message %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|>'}}{% endif %}",
5311
+ "chat_template": "{%- if not add_generation_prompt is defined %}{%- set add_generation_prompt = false %}{%- endif %}{%- set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='', is_first_sp=true, is_last_user=false) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{%- set ns.system_prompt = ns.system_prompt + message['content'] %}{%- set ns.is_first_sp = false %}{%- else %}{%- set ns.system_prompt = ns.system_prompt + '\n\n' + message['content'] %}{%- endif %}{%- endif %}{%- endfor %}{%- if tools is defined and tools is not none %}{%- set tool_ns = namespace(text='You are a helpful assistant with tool calling capabilities. ' + 'When a tool call is needed, you MUST use the following format to issue the call:\n' + '<|tool▁calls▁begin|><|tool▁call▁begin|>function<|tool▁sep|>FUNCTION_NAME\n' + '```json\n{\"param1\": \"value1\", \"param2\": \"value2\"}\n```<|tool▁call▁end|><|tool▁calls▁end|>\n\n' + 'Make sure the JSON is valid.' + '## Tools\n\n### Function\n\nYou have the following functions available:\n\n') %}{%- for tool in tools %}{%- set tool_ns.text = tool_ns.text + '\n```json\n' + (tool | tojson) + '\n```\n' %}{%- endfor %}{%- if ns.system_prompt|length != 0 %}{%- set ns.system_prompt = ns.system_prompt + '\n\n' + tool_ns.text %}{%- else %}{%- set ns.system_prompt = tool_ns.text %}{%- endif %}{%- endif %}{{- bos_token }}{{- ns.system_prompt }}{%- set last_index = (messages|length - 1) %}{%- for message in messages %}{%- set content = message['content'] %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{%- set ns.is_first = false -%}{%- set ns.is_last_user = true -%}{%- if loop.index0 == last_index %}{{- '<|User|>' + content }}{%- else %}{{- '<|User|>' + content + '<|Assistant|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'assistant' %}{%- if '</think>' in content %}{%- set content = (content.split('</think>')|last) %}{%- endif %}{%- endif %}{%- if message['role'] == 'assistant' and message['tool_calls'] is defined and message['tool_calls'] is not none %}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{- '<|tool▁outputs▁end|>'}}{%- endif %}{%- set ns.is_first = false %}{%- set ns.is_tool = false -%}{%- set ns.is_output_first = true %}{%- for tool in message['tool_calls'] %}{%- set arguments = tool['function']['arguments'] %}{%- if arguments is not string %}{%- set arguments = arguments|tojson %}{%- endif %}{%- if not ns.is_first %}{%- if content is none %}{{- '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + arguments + '\n' + '```' + '<|tool▁call▁end|>'}}{%- else %}{{- content + '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + arguments + '\n' + '```' + '<|tool▁call▁end|>'}}{%- endif %}{%- set ns.is_first = true -%}{%- else %}{{- '\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + arguments + '\n' + '```' + '<|tool▁call▁end|>'}}{%- endif %}{%- endfor %}{{- '<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- if message['role'] == 'assistant' and (message['tool_calls'] is not defined or message['tool_calls'] is none) %}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{- '<|tool▁outputs▁end|>' + content + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{{- content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_last_user = false -%}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{- '<|tool▁outputs▁begin|><|tool▁output▁begin|>' + content + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{- '\n<|tool▁output▁begin|>' + content + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{%- if ns.is_tool %}{{- '<|tool▁outputs▁end|>'}}{%- endif %}{%- if add_generation_prompt and not ns.is_tool %}{{- '<|Assistant|>'}}{%- endif %}",
5304
5312
  "stop_token_ids": [
5305
5313
  1
5306
5314
  ],
@@ -5310,6 +5318,116 @@
5310
5318
  "reasoning_start_tag": "<think>",
5311
5319
  "reasoning_end_tag": "</think>"
5312
5320
  },
5321
+ {
5322
+ "version": 2,
5323
+ "context_length": 131072,
5324
+ "model_name": "Deepseek-V3.1",
5325
+ "model_lang": [
5326
+ "en",
5327
+ "zh"
5328
+ ],
5329
+ "model_ability": [
5330
+ "chat",
5331
+ "reasoning",
5332
+ "hybrid",
5333
+ "tools"
5334
+ ],
5335
+ "model_description": "DeepSeek-V3.1 is a hybrid model that supports both thinking mode and non-thinking mode.",
5336
+ "model_specs": [
5337
+ {
5338
+ "model_format": "pytorch",
5339
+ "model_size_in_billions": 671,
5340
+ "activated_size_in_billions": 37,
5341
+ "model_src": {
5342
+ "huggingface": {
5343
+ "quantizations": [
5344
+ "none"
5345
+ ],
5346
+ "model_id": "deepseek-ai/DeepSeek-V3.1"
5347
+ },
5348
+ "modelscope": {
5349
+ "quantizations": [
5350
+ "none"
5351
+ ],
5352
+ "model_id": "deepseek-ai/DeepSeek-V3.1"
5353
+ }
5354
+ }
5355
+ },
5356
+ {
5357
+ "model_format": "gptq",
5358
+ "model_size_in_billions": 671,
5359
+ "activated_size_in_billions": 37,
5360
+ "model_src": {
5361
+ "huggingface": {
5362
+ "quantizations": [
5363
+ "Int4"
5364
+ ],
5365
+ "model_id": "cpatonn/DeepSeek-V3.1-GPTQ-4bit"
5366
+ },
5367
+ "modelscope": {
5368
+ "quantizations": [
5369
+ "Int4"
5370
+ ],
5371
+ "model_id": "cpatonn/DeepSeek-V3.1-GPTQ-4bit"
5372
+ }
5373
+ }
5374
+ },
5375
+ {
5376
+ "model_format": "awq",
5377
+ "model_size_in_billions": 671,
5378
+ "activated_size_in_billions": 37,
5379
+ "model_src": {
5380
+ "huggingface": {
5381
+ "quantizations": [
5382
+ "Int4"
5383
+ ],
5384
+ "model_id": "QuantTrio/DeepSeek-V3.1-AWQ"
5385
+ },
5386
+ "modelscope": {
5387
+ "quantizations": [
5388
+ "Int4"
5389
+ ],
5390
+ "model_id": "tclf90/DeepSeek-V3.1-AWQ"
5391
+ }
5392
+ }
5393
+ },
5394
+ {
5395
+ "model_format": "mlx",
5396
+ "model_size_in_billions": 671,
5397
+ "activated_size_in_billions": 37,
5398
+ "model_src": {
5399
+ "huggingface": {
5400
+ "quantizations": [
5401
+ "8bit",
5402
+ "4bit"
5403
+ ],
5404
+ "model_id": "mlx-community/DeepSeek-V3.1-{quantization}"
5405
+ },
5406
+ "modelscope": {
5407
+ "quantizations": [
5408
+ "8bit",
5409
+ "4bit"
5410
+ ],
5411
+ "model_id": "mlx-community/DeepSeek-V3.1-{quantization}"
5412
+ }
5413
+ }
5414
+ }
5415
+ ],
5416
+ "chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% if not thinking is defined %}{% set thinking = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, system_prompt='', is_first_sp=true, is_last_user=false) %}{%- for message in messages %}{%- if message['role'] == 'system' %}{%- if ns.is_first_sp %}{% set ns.system_prompt = ns.system_prompt + message['content'] %}{% set ns.is_first_sp = false %}{%- else %}{% set ns.system_prompt = ns.system_prompt + '\n\n' + message['content'] %}{%- endif %}{%- endif %}{%- endfor %}{{ bos_token }}{{ ns.system_prompt }}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{%- set ns.is_first = false -%}{%- set ns.is_last_user = true -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['tool_calls'] is defined and message['tool_calls'] is not none %}{%- if ns.is_last_user %}{{'<|Assistant|></think>'}}{%- endif %}{%- set ns.is_last_user = false -%}{%- set ns.is_first = false %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls'] %}{%- if not ns.is_first %}{%- if message['content'] is none %}{{'<|tool▁calls▁begin|><|tool▁call▁begin|>'+ tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments'] + '<|tool▁call▁end|>'}}{%- else %}{{message['content'] + '<|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments'] + '<|tool▁call▁end|>'}}{%- endif %}{%- set ns.is_first = true -%}{%- else %}{{'<|tool▁call▁begin|>'+ tool['function']['name'] + '<|tool▁sep|>' + tool['function']['arguments'] + '<|tool▁call▁end|>'}}{%- endif %}{%- endfor %}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- if message['role'] == 'assistant' and (message['tool_calls'] is not defined or message['tool_calls'] is none) %}{%- if ns.is_last_user %}{{'<|Assistant|>'}}{%- if message['prefix'] is defined and message['prefix'] and thinking %}{{'<think>'}} {%- else %}{{'</think>'}}{%- endif %}{%- endif %}{%- set ns.is_last_user = false -%}{%- if ns.is_tool %}{{message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{%- set content = message['content'] -%}{%- if '</think>' in content %}{%- set content = content.split('</think>', 1)[1] -%}{%- endif %}{{content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_last_user = false -%}{%- set ns.is_tool = true -%}{{'<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endfor -%}{%- if add_generation_prompt and ns.is_last_user and not ns.is_tool %}{{'<|Assistant|>'}}{%- if not thinking %}{{'</think>'}}{%- else %}{{'<think>'}}{%- endif %}{% endif %}",
5417
+ "stop_token_ids": [
5418
+ 1
5419
+ ],
5420
+ "stop": [
5421
+ "<|end▁of▁sentence|>"
5422
+ ],
5423
+ "reasoning_start_tag": "<think>",
5424
+ "reasoning_end_tag": "</think>",
5425
+ "virtualenv": {
5426
+ "packages": [
5427
+ "transformers==4.53.0"
5428
+ ]
5429
+ }
5430
+ },
5313
5431
  {
5314
5432
  "version": 2,
5315
5433
  "context_length": 131072,
@@ -6241,6 +6359,7 @@
6241
6359
  {
6242
6360
  "model_format": "pytorch",
6243
6361
  "model_size_in_billions": 671,
6362
+ "activated_size_in_billions": 37,
6244
6363
  "model_src": {
6245
6364
  "huggingface": {
6246
6365
  "quantizations": [
@@ -6261,6 +6380,7 @@
6261
6380
  {
6262
6381
  "model_format": "awq",
6263
6382
  "model_size_in_billions": 671,
6383
+ "activated_size_in_billions": 37,
6264
6384
  "model_src": {
6265
6385
  "huggingface": {
6266
6386
  "quantizations": [
@@ -6280,6 +6400,7 @@
6280
6400
  {
6281
6401
  "model_format": "ggufv2",
6282
6402
  "model_size_in_billions": 671,
6403
+ "activated_size_in_billions": 37,
6283
6404
  "model_src": {
6284
6405
  "huggingface": {
6285
6406
  "quantizations": [
@@ -6474,6 +6595,7 @@
6474
6595
  {
6475
6596
  "model_format": "mlx",
6476
6597
  "model_size_in_billions": 671,
6598
+ "activated_size_in_billions": 37,
6477
6599
  "model_src": {
6478
6600
  "huggingface": {
6479
6601
  "quantizations": [
@@ -6516,6 +6638,7 @@
6516
6638
  {
6517
6639
  "model_format": "pytorch",
6518
6640
  "model_size_in_billions": 671,
6641
+ "activated_size_in_billions": 37,
6519
6642
  "model_src": {
6520
6643
  "huggingface": {
6521
6644
  "quantizations": [
@@ -6534,6 +6657,7 @@
6534
6657
  {
6535
6658
  "model_format": "awq",
6536
6659
  "model_size_in_billions": 671,
6660
+ "activated_size_in_billions": 37,
6537
6661
  "model_src": {
6538
6662
  "huggingface": {
6539
6663
  "quantizations": [
@@ -6552,6 +6676,7 @@
6552
6676
  {
6553
6677
  "model_format": "mlx",
6554
6678
  "model_size_in_billions": 671,
6679
+ "activated_size_in_billions": 37,
6555
6680
  "model_src": {
6556
6681
  "huggingface": {
6557
6682
  "quantizations": [
@@ -7686,7 +7811,7 @@
7686
7811
  "packages": [
7687
7812
  "transformers>=4.51.3",
7688
7813
  "mlx-lm>=0.23.1 ; sys_platform=='darwin'",
7689
- "numpy==1.26.4"
7814
+ "#system_numpy#"
7690
7815
  ]
7691
7816
  }
7692
7817
  },
@@ -15520,7 +15645,7 @@
15520
15645
  "virtualenv": {
15521
15646
  "packages": [
15522
15647
  "git+https://github.com/huggingface/transformers@v4.51.3-Qwen2.5-Omni-preview",
15523
- "numpy==1.26.4",
15648
+ "#system_numpy#",
15524
15649
  "qwen_omni_utils",
15525
15650
  "soundfile"
15526
15651
  ]
@@ -17301,7 +17426,7 @@
17301
17426
  "packages": [
17302
17427
  "transformers>=4.51.0",
17303
17428
  "mlx-lm>=0.24.0 ; sys_platform=='darwin'",
17304
- "numpy==1.26.4"
17429
+ "#system_numpy#"
17305
17430
  ]
17306
17431
  }
17307
17432
  },
@@ -17314,7 +17439,8 @@
17314
17439
  "zh"
17315
17440
  ],
17316
17441
  "model_ability": [
17317
- "chat"
17442
+ "chat",
17443
+ "tools"
17318
17444
  ],
17319
17445
  "model_description": "We introduce the updated version of the Qwen3-235B-A22B non-thinking mode, named Qwen3-235B-A22B-Instruct-2507",
17320
17446
  "model_specs": [
@@ -18540,7 +18666,8 @@
18540
18666
  "zh"
18541
18667
  ],
18542
18668
  "model_ability": [
18543
- "chat"
18669
+ "chat",
18670
+ "tools"
18544
18671
  ],
18545
18672
  "model_description": "we're announcing Qwen3-Coder, our most agentic code model to date",
18546
18673
  "model_specs": [
@@ -19303,15 +19430,13 @@
19303
19430
  }
19304
19431
  }
19305
19432
  ],
19306
- "chat_template": "{% macro render_item_list(item_list, tag_name='required') %}\n {%- if item_list is defined and item_list is iterable and item_list | length > 0 %}\n {%- if tag_name %}{{- '\\n<' ~ tag_name ~ '>' -}}{% endif %}\n {{- '[' }}\n {%- for item in item_list -%}\n {%- if loop.index > 1 %}{{- \", \"}}{% endif -%}\n {%- if item is string -%}\n {{ \"`\" ~ item ~ \"`\" }}\n {%- else -%}\n {{ item }}\n {%- endif -%}\n {%- endfor -%}\n {{- ']' }}\n {%- if tag_name %}{{- '</' ~ tag_name ~ '>' -}}{% endif %}\n {%- endif %}\n{% endmacro %}\n\n{%- if messages[0][\"role\"] == \"system\" %}\n {%- set system_message = messages[0][\"content\"] %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set loop_messages = messages %}\n{%- endif %}\n\n{%- if not tools is defined %}\n {%- set tools = [] %}\n{%- endif %}\n\n{%- if system_message is defined %}\n {{- \"<|im_start|>system\\n\" + system_message }}\n{%- else %}\n {%- if tools is iterable and tools | length > 0 %}\n {{- \"<|im_start|>system\\nYou are Qwen, a helpful AI assistant that can interact with a computer to solve tasks.\" }}\n {%- endif %}\n{%- endif %}\n{%- if tools is iterable and tools | length > 0 %}\n {{- \"\\n\\nYou have access to the following functions:\\n\\n\" }}\n {{- \"<tools>\" }}\n {%- for tool in tools %}\n {%- if tool.function is defined %}\n {%- set tool = tool.function %}\n {%- endif %}\n {{- \"\\n<function>\\n<name>\" ~ tool.name ~ \"</name>\" }}\n {{- '\\n<description>' ~ (tool.description | trim) ~ '</description>' }}\n {{- '\\n<parameters>' }}\n {%- for param_name, param_fields in tool.parameters.properties|items %}\n {{- '\\n<parameter>' }}\n {{- '\\n<name>' ~ param_name ~ '</name>' }}\n {%- if param_fields.type is defined %}\n {{- '\\n<type>' ~ (param_fields.type | string) ~ '</type>' }}\n {%- endif %}\n {%- if param_fields.description is defined %}\n {{- '\\n<description>' ~ (param_fields.description | trim) ~ '</description>' }}\n {%- endif %}\n {{- render_item_list(param_fields.enum, 'enum') }}\n {%- set handled_keys = ['type', 'description', 'enum', 'required'] %}\n {%- for json_key in param_fields.keys() | reject(\"in\", handled_keys) %}\n {%- set normed_json_key = json_key | replace(\"-\", \"_\") | replace(\" \", \"_\") | replace(\"$\", \"\") %}\n {%- if param_fields[json_key] is mapping %}\n {{- '\\n<' ~ normed_json_key ~ '>' ~ (param_fields[json_key] | tojson | safe) ~ '</' ~ normed_json_key ~ '>' }}\n {%- else %}\n {{-'\\n<' ~ normed_json_key ~ '>' ~ (param_fields[json_key] | string) ~ '</' ~ normed_json_key ~ '>' }}\n {%- endif %}\n {%- endfor %}\n {{- render_item_list(param_fields.required, 'required') }}\n {{- '\\n</parameter>' }}\n {%- endfor %}\n {{- render_item_list(tool.parameters.required, 'required') }}\n {{- '\\n</parameters>' }}\n {%- if tool.return is defined %}\n {%- if tool.return is mapping %}\n {{- '\\n<return>' ~ (tool.return | tojson | safe) ~ '</return>' }}\n {%- else %}\n {{- '\\n<return>' ~ (tool.return | string) ~ '</return>' }}\n {%- endif %}\n {%- endif %}\n {{- '\\n</function>' }}\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{%- endif %}\n{%- if system_message is defined %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if tools is iterable and tools | length > 0 %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in loop_messages %}\n {%- if message.role == \"assistant\" and message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content is defined and message.content is string and message.content | trim | length > 0 %}\n {{- '\\n' + message.content | trim + '\\n' }}\n {%- endif %}\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 {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value if args_value is string else args_value | string %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"user\" or message.role == \"system\" or message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user\\n' }}\n {%- endif %}\n {{- '<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>\\n' }}\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 {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
19433
+ "chat_template": "{% macro render_extra_keys(json_dict, handled_keys) %}\n {%- if json_dict is mapping %}\n {%- for json_key in json_dict if json_key not in handled_keys %}\n {%- if json_dict[json_key] is mapping %}\n {{- '\\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | tojson | safe) ~ '</' ~ json_key ~ '>' }}\n {%- else %}\n {{-'\\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | string) ~ '</' ~ json_key ~ '>' }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n{% endmacro %}\n\n{%- if messages[0][\"role\"] == \"system\" %}\n {%- set system_message = messages[0][\"content\"] %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set loop_messages = messages %}\n{%- endif %}\n\n{%- if not tools is defined %}\n {%- set tools = [] %}\n{%- endif %}\n\n{%- if system_message is defined %}\n {{- \"<|im_start|>system\\n\" + system_message }}\n{%- else %}\n {%- if tools is iterable and tools | length > 0 %}\n {{- \"<|im_start|>system\\nYou are Qwen, a helpful AI assistant that can interact with a computer to solve tasks.\" }}\n {%- endif %}\n{%- endif %}\n{%- if tools is iterable and tools | length > 0 %}\n {{- \"\\n\\nYou have access to the following functions:\\n\\n\" }}\n {{- \"<tools>\" }}\n {%- for tool in tools %}\n {%- if tool.function is defined %}\n {%- set tool = tool.function %}\n {%- endif %}\n {{- \"\\n<function>\\n<name>\" ~ tool.name ~ \"</name>\" }}\n {%- if tool.description is defined %}\n {{- '\\n<description>' ~ (tool.description | trim) ~ '</description>' }}\n {%- endif %}\n {{- '\\n<parameters>' }}\n {%- if tool.parameters is defined and tool.parameters is mapping and tool.parameters.properties is defined and tool.parameters.properties is mapping %}\n {%- for param_name, param_fields in tool.parameters.properties|items %}\n {{- '\\n<parameter>' }}\n {{- '\\n<name>' ~ param_name ~ '</name>' }}\n {%- if param_fields.type is defined %}\n {{- '\\n<type>' ~ (param_fields.type | string) ~ '</type>' }}\n {%- endif %}\n {%- if param_fields.description is defined %}\n {{- '\\n<description>' ~ (param_fields.description | trim) ~ '</description>' }}\n {%- endif %}\n {%- set handled_keys = ['name', 'type', 'description'] %}\n {{- render_extra_keys(param_fields, handled_keys) }}\n {{- '\\n</parameter>' }}\n {%- endfor %}\n {%- endif %}\n {% set handled_keys = ['type', 'properties'] %}\n {{- render_extra_keys(tool.parameters, handled_keys) }}\n {{- '\\n</parameters>' }}\n {%- set handled_keys = ['type', 'name', 'description', 'parameters'] %}\n {{- render_extra_keys(tool, handled_keys) }}\n {{- '\\n</function>' }}\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{%- endif %}\n{%- if system_message is defined %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if tools is iterable and tools | length > 0 %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in loop_messages %}\n {%- if message.role == \"assistant\" and message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content is defined and message.content is string and message.content | trim | length > 0 %}\n {{- '\\n' + message.content | trim + '\\n' }}\n {%- endif %}\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 {{- '\\n<tool_call>\\n<function=' + tool_call.name + '>\\n' }}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' + args_name + '>\\n' }}\n {%- set args_value = args_value | tojson | safe if args_value is mapping else args_value | string %}\n {{- args_value }}\n {{- '\\n</parameter>\\n' }}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"user\" or message.role == \"system\" or message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user\\n' }}\n {%- endif %}\n {{- '<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>\\n' }}\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 {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
19307
19434
  "stop_token_ids": [
19308
19435
  151643,
19309
- 151644,
19310
19436
  151645
19311
19437
  ],
19312
19438
  "stop": [
19313
19439
  "<|endoftext|>",
19314
- "<|im_start|>",
19315
19440
  "<|im_end|>"
19316
19441
  ]
19317
19442
  },
@@ -20697,7 +20822,7 @@
20697
20822
  },
20698
20823
  {
20699
20824
  "version": 2,
20700
- "context_length": 65536,
20825
+ "context_length": 131072,
20701
20826
  "model_name": "glm-4.5",
20702
20827
  "model_lang": [
20703
20828
  "en",
@@ -20748,6 +20873,44 @@
20748
20873
  }
20749
20874
  }
20750
20875
  },
20876
+ {
20877
+ "model_format": "gptq",
20878
+ "model_size_in_billions": 355,
20879
+ "activated_size_in_billions": 32,
20880
+ "model_src": {
20881
+ "huggingface": {
20882
+ "quantizations": [
20883
+ "Int4-Int8Mix"
20884
+ ],
20885
+ "model_id": "QuantTrio/GLM-4.5-GPTQ-Int4-Int8Mix"
20886
+ },
20887
+ "modelscope": {
20888
+ "quantizations": [
20889
+ "Int4-Int8Mix"
20890
+ ],
20891
+ "model_id": "tclf90/GLM-4.5-GPTQ-Int4-Int8Mix"
20892
+ }
20893
+ }
20894
+ },
20895
+ {
20896
+ "model_format": "awq",
20897
+ "model_size_in_billions": 355,
20898
+ "activated_size_in_billions": 32,
20899
+ "model_src": {
20900
+ "huggingface": {
20901
+ "quantizations": [
20902
+ "Int4"
20903
+ ],
20904
+ "model_id": "QuantTrio/GLM-4.5-AWQ"
20905
+ },
20906
+ "modelscope": {
20907
+ "quantizations": [
20908
+ "Int4"
20909
+ ],
20910
+ "model_id": "tclf90/GLM-4.5-AWQ"
20911
+ }
20912
+ }
20913
+ },
20751
20914
  {
20752
20915
  "model_format": "mlx",
20753
20916
  "model_size_in_billions": 355,
@@ -20805,6 +20968,44 @@
20805
20968
  }
20806
20969
  }
20807
20970
  },
20971
+ {
20972
+ "model_format": "gptq",
20973
+ "model_size_in_billions": 106,
20974
+ "activated_size_in_billions": 12,
20975
+ "model_src": {
20976
+ "huggingface": {
20977
+ "quantizations": [
20978
+ "Int4-Int8Mix"
20979
+ ],
20980
+ "model_id": "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix"
20981
+ },
20982
+ "modelscope": {
20983
+ "quantizations": [
20984
+ "Int4-Int8Mix"
20985
+ ],
20986
+ "model_id": "tclf90/GLM-4.5-Air-GPTQ-Int4-Int8Mix"
20987
+ }
20988
+ }
20989
+ },
20990
+ {
20991
+ "model_format": "awq",
20992
+ "model_size_in_billions": 106,
20993
+ "activated_size_in_billions": 12,
20994
+ "model_src": {
20995
+ "huggingface": {
20996
+ "quantizations": [
20997
+ "AWQ-FP16Mix"
20998
+ ],
20999
+ "model_id": "QuantTrio/GLM-4.5-Air-AWQ-FP16Mix"
21000
+ },
21001
+ "modelscope": {
21002
+ "quantizations": [
21003
+ "AWQ-FP16Mix"
21004
+ ],
21005
+ "model_id": "tclf90/GLM-4.5-Air-AWQ-FP16Mix"
21006
+ }
21007
+ }
21008
+ },
20808
21009
  {
20809
21010
  "model_format": "mlx",
20810
21011
  "model_size_in_billions": 106,
@@ -20852,5 +21053,481 @@
20852
21053
  "#system_numpy#"
20853
21054
  ]
20854
21055
  }
21056
+ },
21057
+ {
21058
+ "version": 2,
21059
+ "context_length": 131072,
21060
+ "model_name": "glm-4.5v",
21061
+ "model_lang": [
21062
+ "en",
21063
+ "zh"
21064
+ ],
21065
+ "model_ability": [
21066
+ "chat",
21067
+ "vision",
21068
+ "reasoning"
21069
+ ],
21070
+ "model_description": "GLM-4.5V is based on ZhipuAI’s next-generation flagship text foundation model GLM-4.5-Air (106B parameters, 12B active). It continues the technical approach of GLM-4.1V-Thinking, achieving SOTA performance among models of the same scale on 42 public vision-language benchmarks.",
21071
+ "model_specs": [
21072
+ {
21073
+ "model_format": "pytorch",
21074
+ "model_size_in_billions": 106,
21075
+ "activated_size_in_billions": 12,
21076
+ "model_src": {
21077
+ "huggingface": {
21078
+ "quantizations": [
21079
+ "none"
21080
+ ],
21081
+ "model_id": "zai-org/GLM-4.5V"
21082
+ },
21083
+ "modelscope": {
21084
+ "quantizations": [
21085
+ "none"
21086
+ ],
21087
+ "model_id": "ZhipuAI/GLM-4.5V"
21088
+ }
21089
+ }
21090
+ },
21091
+ {
21092
+ "model_format": "fp8",
21093
+ "model_size_in_billions": 106,
21094
+ "activated_size_in_billions": 12,
21095
+ "model_src": {
21096
+ "huggingface": {
21097
+ "quantizations": [
21098
+ "FP8"
21099
+ ],
21100
+ "model_id": "zai-org/GLM-4.5V-FP8"
21101
+ },
21102
+ "modelscope": {
21103
+ "quantizations": [
21104
+ "FP8"
21105
+ ],
21106
+ "model_id": "ZhipuAI/GLM-4.5V-FP8"
21107
+ }
21108
+ }
21109
+ },
21110
+ {
21111
+ "model_format": "awq",
21112
+ "model_size_in_billions": 106,
21113
+ "activated_size_in_billions": 12,
21114
+ "model_src": {
21115
+ "huggingface": {
21116
+ "quantizations": [
21117
+ "Int4"
21118
+ ],
21119
+ "model_id": "QuantTrio/GLM-4.5V-AWQ"
21120
+ },
21121
+ "modelscope": {
21122
+ "quantizations": [
21123
+ "Int4"
21124
+ ],
21125
+ "model_id": "tclf90/GLM-4.5V-AWQ"
21126
+ }
21127
+ }
21128
+ },
21129
+ {
21130
+ "model_format": "mlx",
21131
+ "model_size_in_billions": 106,
21132
+ "activated_size_in_billions": 12,
21133
+ "model_src": {
21134
+ "huggingface": {
21135
+ "quantizations": [
21136
+ "3bit",
21137
+ "4bit",
21138
+ "5bit",
21139
+ "6bit",
21140
+ "8bit"
21141
+ ],
21142
+ "model_id": "mlx-community/GLM-4.5V-{quantization}"
21143
+ },
21144
+ "modelscope": {
21145
+ "quantizations": [
21146
+ "3bit",
21147
+ "4bit",
21148
+ "5bit",
21149
+ "6bit",
21150
+ "8bit"
21151
+ ],
21152
+ "model_id": "mlx-community/GLM-4.5V-{quantization}"
21153
+ }
21154
+ }
21155
+ }
21156
+ ],
21157
+ "chat_template": "[gMASK]<sop>\n{%- if tools -%}\n<|system|>\n# Tools\nYou may call one or more functions to assist with the user query.\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>\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{%- else -%}\n<|observation|>{% for tr in m.content %}\n<tool_response>\n{{ tr.output if tr.output is defined else tr }}\n</tool_response>{% endfor -%}\n{% endif -%}\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 -%}",
21158
+ "stop_token_ids": [
21159
+ 151329,
21160
+ 151336,
21161
+ 151338
21162
+ ],
21163
+ "stop": [
21164
+ "<|endoftext|>",
21165
+ "<|user|>",
21166
+ "<|observation|>"
21167
+ ],
21168
+ "reasoning_start_tag": "<think>",
21169
+ "reasoning_end_tag": "</think>",
21170
+ "virtualenv": {
21171
+ "packages": [
21172
+ "transformers>=4.55.0",
21173
+ "#system_numpy#"
21174
+ ]
21175
+ }
21176
+ },
21177
+ {
21178
+ "version": 2,
21179
+ "context_length": 131072,
21180
+ "model_name": "gpt-oss",
21181
+ "model_lang": [
21182
+ "en"
21183
+ ],
21184
+ "model_ability": [
21185
+ "chat",
21186
+ "reasoning"
21187
+ ],
21188
+ "model_description": "gpt-oss series, OpenAI’s open-weight models designed for powerful reasoning, agentic tasks, and versatile developer use cases.",
21189
+ "model_specs": [
21190
+ {
21191
+ "model_format": "pytorch",
21192
+ "model_size_in_billions": 20,
21193
+ "activated_size_in_billions": "3_6",
21194
+ "model_src": {
21195
+ "huggingface": {
21196
+ "quantizations": [
21197
+ "none"
21198
+ ],
21199
+ "model_id": "openai/gpt-oss-20b"
21200
+ },
21201
+ "modelscope": {
21202
+ "quantizations": [
21203
+ "none"
21204
+ ],
21205
+ "model_id": "openai-mirror/gpt-oss-20b"
21206
+ }
21207
+ }
21208
+ },
21209
+ {
21210
+ "model_format": "bnb",
21211
+ "model_size_in_billions": 20,
21212
+ "activated_size_in_billions": "3_6",
21213
+ "model_src": {
21214
+ "huggingface": {
21215
+ "quantizations": [
21216
+ "4-bit"
21217
+ ],
21218
+ "model_id": "unsloth/gpt-oss-20b-bnb-4bit"
21219
+ },
21220
+ "modelscope": {
21221
+ "quantizations": [
21222
+ "4-bit"
21223
+ ],
21224
+ "model_id": "unsloth/gpt-oss-20b-bnb-4bit"
21225
+ }
21226
+ }
21227
+ },
21228
+ {
21229
+ "model_format": "pytorch",
21230
+ "model_size_in_billions": 120,
21231
+ "activated_size_in_billions": "5_1",
21232
+ "model_src": {
21233
+ "huggingface": {
21234
+ "quantizations": [
21235
+ "none"
21236
+ ],
21237
+ "model_id": "openai/gpt-oss-120b"
21238
+ },
21239
+ "modelscope": {
21240
+ "quantizations": [
21241
+ "none"
21242
+ ],
21243
+ "model_id": "openai-mirror/gpt-oss-120b"
21244
+ }
21245
+ }
21246
+ }
21247
+ ],
21248
+ "chat_template": "{#-\n In addition to the normal inputs of `messages` and `tools`, this template also accepts the\n following kwargs:\n - \"builtin_tools\": A list, can contain \"browser\" and/or \"python\".\n - \"model_identity\": A string that optionally describes the model identity.\n - \"reasoning_effort\": A string that describes the reasoning effort, defaults to \"medium\".\n #}\n\n{#- Tool Definition Rendering ============================================== #}\n{%- macro render_typescript_type(param_spec, required_params, is_nullable=false) -%}\n {%- if param_spec.type == \"array\" -%}\n {%- if param_spec['items'] -%}\n {%- if param_spec['items']['type'] == \"string\" -%}\n {{- \"string[]\" }}\n {%- elif param_spec['items']['type'] == \"number\" -%}\n {{- \"number[]\" }}\n {%- elif param_spec['items']['type'] == \"integer\" -%}\n {{- \"number[]\" }}\n {%- elif param_spec['items']['type'] == \"boolean\" -%}\n {{- \"boolean[]\" }}\n {%- else -%}\n {%- set inner_type = render_typescript_type(param_spec['items'], required_params) -%}\n {%- if inner_type == \"object | object\" or inner_type|length > 50 -%}\n {{- \"any[]\" }}\n {%- else -%}\n {{- inner_type + \"[]\" }}\n {%- endif -%}\n {%- endif -%}\n {%- if param_spec.nullable -%}\n {{- \" | null\" }}\n {%- endif -%}\n {%- else -%}\n {{- \"any[]\" }}\n {%- if param_spec.nullable -%}\n {{- \" | null\" }}\n {%- endif -%}\n {%- endif -%}\n {%- elif param_spec.type is defined and param_spec.type is iterable and param_spec.type is not string and param_spec.type is not mapping and param_spec.type[0] is defined -%}\n {#- Handle array of types like [\"object\", \"object\"] from Union[dict, list] #}\n {%- if param_spec.type | length > 1 -%}\n {{- param_spec.type | join(\" | \") }}\n {%- else -%}\n {{- param_spec.type[0] }}\n {%- endif -%}\n {%- elif param_spec.oneOf -%}\n {#- Handle oneOf schemas - check for complex unions and fallback to any #}\n {%- set has_object_variants = false -%}\n {%- for variant in param_spec.oneOf -%}\n {%- if variant.type == \"object\" -%}\n {%- set has_object_variants = true -%}\n {%- endif -%}\n {%- endfor -%}\n {%- if has_object_variants and param_spec.oneOf|length > 1 -%}\n {{- \"any\" }}\n {%- else -%}\n {%- for variant in param_spec.oneOf -%}\n {{- render_typescript_type(variant, required_params) -}}\n {%- if variant.description %}\n {{- \"// \" + variant.description }}\n {%- endif -%}\n {%- if variant.default is defined %}\n {{ \"// default: \" + variant.default|tojson }}\n {%- endif -%}\n {%- if not loop.last %}\n {{- \" | \" }}\n {% endif -%}\n {%- endfor -%}\n {%- endif -%}\n {%- elif param_spec.type == \"string\" -%}\n {%- if param_spec.enum -%}\n {{- '\"' + param_spec.enum|join('\" | \"') + '\"' -}}\n {%- else -%}\n {{- \"string\" }}\n {%- if param_spec.nullable %}\n {{- \" | null\" }}\n {%- endif -%}\n {%- endif -%}\n {%- elif param_spec.type == \"number\" -%}\n {{- \"number\" }}\n {%- elif param_spec.type == \"integer\" -%}\n {{- \"number\" }}\n {%- elif param_spec.type == \"boolean\" -%}\n {{- \"boolean\" }}\n\n {%- elif param_spec.type == \"object\" -%}\n {%- if param_spec.properties -%}\n {{- \"{\n\" }}\n {%- for prop_name, prop_spec in param_spec.properties.items() -%}\n {{- prop_name -}}\n {%- if prop_name not in (param_spec.required or []) -%}\n {{- \"?\" }}\n {%- endif -%}\n {{- \": \" }}\n {{ render_typescript_type(prop_spec, param_spec.required or []) }}\n {%- if not loop.last -%}\n {{-\", \" }}\n {%- endif -%}\n {%- endfor -%}\n {{- \"}\" }}\n {%- else -%}\n {{- \"object\" }}\n {%- endif -%}\n {%- else -%}\n {{- \"any\" }}\n {%- endif -%}\n{%- endmacro -%}\n\n{%- macro render_tool_namespace(namespace_name, tools) -%}\n {{- \"## \" + namespace_name + \"\n\n\" }}\n {{- \"namespace \" + namespace_name + \" {\n\n\" }}\n {%- for tool in tools %}\n {%- set tool = tool.function %}\n {{- \"// \" + tool.description + \"\n\" }}\n {{- \"type \"+ tool.name + \" = \" }}\n {%- if tool.parameters and tool.parameters.properties %}\n {{- \"(_: {\n\" }}\n {%- for param_name, param_spec in tool.parameters.properties.items() %}\n {%- if param_spec.description %}\n {{- \"// \" + param_spec.description + \"\n\" }}\n {%- endif %}\n {{- param_name }}\n {%- if param_name not in (tool.parameters.required or []) -%}\n {{- \"?\" }}\n {%- endif -%}\n {{- \": \" }}\n {{- render_typescript_type(param_spec, tool.parameters.required or []) }}\n {%- if param_spec.default is defined -%}\n {%- if param_spec.enum %}\n {{- \", // default: \" + param_spec.default }}\n {%- elif param_spec.oneOf %}\n {{- \"// default: \" + param_spec.default }}\n {%- else %}\n {{- \", // default: \" + param_spec.default|tojson }}\n {%- endif -%}\n {%- endif -%}\n {%- if not loop.last %}\n {{- \",\n\" }}\n {%- else %}\n {{- \"\n\" }}\n {%- endif -%}\n {%- endfor %}\n {{- \"}) => any;\n\n\" }}\n {%- else -%}\n {{- \"() => any;\n\n\" }}\n {%- endif -%}\n {%- endfor %}\n {{- \"} // namespace \" + namespace_name }}\n{%- endmacro -%}\n\n{%- macro render_builtin_tools(browser_tool, python_tool) -%}\n {%- if browser_tool %}\n {{- \"## browser\n\n\" }}\n {{- \"// Tool for browsing.\n\" }}\n {{- \"// The `cursor` appears in brackets before each browsing display: `[{cursor}]`.\n\" }}\n {{- \"// Cite information from the tool using the following format:\n\" }}\n {{- \"// `\u3010{cursor}\u2020L{line_start}(-L{line_end})?\u3011`, for example: `\u30106\u2020L9-L11\u3011` or `\u30108\u2020L3\u3011`.\n\" }}\n {{- \"// Do not quote more than 10 words directly from the tool output.\n\" }}\n {{- \"// sources=web (default: web)\n\" }}\n {{- \"namespace browser {\n\n\" }}\n {{- \"// Searches for information related to `query` and displays `topn` results.\n\" }}\n {{- \"type search = (_: {\n\" }}\n {{- \"query: string,\n\" }}\n {{- \"topn?: number, // default: 10\n\" }}\n {{- \"source?: string,\n\" }}\n {{- \"}) => any;\n\n\" }}\n {{- \"// Opens the link `id` from the page indicated by `cursor` starting at line number `loc`, showing `num_lines` lines.\n\" }}\n {{- \"// Valid link ids are displayed with the formatting: `\u3010{id}\u2020.*\u3011`.\n\" }}\n {{- \"// If `cursor` is not provided, the most recent page is implied.\n\" }}\n {{- \"// If `id` is a string, it is treated as a fully qualified URL associated with `source`.\n\" }}\n {{- \"// If `loc` is not provided, the viewport will be positioned at the beginning of the document or centered on the most relevant passage, if available.\n\" }}\n {{- \"// Use this function without `id` to scroll to a new location of an opened page.\n\" }}\n {{- \"type open = (_: {\n\" }}\n {{- \"id?: number | string, // default: -1\n\" }}\n {{- \"cursor?: number, // default: -1\n\" }}\n {{- \"loc?: number, // default: -1\n\" }}\n {{- \"num_lines?: number, // default: -1\n\" }}\n {{- \"view_source?: boolean, // default: false\n\" }}\n {{- \"source?: string,\n\" }}\n {{- \"}) => any;\n\n\" }}\n {{- \"// Finds exact matches of `pattern` in the current page, or the page given by `cursor`.\n\" }}\n {{- \"type find = (_: {\n\" }}\n {{- \"pattern: string,\n\" }}\n {{- \"cursor?: number, // default: -1\n\" }}\n {{- \"}) => any;\n\n\" }}\n {{- \"} // namespace browser\n\n\" }}\n {%- endif -%}\n\n {%- if python_tool %}\n {{- \"## python\n\n\" }}\n {{- \"Use this tool to execute Python code in your chain of thought. The code will not be shown to the user. This tool should be used for internal reasoning, but not for code that is intended to be visible to the user (e.g. when creating plots, tables, or files).\n\n\" }}\n {{- \"When you send a message containing Python code to python, it will be executed in a stateful Jupyter notebook environment. python will respond with the output of the execution or time out after 120.0 seconds. The drive at '/mnt/data' can be used to save and persist user files. Internet access for this session is UNKNOWN. Depends on the cluster.\n\n\" }}\n {%- endif -%}\n{%- endmacro -%}\n\n{#- System Message Construction ============================================ #}\n{%- macro build_system_message() -%}\n {%- if model_identity is not defined %}\n {%- set model_identity = \"You are ChatGPT, a large language model trained by OpenAI.\" %}\n {%- endif %}\n {{- model_identity + \"\n\" }}\n {{- \"Knowledge cutoff: 2024-06\n\" }}\n {{- \"Current date: \" + strftime_now(\"%Y-%m-%d\") + \"\n\n\" }}\n {%- if reasoning_effort is not defined %}\n {%- set reasoning_effort = \"medium\" %}\n {%- endif %}\n {{- \"Reasoning: \" + reasoning_effort + \"\n\n\" }}\n {%- if builtin_tools %}\n {{- \"# Tools\n\n\" }}\n {%- set available_builtin_tools = namespace(browser=false, python=false) %}\n {%- for tool in builtin_tools %}\n {%- if tool == \"browser\" %}\n {%- set available_builtin_tools.browser = true %}\n {%- elif tool == \"python\" %}\n {%- set available_builtin_tools.python = true %}\n {%- endif %}\n {%- endfor %}\n {{- render_builtin_tools(available_builtin_tools.browser, available_builtin_tools.python) }}\n {%- endif -%}\n {{- \"# Valid channels: analysis, commentary, final. Channel must be included for every message.\" }}\n {%- if tools -%}\n {{- \"\nCalls to these tools must go to the commentary channel: 'functions'.\" }}\n {%- endif -%}\n{%- endmacro -%}\n\n{#- Main Template Logic ================================================= #}\n{#- Set defaults #}\n\n{#- Render system message #}\n{{- \"<|start|>system<|message|>\" }}\n{{- build_system_message() }}\n{{- \"<|end|>\" }}\n\n{#- Extract developer message #}\n{%- if messages[0].role == \"developer\" or messages[0].role == \"system\" %}\n {%- set developer_message = messages[0].content %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set developer_message = \"\" %}\n {%- set loop_messages = messages %}\n{%- endif %}\n\n{#- Render developer message #}\n{%- if developer_message or tools %}\n {{- \"<|start|>developer<|message|>\" }}\n {%- if developer_message %}\n {{- \"# Instructions\n\n\" }}\n {{- developer_message }}\n {%- endif %}\n {%- if tools -%}\n {{- \"\n\n\" }}\n {{- \"# Tools\n\n\" }}\n {{- render_tool_namespace(\"functions\", tools) }}\n {%- endif -%}\n {{- \"<|end|>\" }}\n{%- endif %}\n\n{#- Render messages #}\n{%- set last_tool_call = namespace(name=none) %}\n{%- for message in loop_messages -%}\n {#- At this point only assistant/user/tool messages should remain #}\n {%- if message.role == 'assistant' -%}\n {#- Checks to ensure the messages are being passed in the format we expect #}\n {%- if \"content\" in message %}\n {%- if \"<|channel|>analysis<|message|>\" in message.content or \"<|channel|>final<|message|>\" in message.content %}\n {{- raise_exception(\"You have passed a message containing <|channel|> tags in the content field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.\") }}\n {%- endif %}\n {%- endif %}\n {%- if \"thinking\" in message %}\n {%- if \"<|channel|>analysis<|message|>\" in message.thinking or \"<|channel|>final<|message|>\" in message.thinking %}\n {{- raise_exception(\"You have passed a message containing <|channel|> tags in the thinking field. Instead of doing this, you should pass analysis messages (the string between '<|message|>' and '<|end|>') in the 'thinking' field, and final messages (the string between '<|message|>' and '<|end|>') in the 'content' field.\") }}\n {%- endif %}\n {%- endif %}\n {%- if \"tool_calls\" in message %}\n {#- We assume max 1 tool call per message, and so we infer the tool call name #}\n {#- in \"tool\" messages from the most recent assistant tool call name #}\n {%- set tool_call = message.tool_calls[0] %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {%- if message.content and message.thinking %}\n {{- raise_exception(\"Cannot pass both content and thinking in an assistant message with tool calls! Put the analysis message in one or the other, but not both.\") }}\n {%- elif message.content %}\n {{- \"<|start|>assistant<|channel|>analysis<|message|>\" + message.content + \"<|end|>\" }}\n {%- elif message.thinking %}\n {{- \"<|start|>assistant<|channel|>analysis<|message|>\" + message.thinking + \"<|end|>\" }}\n {%- endif %}\n {{- \"<|start|>assistant to=\" }}\n {{- \"functions.\" + tool_call.name + \"<|channel|>commentary \" }}\n {{- (tool_call.content_type if tool_call.content_type is defined else \"json\") + \"<|message|>\" }}\n {{- tool_call.arguments|tojson }}\n {{- \"<|call|>\" }}\n {%- set last_tool_call.name = tool_call.name %}\n {%- elif loop.last and not add_generation_prompt %}\n {#- Only render the CoT if the final turn is an assistant turn and add_generation_prompt is false #}\n {#- This is a situation that should only occur in training, never in inference. #}\n {%- if \"thinking\" in message %}\n {{- \"<|start|>assistant<|channel|>analysis<|message|>\" + message.thinking + \"<|end|>\" }}\n {%- endif %}\n {#- <|return|> indicates the end of generation, but <|end|> does not #}\n {#- <|return|> should never be an input to the model, but we include it as the final token #}\n {#- when training, so the model learns to emit it. #}\n {{- \"<|start|>assistant<|channel|>final<|message|>\" + message.content + \"<|return|>\" }}\n {%- else %}\n {#- CoT is dropped during all previous turns, so we never render it for inference #}\n {{- \"<|start|>assistant<|channel|>final<|message|>\" + message.content + \"<|end|>\" }}\n {%- set last_tool_call.name = none %}\n {%- endif %}\n {%- elif message.role == 'tool' -%}\n {%- if last_tool_call.name is none %}\n {{- raise_exception(\"Message has tool role, but there was no previous assistant message with a tool call!\") }}\n {%- endif %}\n {{- \"<|start|>functions.\" + last_tool_call.name }}\n {{- \" to=assistant<|channel|>commentary<|message|>\" + message.content|tojson + \"<|end|>\" }}\n {%- elif message.role == 'user' -%}\n {{- \"<|start|>user<|message|>\" + message.content + \"<|end|>\" }}\n {%- endif -%}\n{%- endfor -%}\n\n{#- Generation prompt #}\n{%- if add_generation_prompt -%}\n<|start|>assistant\n{%- endif -%}",
21249
+ "stop_token_ids": [
21250
+ 200002,
21251
+ 199999
21252
+ ],
21253
+ "stop": [
21254
+ "<|endoftext|>",
21255
+ "<|return|>"
21256
+ ],
21257
+ "virtualenv": {
21258
+ "packages": [
21259
+ "transformers>=4.55.0,<4.56.0",
21260
+ "kernels==0.9.0",
21261
+ "#system_numpy#"
21262
+ ]
21263
+ }
21264
+ },
21265
+ {
21266
+ "version": 2,
21267
+ "context_length": 131072,
21268
+ "model_name": "KAT-V1",
21269
+ "model_lang": [
21270
+ "en",
21271
+ "zh"
21272
+ ],
21273
+ "model_ability": [
21274
+ "chat"
21275
+ ],
21276
+ "model_description": "Kwaipilot-AutoThink ranks first among all open-source models on LiveCodeBench Pro, a challenging benchmark explicitly designed to prevent data leakage, and even surpasses strong proprietary systems such as Seed and o3-mini.",
21277
+ "model_specs": [
21278
+ {
21279
+ "model_format": "pytorch",
21280
+ "model_size_in_billions": 40,
21281
+ "model_src": {
21282
+ "huggingface": {
21283
+ "quantizations": [
21284
+ "none"
21285
+ ],
21286
+ "model_id": "Kwaipilot/KAT-V1-40B"
21287
+ },
21288
+ "modelscope": {
21289
+ "quantizations": [
21290
+ "none"
21291
+ ],
21292
+ "model_id": "Kwaipilot/KAT-V1-40B"
21293
+ }
21294
+ }
21295
+ },
21296
+ {
21297
+ "model_format": "gptq",
21298
+ "model_size_in_billions": 40,
21299
+ "model_src": {
21300
+ "huggingface": {
21301
+ "quantizations": [
21302
+ "Int4-Int8Mix"
21303
+ ],
21304
+ "model_id": "QuantTrio/KAT-V1-40B-GPTQ-Int4-Int8Mix"
21305
+ },
21306
+ "modelscope": {
21307
+ "quantizations": [
21308
+ "Int4-Int8Mix"
21309
+ ],
21310
+ "model_id": "tclf90/KAT-V1-40B-GPTQ-Int4-Int8Mix"
21311
+ }
21312
+ }
21313
+ },
21314
+ {
21315
+ "model_format": "awq",
21316
+ "model_size_in_billions": 40,
21317
+ "model_src": {
21318
+ "huggingface": {
21319
+ "quantizations": [
21320
+ "Int4"
21321
+ ],
21322
+ "model_id": "QuantTrio/KAT-V1-40B-AWQ"
21323
+ },
21324
+ "modelscope": {
21325
+ "quantizations": [
21326
+ "Int4"
21327
+ ],
21328
+ "model_id": "tclf90/KAT-V1-40B-AWQ"
21329
+ }
21330
+ }
21331
+ }
21332
+ ],
21333
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- '' }}\n {%- endif %}\n {{- \"\\n\\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 {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" and not message.tool_calls %}\n {%- set content = message.content %}\n {%- if not loop.last %}\n {%- set answer_blocks = message.content.split('<answer>\\n') %}\n {%- if answer_blocks|length > 1 %}\n {%- set last_answer_block = answer_blocks[-1] %}\n {%- if '\\n</answer>' in last_answer_block %}\n {%- set content = last_answer_block.split('\\n</answer>')[0] %}\n {%- else %}\n {%- set content = message.content.split('<think_off>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- else %}\n {%- set content = message.content.split('<think_off>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content %}\n {%- if not loop.last %}\n {%- set answer_blocks = message.content.split('<answer>\\n') %}\n {%- if answer_blocks|length > 1 %}\n {%- set last_answer_block = answer_blocks[-1] %}\n {%- if '\\n</answer>' in last_answer_block %}\n {%- set content = last_answer_block.split('\\n</answer>')[0] %}\n {%- else %}\n {%- set content = message.content.split('<think_off>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- else %}\n {%- set content = message.content.split('<think_off>')[-1].lstrip('\\n') %}\n {%- set content = content.split('</think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + content }}\n {%- endif %}\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 {{- '\\n<tool_call>\\n{\\\"name\\\": \\\"' }}\n {{- tool_call.name }}\n {{- '\\\", \\\"arguments\\\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n<judge>\\n' }}\n{%- endif %}",
21334
+ "stop_token_ids": [
21335
+ 151643,
21336
+ 151645
21337
+ ],
21338
+ "stop": [
21339
+ "<|endoftext|>",
21340
+ "<|im_end|>"
21341
+ ]
21342
+ },
21343
+ {
21344
+ "version": 2,
21345
+ "context_length": 524288,
21346
+ "model_name": "seed-oss",
21347
+ "model_lang": [
21348
+ "en",
21349
+ "zh"
21350
+ ],
21351
+ "model_ability": [
21352
+ "chat",
21353
+ "reasoning",
21354
+ "tools"
21355
+ ],
21356
+ "model_description": "Seed-OSS is a series of open-source large language models developed by ByteDance's Seed Team, designed for powerful long-context, reasoning, agent and general capabilities, and versatile developer-friendly features. Although trained with only 12T tokens, Seed-OSS achieves excellent performance on several popular open benchmarks.",
21357
+ "model_specs": [
21358
+ {
21359
+ "model_format": "pytorch",
21360
+ "model_size_in_billions": 36,
21361
+ "model_src": {
21362
+ "huggingface": {
21363
+ "quantizations": [
21364
+ "none"
21365
+ ],
21366
+ "model_id": "ByteDance-Seed/Seed-OSS-36B-Instruct"
21367
+ },
21368
+ "modelscope": {
21369
+ "quantizations": [
21370
+ "none"
21371
+ ],
21372
+ "model_id": "ByteDance-Seed/Seed-OSS-36B-Instruct"
21373
+ }
21374
+ }
21375
+ },
21376
+ {
21377
+ "model_format": "gptq",
21378
+ "model_size_in_billions": 36,
21379
+ "model_src": {
21380
+ "huggingface": {
21381
+ "quantizations": [
21382
+ "Int8",
21383
+ "Int4",
21384
+ "Int3"
21385
+ ],
21386
+ "model_id": "QuantTrio/Seed-OSS-36B-Instruct-GPTQ-{quantization}"
21387
+ },
21388
+ "modelscope": {
21389
+ "quantizations": [
21390
+ "Int8",
21391
+ "Int4",
21392
+ "Int3"
21393
+ ],
21394
+ "model_id": "tclf90/Seed-OSS-36B-Instruct-GPTQ-{quantization}"
21395
+ }
21396
+ }
21397
+ },
21398
+ {
21399
+ "model_format": "awq",
21400
+ "model_size_in_billions": 36,
21401
+ "model_src": {
21402
+ "huggingface": {
21403
+ "quantizations": [
21404
+ "Int4"
21405
+ ],
21406
+ "model_id": "QuantTrio/Seed-OSS-36B-Instruct-AWQ"
21407
+ },
21408
+ "modelscope": {
21409
+ "quantizations": [
21410
+ "Int4"
21411
+ ],
21412
+ "model_id": "tclf90/Seed-OSS-36B-Instruct-AWQ"
21413
+ }
21414
+ }
21415
+ },
21416
+ {
21417
+ "model_format": "mlx",
21418
+ "model_size_in_billions": 36,
21419
+ "model_src": {
21420
+ "huggingface": {
21421
+ "quantizations": [
21422
+ "4bit"
21423
+ ],
21424
+ "model_id": "mlx-community/Seed-OSS-36B-Instruct-4bit"
21425
+ },
21426
+ "modelscope": {
21427
+ "quantizations": [
21428
+ "4bit"
21429
+ ],
21430
+ "model_id": "mlx-community/Seed-OSS-36B-Instruct-4bit"
21431
+ }
21432
+ }
21433
+ },
21434
+ {
21435
+ "model_format": "ggufv2",
21436
+ "model_size_in_billions": 36,
21437
+ "model_src": {
21438
+ "huggingface": {
21439
+ "quantizations": [
21440
+ "BF16",
21441
+ "IQ4_NL",
21442
+ "IQ4_XS",
21443
+ "Q2_K",
21444
+ "Q2_K_L",
21445
+ "Q3_K_M",
21446
+ "Q3_K_S",
21447
+ "Q4_0",
21448
+ "Q4_1",
21449
+ "Q4_K_M",
21450
+ "Q4_K_S",
21451
+ "Q5_K_M",
21452
+ "Q5_K_S",
21453
+ "Q6_K",
21454
+ "Q8_0",
21455
+ "UD-IQ1_M",
21456
+ "UD-IQ1_S",
21457
+ "UD-IQ2_M",
21458
+ "UD-IQ2_XXS",
21459
+ "UD-IQ3_XXS",
21460
+ "UD-Q2_K_XL",
21461
+ "UD-Q3_K_XL",
21462
+ "UD-Q4_K_XL",
21463
+ "UD-Q5_K_XL",
21464
+ "UD-Q6_K_XL",
21465
+ "UD-Q8_K_XL"
21466
+ ],
21467
+ "quantization_parts": {
21468
+ "BF16": [
21469
+ "00001-of-00002",
21470
+ "00002-of-00002"
21471
+ ]
21472
+ },
21473
+ "model_id": "unsloth/Seed-OSS-36B-Instruct-GGUF",
21474
+ "model_file_name_template": "Seed-OSS-36B-Instruct-{quantization}.gguf",
21475
+ "model_file_name_split_template": "{quantization}/Seed-OSS-36B-Instruct-{quantization}-{part}.gguf"
21476
+ },
21477
+ "modelscope": {
21478
+ "quantizations": [
21479
+ "BF16",
21480
+ "IQ4_NL",
21481
+ "IQ4_XS",
21482
+ "Q2_K",
21483
+ "Q2_K_L",
21484
+ "Q3_K_M",
21485
+ "Q3_K_S",
21486
+ "Q4_0",
21487
+ "Q4_1",
21488
+ "Q4_K_M",
21489
+ "Q4_K_S",
21490
+ "Q5_K_M",
21491
+ "Q5_K_S",
21492
+ "Q6_K",
21493
+ "Q8_0",
21494
+ "UD-IQ1_M",
21495
+ "UD-IQ1_S",
21496
+ "UD-IQ2_M",
21497
+ "UD-IQ2_XXS",
21498
+ "UD-IQ3_XXS",
21499
+ "UD-Q2_K_XL",
21500
+ "UD-Q3_K_XL",
21501
+ "UD-Q4_K_XL",
21502
+ "UD-Q5_K_XL",
21503
+ "UD-Q6_K_XL",
21504
+ "UD-Q8_K_XL"
21505
+ ],
21506
+ "quantization_parts": {
21507
+ "BF16": [
21508
+ "00001-of-00002",
21509
+ "00002-of-00002"
21510
+ ]
21511
+ },
21512
+ "model_id": "unsloth/Seed-OSS-36B-Instruct-GGUF",
21513
+ "model_file_name_template": "Seed-OSS-36B-Instruct-{quantization}.gguf",
21514
+ "model_file_name_split_template": "{quantization}/Seed-OSS-36B-Instruct-{quantization}-{part}.gguf"
21515
+ }
21516
+ }
21517
+ }
21518
+ ],
21519
+ "chat_template": "{# ------------- special token variables ------------- #}{%- set bos_token = '<seed:bos>' -%}{%- set eos_token = '<seed:eos>' -%}{%- set pad_token = '<seed:pad>' -%}{%- set toolcall_begin_token = '<seed:tool_call>' -%}{%- set toolcall_end_token = '</seed:tool_call>' -%}{%- set think_begin_token = '<seed:think>' -%}{%- set think_end_token = '</seed:think>' -%}{%- set budget_begin_token = '<seed:cot_budget_reflect>'-%}{%- set budget_end_token = '</seed:cot_budget_reflect>'-%}{# -------------- reflection-interval lookup -------------- #}{%- if not thinking_budget is defined %}{%- set thinking_budget = -1 -%}{%- endif -%}{%- set budget_reflections_v05 = { 0: 0, 512: 128, 1024: 256, 2048: 512, 4096: 512, 8192: 1024, 16384: 1024} -%}{%- set ns = namespace(interval = None) -%}{%- for k, v in budget_reflections_v05 | dictsort -%} {%- if ns.interval is none and thinking_budget <= k -%} {%- set ns.interval = v -%} {%- endif -%}{%- endfor -%}{%- if ns.interval is none -%} {%- set ns.interval = budget_reflections_v05[16384] -%}{%- endif -%}{%- if messages[0][\"role\"] == \"system\" %}{%- set system_message = messages[0][\"content\"] %}{%- set loop_messages = messages[1:] %}{%- else %}{%- set loop_messages = messages %}{%- endif %}{%- if not tools is defined or tools is none %}{%- set tools = [] %}{%- endif %}{%- macro py_type(t) -%} {%- if t == \"string\" -%}str {%- elif t in (\"number\", \"integer\") -%}int {%- elif t == \"boolean\" -%}bool {%- elif t == \"array\" -%}list {%- else -%}Any{%- endif -%}{%- endmacro -%}{%- if system_message is defined %}{{ bos_token + \"system\\n\" + system_message }}{%- else %}{%- if tools is iterable and tools | length > 0 %}{{ bos_token + \"system\\nYou are Doubao, a helpful AI assistant. You may call one or more functions to assist with the user query.\" }}{%- endif %}{%- endif %}{%- if use_json_tooldef is defined and use_json_tooldef %}{{\"Tool List:\\nYou are authorized to use the following tools (described in JSON Schema format). Before performing any task, you must decide how to call them based on the descriptions and parameters of these tools.\"}}{{ tools | tojson(ensure_ascii=False) }}{%- else %}{%- for item in tools if item.type == \"function\" %}Function:def {{ item.function.name }}({%- for name, spec in item.function.parameters.properties.items() %} {{- name }}: {{ py_type(spec.type) }}{% if not loop.last %},{% endif %}{%- endfor %}): \"\"\" {{ item.function.description | trim }} {%- if item.function.parameters.properties %} Args: {%- for name, spec in item.function.parameters.properties.items() %} - {{ name }} ({{ py_type(spec.type) }}) {%- if name in item.function.parameters.required %} [必填]{% else %} [选填]{% endif %}: {{- \" \" ~ (spec.description or \"\") }} {%- endfor %} {%- endif %} {%- if item.function.returns is defined and item.function.returns.properties is defined and item.function.returns.properties %} Returns: {%- for name, spec in item.function.returns.properties.items() %} - {{ name }} ({{ py_type(spec.type) }}): {{- \" \" ~ (spec.description or \"\") }} {%- endfor %} {%- endif %} \"\"\"{%- endfor %}{%- endif %}{%- if tools is iterable and tools | length > 0 %}{{\"工具调用请遵循如下格式:\\n<seed:tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>value_1</parameter>\\n<parameter=example_parameter_2>This is the value for the second parameter\\nthat can span\\nmultiple lines</parameter>\\n</function>\\n</seed:tool_call>\\n\"}}{%- endif %}{%- if system_message is defined or tools is iterable and tools | length > 0 %}{{ eos_token }}{%- endif %}{%- if thinking_budget is defined %}{%- if thinking_budget == 0 %}{{ bos_token+\"system\" }}{{ \"You are an intelligent assistant that can answer questions in one step without the need for reasoning and thinking, that is, your thinking budget is 0. Next, please skip the thinking process and directly start answering the user's questions.\" }}{{ eos_token }}{%- elif not thinking_budget == -1 %}{{ bos_token+\"system\" }}{{ \"You are an intelligent assistant with reflective ability. In the process of thinking and reasoning, you need to strictly follow the thinking budget, which is \"}}{{thinking_budget}}{{\". That is, you need to complete your thinking within \"}}{{thinking_budget}}{{\" tokens and start answering the user's questions. You will reflect on your thinking process every \"}}{{ns.interval}}{{\" tokens, stating how many tokens have been used and how many are left.\"}}{{ eos_token }}{%- endif %}{%- endif %}{%- for message in loop_messages %}{%- if message.role == \"assistant\" and message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 %}{{ bos_token + message.role }}{%- if message.reasoning_content is defined and message.reasoning_content is string and message.reasoning_content | trim | length > 0 %}{{ \"\\n\" + think_begin_token + message.reasoning_content | trim + think_end_token }}{%- endif %}{%- if message.content is defined and message.content is string and message.content | trim | length > 0 %}{{ \"\\n\" + message.content | trim + \"\\n\" }}{%- endif %}{%- for tool_call in message.tool_calls %}{%- if tool_call.function is defined %}{% set tool_call = tool_call.function %}{% endif %}{{ \"\\n\" + toolcall_begin_token + \"\\n<function=\" + tool_call.name + \">\\n\" }}{%- if tool_call.arguments is defined %}{%- for arg_name, arg_value in tool_call.arguments | items %}{{ \"<parameter=\" + arg_name + \">\" }}{%- set arg_value = arg_value if arg_value is string else arg_value | string %}{{ arg_value+\"</parameter>\\n\" }}{%- endfor %}{%- endif %}{{ \"</function>\\n\" + toolcall_end_token }}{%- endfor %}{{ eos_token }}{%- elif message.role in [\"user\", \"system\"] %}{{ bos_token + message.role + \"\\n\" + message.content + eos_token }}{%- elif message.role == \"assistant\" %}{{ bos_token + message.role }}{%- if message.reasoning_content is defined and message.reasoning_content is string and message.reasoning_content | trim | length > 0 %}{{ \"\\n\" + think_begin_token + message.reasoning_content | trim + think_end_token }}{%- endif %}{%- if message.content is defined and message.content is string and message.content | trim | length > 0 %}{{ \"\\n\" + message.content | trim + eos_token }}{%- endif %}{%- else %}{{ bos_token + message.role + \"\\n\" + message.content + eos_token }}{%- endif %}{%- endfor %}{%- if add_generation_prompt %}{{ bos_token+\"assistant\\n\" }}{%- if thinking_budget == 0 %}{{ think_begin_token + \"\\n\" + budget_begin_token + \"The current thinking budget is 0, so I will directly start answering the question.\" + budget_end_token + \"\\n\" + think_end_token }}{%- endif %}{%- endif %}",
21520
+ "stop_token_ids": [
21521
+ 0,
21522
+ 1,
21523
+ 2
21524
+ ],
21525
+ "stop": [
21526
+ "<seed:bos>",
21527
+ "<seed:pad>",
21528
+ "<seed:eos>"
21529
+ ],
21530
+ "reasoning_start_tag": "<think>",
21531
+ "reasoning_end_tag": "</think>"
20855
21532
  }
20856
21533
  ]