xinference 1.4.1__py3-none-any.whl → 1.5.0.post1__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.
- xinference/_version.py +3 -3
- xinference/api/restful_api.py +50 -1
- xinference/client/restful/restful_client.py +82 -2
- xinference/constants.py +3 -0
- xinference/core/chat_interface.py +297 -83
- xinference/core/model.py +1 -0
- xinference/core/progress_tracker.py +16 -8
- xinference/core/supervisor.py +45 -1
- xinference/core/worker.py +262 -37
- xinference/deploy/cmdline.py +33 -1
- xinference/model/audio/core.py +11 -1
- xinference/model/audio/megatts.py +105 -0
- xinference/model/audio/model_spec.json +24 -1
- xinference/model/audio/model_spec_modelscope.json +26 -1
- xinference/model/core.py +14 -0
- xinference/model/embedding/core.py +6 -1
- xinference/model/flexible/core.py +6 -1
- xinference/model/image/core.py +6 -1
- xinference/model/image/model_spec.json +17 -1
- xinference/model/image/model_spec_modelscope.json +17 -1
- xinference/model/llm/__init__.py +0 -4
- xinference/model/llm/core.py +4 -0
- xinference/model/llm/llama_cpp/core.py +40 -16
- xinference/model/llm/llm_family.json +415 -84
- xinference/model/llm/llm_family.py +24 -1
- xinference/model/llm/llm_family_modelscope.json +449 -0
- xinference/model/llm/mlx/core.py +16 -2
- xinference/model/llm/transformers/__init__.py +14 -0
- xinference/model/llm/transformers/core.py +30 -6
- xinference/model/llm/transformers/gemma3.py +17 -2
- xinference/model/llm/transformers/intern_vl.py +28 -18
- xinference/model/llm/transformers/minicpmv26.py +21 -2
- xinference/model/llm/transformers/qwen-omni.py +308 -0
- xinference/model/llm/transformers/qwen2_audio.py +1 -1
- xinference/model/llm/transformers/qwen2_vl.py +20 -4
- xinference/model/llm/utils.py +11 -1
- xinference/model/llm/vllm/core.py +35 -0
- xinference/model/llm/vllm/distributed_executor.py +8 -2
- xinference/model/rerank/core.py +6 -1
- xinference/model/utils.py +118 -1
- xinference/model/video/core.py +6 -1
- xinference/thirdparty/megatts3/__init__.py +0 -0
- xinference/thirdparty/megatts3/tts/frontend_function.py +175 -0
- xinference/thirdparty/megatts3/tts/gradio_api.py +93 -0
- xinference/thirdparty/megatts3/tts/infer_cli.py +277 -0
- xinference/thirdparty/megatts3/tts/modules/aligner/whisper_small.py +318 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/ar_dur_predictor.py +362 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/layers.py +64 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/nar_tts_modules.py +73 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/rel_transformer.py +403 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/rot_transformer.py +649 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/seq_utils.py +342 -0
- xinference/thirdparty/megatts3/tts/modules/ar_dur/commons/transformer.py +767 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/cfm.py +309 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/dit.py +180 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/time_embedding.py +44 -0
- xinference/thirdparty/megatts3/tts/modules/llm_dit/transformer.py +230 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/diag_gaussian.py +67 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/hifigan_modules.py +283 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/seanet_encoder.py +38 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/decoder/wavvae_v3.py +60 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/encoder/common_modules/conv.py +154 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/encoder/common_modules/lstm.py +51 -0
- xinference/thirdparty/megatts3/tts/modules/wavvae/encoder/common_modules/seanet.py +126 -0
- xinference/thirdparty/megatts3/tts/utils/audio_utils/align.py +36 -0
- xinference/thirdparty/megatts3/tts/utils/audio_utils/io.py +95 -0
- xinference/thirdparty/megatts3/tts/utils/audio_utils/plot.py +90 -0
- xinference/thirdparty/megatts3/tts/utils/commons/ckpt_utils.py +171 -0
- xinference/thirdparty/megatts3/tts/utils/commons/hparams.py +215 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/dict.json +1 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/ph_tone_convert.py +94 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/split_text.py +90 -0
- xinference/thirdparty/megatts3/tts/utils/text_utils/text_encoder.py +280 -0
- xinference/types.py +10 -0
- xinference/utils.py +54 -0
- xinference/web/ui/build/asset-manifest.json +6 -6
- xinference/web/ui/build/index.html +1 -1
- xinference/web/ui/build/static/css/main.0f6523be.css +2 -0
- xinference/web/ui/build/static/css/main.0f6523be.css.map +1 -0
- xinference/web/ui/build/static/js/main.58bd483c.js +3 -0
- xinference/web/ui/build/static/js/main.58bd483c.js.map +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/3bff8cbe9141f937f4d98879a9771b0f48e0e4e0dbee8e647adbfe23859e7048.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/4500b1a622a031011f0a291701e306b87e08cbc749c50e285103536b85b6a914.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/51709f5d3e53bcf19e613662ef9b91fb9174942c5518987a248348dd4e1e0e02.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/69081049f0c7447544b7cfd73dd13d8846c02fe5febe4d81587e95c89a412d5b.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/b8551e9775a01b28ae674125c688febe763732ea969ae344512e64ea01bf632e.json +1 -0
- xinference/web/ui/node_modules/.cache/babel-loader/bf2b211b0d1b6465eff512d64c869d748f803c5651a7c24e48de6ea3484a7bfe.json +1 -0
- xinference/web/ui/src/locales/en.json +2 -1
- xinference/web/ui/src/locales/zh.json +2 -1
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/METADATA +129 -114
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/RECORD +96 -60
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/WHEEL +1 -1
- xinference/web/ui/build/static/css/main.b494ae7e.css +0 -2
- xinference/web/ui/build/static/css/main.b494ae7e.css.map +0 -1
- xinference/web/ui/build/static/js/main.5ca4eea1.js +0 -3
- xinference/web/ui/build/static/js/main.5ca4eea1.js.map +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/0f0967acaec5df1d45b80010949c258d64297ebbb0f44b8bb3afcbd45c6f0ec4.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/27bcada3ee8f89d21184b359f022fc965f350ffaca52c9814c29f1fc37121173.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/68249645124f37d01eef83b1d897e751f895bea919b6fb466f907c1f87cebc84.json +0 -1
- xinference/web/ui/node_modules/.cache/babel-loader/e547bbb18abb4a474b675a8d5782d25617566bea0af8caa9b836ce5649e2250a.json +0 -1
- /xinference/web/ui/build/static/js/{main.5ca4eea1.js.LICENSE.txt → main.58bd483c.js.LICENSE.txt} +0 -0
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/entry_points.txt +0 -0
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info/licenses}/LICENSE +0 -0
- {xinference-1.4.1.dist-info → xinference-1.5.0.post1.dist-info}/top_level.txt +0 -0
|
@@ -7289,6 +7289,148 @@
|
|
|
7289
7289
|
"stop_token_ids": [],
|
|
7290
7290
|
"stop": []
|
|
7291
7291
|
},
|
|
7292
|
+
{
|
|
7293
|
+
"version": 1,
|
|
7294
|
+
"context_length": 8192,
|
|
7295
|
+
"model_name": "InternVL3",
|
|
7296
|
+
"model_lang": [
|
|
7297
|
+
"en",
|
|
7298
|
+
"zh"
|
|
7299
|
+
],
|
|
7300
|
+
"model_ability": [
|
|
7301
|
+
"chat",
|
|
7302
|
+
"vision"
|
|
7303
|
+
],
|
|
7304
|
+
"model_description": "InternVL3, an advanced multimodal large language model (MLLM) series that demonstrates superior overall performance.",
|
|
7305
|
+
"model_specs": [
|
|
7306
|
+
{
|
|
7307
|
+
"model_format": "pytorch",
|
|
7308
|
+
"model_size_in_billions": 1,
|
|
7309
|
+
"quantizations": [
|
|
7310
|
+
"8-bit",
|
|
7311
|
+
"none"
|
|
7312
|
+
],
|
|
7313
|
+
"model_id": "OpenGVLab/InternVL3-1B"
|
|
7314
|
+
},
|
|
7315
|
+
{
|
|
7316
|
+
"model_format": "awq",
|
|
7317
|
+
"model_size_in_billions": 1,
|
|
7318
|
+
"quantizations": [
|
|
7319
|
+
"Int4"
|
|
7320
|
+
],
|
|
7321
|
+
"model_id": "OpenGVLab/InternVL3-1B-AWQ"
|
|
7322
|
+
},
|
|
7323
|
+
{
|
|
7324
|
+
"model_format": "pytorch",
|
|
7325
|
+
"model_size_in_billions": 2,
|
|
7326
|
+
"quantizations": [
|
|
7327
|
+
"8-bit",
|
|
7328
|
+
"none"
|
|
7329
|
+
],
|
|
7330
|
+
"model_id": "OpenGVLab/InternVL3-2B"
|
|
7331
|
+
},
|
|
7332
|
+
{
|
|
7333
|
+
"model_format": "awq",
|
|
7334
|
+
"model_size_in_billions": 2,
|
|
7335
|
+
"quantizations": [
|
|
7336
|
+
"Int4"
|
|
7337
|
+
],
|
|
7338
|
+
"model_id": "OpenGVLab/InternVL3-2B-AWQ"
|
|
7339
|
+
},
|
|
7340
|
+
{
|
|
7341
|
+
"model_format": "pytorch",
|
|
7342
|
+
"model_size_in_billions": 8,
|
|
7343
|
+
"quantizations": [
|
|
7344
|
+
"8-bit",
|
|
7345
|
+
"none"
|
|
7346
|
+
],
|
|
7347
|
+
"model_id": "OpenGVLab/InternVL3-8B"
|
|
7348
|
+
},
|
|
7349
|
+
{
|
|
7350
|
+
"model_format": "awq",
|
|
7351
|
+
"model_size_in_billions": 8,
|
|
7352
|
+
"quantizations": [
|
|
7353
|
+
"Int4"
|
|
7354
|
+
],
|
|
7355
|
+
"model_id": "OpenGVLab/InternVL3-8B-AWQ"
|
|
7356
|
+
},
|
|
7357
|
+
{
|
|
7358
|
+
"model_format": "pytorch",
|
|
7359
|
+
"model_size_in_billions": 9,
|
|
7360
|
+
"quantizations": [
|
|
7361
|
+
"8-bit",
|
|
7362
|
+
"none"
|
|
7363
|
+
],
|
|
7364
|
+
"model_id": "OpenGVLab/InternVL3-9B"
|
|
7365
|
+
},
|
|
7366
|
+
{
|
|
7367
|
+
"model_format": "awq",
|
|
7368
|
+
"model_size_in_billions": 9,
|
|
7369
|
+
"quantizations": [
|
|
7370
|
+
"Int4"
|
|
7371
|
+
],
|
|
7372
|
+
"model_id": "OpenGVLab/InternVL3-9B-AWQ"
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
"model_format": "pytorch",
|
|
7376
|
+
"model_size_in_billions": 14,
|
|
7377
|
+
"quantizations": [
|
|
7378
|
+
"8-bit",
|
|
7379
|
+
"none"
|
|
7380
|
+
],
|
|
7381
|
+
"model_id": "OpenGVLab/InternVL3-14B"
|
|
7382
|
+
},
|
|
7383
|
+
{
|
|
7384
|
+
"model_format": "awq",
|
|
7385
|
+
"model_size_in_billions": 14,
|
|
7386
|
+
"quantizations": [
|
|
7387
|
+
"Int4"
|
|
7388
|
+
],
|
|
7389
|
+
"model_id": "OpenGVLab/InternVL3-14B-AWQ"
|
|
7390
|
+
},
|
|
7391
|
+
{
|
|
7392
|
+
"model_format": "pytorch",
|
|
7393
|
+
"model_size_in_billions": 38,
|
|
7394
|
+
"quantizations": [
|
|
7395
|
+
"8-bit",
|
|
7396
|
+
"none"
|
|
7397
|
+
],
|
|
7398
|
+
"model_id": "OpenGVLab/InternVL3-38B"
|
|
7399
|
+
},
|
|
7400
|
+
{
|
|
7401
|
+
"model_format": "awq",
|
|
7402
|
+
"model_size_in_billions": 38,
|
|
7403
|
+
"quantizations": [
|
|
7404
|
+
"Int4"
|
|
7405
|
+
],
|
|
7406
|
+
"model_id": "OpenGVLab/InternVL3-38B-AWQ"
|
|
7407
|
+
},
|
|
7408
|
+
{
|
|
7409
|
+
"model_format": "pytorch",
|
|
7410
|
+
"model_size_in_billions": 78,
|
|
7411
|
+
"quantizations": [
|
|
7412
|
+
"8-bit",
|
|
7413
|
+
"none"
|
|
7414
|
+
],
|
|
7415
|
+
"model_id": "OpenGVLab/InternVL3-78B"
|
|
7416
|
+
},
|
|
7417
|
+
{
|
|
7418
|
+
"model_format": "awq",
|
|
7419
|
+
"model_size_in_billions": 78,
|
|
7420
|
+
"quantizations": [
|
|
7421
|
+
"Int4"
|
|
7422
|
+
],
|
|
7423
|
+
"model_id": "OpenGVLab/InternVL3-78B-AWQ"
|
|
7424
|
+
}
|
|
7425
|
+
],
|
|
7426
|
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\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 Qwen, created by Alibaba Cloud. You 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) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.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' }}\n{%- endif %}\n",
|
|
7427
|
+
"stop_token_ids": [
|
|
7428
|
+
151645
|
|
7429
|
+
],
|
|
7430
|
+
"stop": [
|
|
7431
|
+
"<|im_end|>"
|
|
7432
|
+
]
|
|
7433
|
+
},
|
|
7292
7434
|
{
|
|
7293
7435
|
"version": 1,
|
|
7294
7436
|
"context_length": 8192,
|
|
@@ -7767,6 +7909,49 @@
|
|
|
7767
7909
|
"<|endoftext|>"
|
|
7768
7910
|
]
|
|
7769
7911
|
},
|
|
7912
|
+
{
|
|
7913
|
+
"version":1,
|
|
7914
|
+
"context_length":32768,
|
|
7915
|
+
"model_name":"qwen2.5-omni",
|
|
7916
|
+
"model_lang":[
|
|
7917
|
+
"en",
|
|
7918
|
+
"zh"
|
|
7919
|
+
],
|
|
7920
|
+
"model_ability":[
|
|
7921
|
+
"chat",
|
|
7922
|
+
"vision",
|
|
7923
|
+
"audio",
|
|
7924
|
+
"omni"
|
|
7925
|
+
],
|
|
7926
|
+
"model_description":"Qwen2.5-Omni: the new flagship end-to-end multimodal model in the Qwen series.",
|
|
7927
|
+
"model_specs":[
|
|
7928
|
+
{
|
|
7929
|
+
"model_format":"pytorch",
|
|
7930
|
+
"model_size_in_billions":7,
|
|
7931
|
+
"quantizations":[
|
|
7932
|
+
"none"
|
|
7933
|
+
],
|
|
7934
|
+
"model_id":"Qwen/Qwen2.5-Omni-7B"
|
|
7935
|
+
}
|
|
7936
|
+
],
|
|
7937
|
+
"chat_template": "{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}",
|
|
7938
|
+
"stop_token_ids": [
|
|
7939
|
+
151645,
|
|
7940
|
+
151643
|
|
7941
|
+
],
|
|
7942
|
+
"stop": [
|
|
7943
|
+
"<|im_end|>",
|
|
7944
|
+
"<|endoftext|>"
|
|
7945
|
+
],
|
|
7946
|
+
"virtualenv": {
|
|
7947
|
+
"packages": [
|
|
7948
|
+
"git+https://github.com/huggingface/transformers@v4.51.3-Qwen2.5-Omni-preview",
|
|
7949
|
+
"numpy==1.26.4",
|
|
7950
|
+
"qwen_omni_utils",
|
|
7951
|
+
"soundfile"
|
|
7952
|
+
]
|
|
7953
|
+
}
|
|
7954
|
+
},
|
|
7770
7955
|
{
|
|
7771
7956
|
"version": 1,
|
|
7772
7957
|
"context_length": 32768,
|
|
@@ -9771,9 +9956,6 @@
|
|
|
9771
9956
|
"model_size_in_billions": 32,
|
|
9772
9957
|
"quantizations": [
|
|
9773
9958
|
"fp16",
|
|
9774
|
-
"q2_k",
|
|
9775
|
-
"q3_k_m",
|
|
9776
|
-
"q4_0",
|
|
9777
9959
|
"q4_k_m",
|
|
9778
9960
|
"q5_0",
|
|
9779
9961
|
"q5_k_m",
|
|
@@ -9782,90 +9964,28 @@
|
|
|
9782
9964
|
],
|
|
9783
9965
|
"quantization_parts": {
|
|
9784
9966
|
"fp16": [
|
|
9785
|
-
"00001-of-
|
|
9786
|
-
"00002-of-
|
|
9787
|
-
"00003-of-
|
|
9788
|
-
"00004-of-
|
|
9789
|
-
"00005-of-
|
|
9790
|
-
"00006-of-
|
|
9791
|
-
"00007-of-
|
|
9792
|
-
"00008-of-
|
|
9793
|
-
"00009-of-
|
|
9794
|
-
"00010-of-
|
|
9795
|
-
"00011-of-
|
|
9796
|
-
"00012-of-
|
|
9797
|
-
"00013-of-
|
|
9798
|
-
"00014-of-
|
|
9799
|
-
"00015-of-
|
|
9800
|
-
"00016-of-
|
|
9801
|
-
"00017-of-
|
|
9802
|
-
],
|
|
9803
|
-
"q2_k": [
|
|
9804
|
-
"00001-of-00004",
|
|
9805
|
-
"00002-of-00004",
|
|
9806
|
-
"00003-of-00004",
|
|
9807
|
-
"00004-of-00004"
|
|
9808
|
-
],
|
|
9809
|
-
"q3_k_m": [
|
|
9810
|
-
"00001-of-00005",
|
|
9811
|
-
"00002-of-00005",
|
|
9812
|
-
"00003-of-00005",
|
|
9813
|
-
"00004-of-00005",
|
|
9814
|
-
"00005-of-00005"
|
|
9815
|
-
],
|
|
9816
|
-
"q4_0": [
|
|
9817
|
-
"00001-of-00005",
|
|
9818
|
-
"00002-of-00005",
|
|
9819
|
-
"00003-of-00005",
|
|
9820
|
-
"00004-of-00005",
|
|
9821
|
-
"00005-of-00005"
|
|
9822
|
-
],
|
|
9823
|
-
"q4_k_m": [
|
|
9824
|
-
"00001-of-00005",
|
|
9825
|
-
"00002-of-00005",
|
|
9826
|
-
"00003-of-00005",
|
|
9827
|
-
"00004-of-00005",
|
|
9828
|
-
"00005-of-00005"
|
|
9829
|
-
],
|
|
9830
|
-
"q5_0": [
|
|
9831
|
-
"00001-of-00006",
|
|
9832
|
-
"00002-of-00006",
|
|
9833
|
-
"00003-of-00006",
|
|
9834
|
-
"00004-of-00006",
|
|
9835
|
-
"00005-of-00006",
|
|
9836
|
-
"00006-of-00006"
|
|
9837
|
-
],
|
|
9838
|
-
"q5_k_m": [
|
|
9839
|
-
"00001-of-00006",
|
|
9840
|
-
"00002-of-00006",
|
|
9841
|
-
"00003-of-00006",
|
|
9842
|
-
"00004-of-00006",
|
|
9843
|
-
"00005-of-00006",
|
|
9844
|
-
"00006-of-00006"
|
|
9845
|
-
],
|
|
9846
|
-
"q6_k": [
|
|
9847
|
-
"00001-of-00007",
|
|
9848
|
-
"00002-of-00007",
|
|
9849
|
-
"00003-of-00007",
|
|
9850
|
-
"00004-of-00007",
|
|
9851
|
-
"00005-of-00007",
|
|
9852
|
-
"00006-of-00007",
|
|
9853
|
-
"00007-of-00007"
|
|
9854
|
-
],
|
|
9855
|
-
"q8_0": [
|
|
9856
|
-
"00001-of-00009",
|
|
9857
|
-
"00002-of-00009",
|
|
9858
|
-
"00003-of-00009",
|
|
9859
|
-
"00004-of-00009",
|
|
9860
|
-
"00005-of-00009",
|
|
9861
|
-
"00006-of-00009",
|
|
9862
|
-
"00007-of-00009",
|
|
9863
|
-
"00008-of-00009",
|
|
9864
|
-
"00009-of-00009"
|
|
9967
|
+
"00001-of-00017",
|
|
9968
|
+
"00002-of-00017",
|
|
9969
|
+
"00003-of-00017",
|
|
9970
|
+
"00004-of-00017",
|
|
9971
|
+
"00005-of-00017",
|
|
9972
|
+
"00006-of-00017",
|
|
9973
|
+
"00007-of-00017",
|
|
9974
|
+
"00008-of-00017",
|
|
9975
|
+
"00009-of-00017",
|
|
9976
|
+
"00010-of-00017",
|
|
9977
|
+
"00011-of-00017",
|
|
9978
|
+
"00012-of-00017",
|
|
9979
|
+
"00013-of-00017",
|
|
9980
|
+
"00014-of-00017",
|
|
9981
|
+
"00015-of-00017",
|
|
9982
|
+
"00016-of-00017",
|
|
9983
|
+
"00017-of-00017"
|
|
9865
9984
|
]
|
|
9866
9985
|
},
|
|
9867
9986
|
"model_id": "Qwen/QwQ-32B-GGUF",
|
|
9868
|
-
"model_file_name_template": "qwq-32b-{quantization}.gguf"
|
|
9987
|
+
"model_file_name_template": "qwq-32b-{quantization}.gguf",
|
|
9988
|
+
"model_file_name_split_template": "fp16/qwq-32b-{quantization}-{part}.gguf"
|
|
9869
9989
|
}
|
|
9870
9990
|
],
|
|
9871
9991
|
"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 {%- 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.split('</think>')[-1].lstrip('\\n') %}\n {{- '<|im_start|>' + message.role + '\\n' + content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content.split('</think>')[-1].lstrip('\\n') %}\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<think>\\n' }}\n{%- endif %}\n",
|
|
@@ -10874,5 +10994,216 @@
|
|
|
10874
10994
|
"stop": [
|
|
10875
10995
|
"<|end▁of▁sentence|>"
|
|
10876
10996
|
]
|
|
10997
|
+
},
|
|
10998
|
+
{
|
|
10999
|
+
"version": 1,
|
|
11000
|
+
"context_length": 32768,
|
|
11001
|
+
"model_name": "seallms-v3",
|
|
11002
|
+
"model_lang": [
|
|
11003
|
+
"en",
|
|
11004
|
+
"zh",
|
|
11005
|
+
"id",
|
|
11006
|
+
"vi",
|
|
11007
|
+
"th",
|
|
11008
|
+
"ph",
|
|
11009
|
+
"ms",
|
|
11010
|
+
"mm",
|
|
11011
|
+
"kh",
|
|
11012
|
+
"la",
|
|
11013
|
+
"in"
|
|
11014
|
+
],
|
|
11015
|
+
"model_ability": [
|
|
11016
|
+
"chat"
|
|
11017
|
+
],
|
|
11018
|
+
"model_description": "SeaLLMs - Large Language Models for Southeast Asia",
|
|
11019
|
+
"model_specs": [
|
|
11020
|
+
{
|
|
11021
|
+
"model_format": "pytorch",
|
|
11022
|
+
"model_size_in_billions": "1_5",
|
|
11023
|
+
"quantizations": [
|
|
11024
|
+
"none"
|
|
11025
|
+
],
|
|
11026
|
+
"model_id": "SeaLLMs/SeaLLMs-v3-1.5B-Chat"
|
|
11027
|
+
},
|
|
11028
|
+
{
|
|
11029
|
+
"model_format": "pytorch",
|
|
11030
|
+
"model_size_in_billions": 7,
|
|
11031
|
+
"quantizations": [
|
|
11032
|
+
"none"
|
|
11033
|
+
],
|
|
11034
|
+
"model_id": "SeaLLMs/SeaLLMs-v3-7B-Chat"
|
|
11035
|
+
}
|
|
11036
|
+
],
|
|
11037
|
+
"chat_template": "{% set system_message = 'You are a helpful assistant.' %}{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ '<|im_start|>system\n' + system_message + '<|im_end|>\n' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|im_start|>user\n' + content + '<|im_end|>\n<|im_start|>assistant\n' }}{% elif message['role'] == 'assistant' %}{{ content + '<|im_end|>' + '\n' }}{% endif %}{% endfor %}",
|
|
11038
|
+
"stop_token_ids": [
|
|
11039
|
+
151643,
|
|
11040
|
+
151644,
|
|
11041
|
+
151645
|
|
11042
|
+
],
|
|
11043
|
+
"stop": [
|
|
11044
|
+
"<|endoftext|>",
|
|
11045
|
+
"<|im_start|>",
|
|
11046
|
+
"<|im_end|>"
|
|
11047
|
+
]
|
|
11048
|
+
},
|
|
11049
|
+
{
|
|
11050
|
+
"version": 1,
|
|
11051
|
+
"context_length": 32768,
|
|
11052
|
+
"model_name": "glm4-0414",
|
|
11053
|
+
"model_lang": [
|
|
11054
|
+
"en",
|
|
11055
|
+
"zh"
|
|
11056
|
+
],
|
|
11057
|
+
"model_ability": [
|
|
11058
|
+
"chat",
|
|
11059
|
+
"tools"
|
|
11060
|
+
],
|
|
11061
|
+
"model_description": "The GLM family welcomes new members, the GLM-4-32B-0414 series models, featuring 32 billion parameters. Its performance is comparable to OpenAI’s GPT series and DeepSeek’s V3/R1 series",
|
|
11062
|
+
"model_specs": [
|
|
11063
|
+
{
|
|
11064
|
+
"model_format": "pytorch",
|
|
11065
|
+
"model_size_in_billions": 9,
|
|
11066
|
+
"quantizations": [
|
|
11067
|
+
"none"
|
|
11068
|
+
],
|
|
11069
|
+
"model_id": "THUDM/GLM-4-9B-0414"
|
|
11070
|
+
},
|
|
11071
|
+
{
|
|
11072
|
+
"model_format": "pytorch",
|
|
11073
|
+
"model_size_in_billions": 32,
|
|
11074
|
+
"quantizations": [
|
|
11075
|
+
"none"
|
|
11076
|
+
],
|
|
11077
|
+
"model_id": "THUDM/GLM-4-32B-0414"
|
|
11078
|
+
}
|
|
11079
|
+
],
|
|
11080
|
+
"chat_template": "[gMASK]<sop>{%- if tools -%}<|system|>\n# 可用工具\n{% for tool in tools %}{%- set function = tool.function if tool.get(\"function\") else tool %}\n\n## {{ function.name }}\n\n{{ function | tojson(indent=4, ensure_ascii=False) }}\n在调用上述函数时,请使用 Json 格式表示调用的参数。{%- endfor %}{%- endif -%}{%- for msg in messages %}{%- if msg.role == 'system' %}<|system|>\n{{ msg.content }}{%- endif %}{%- endfor %}{%- for message in messages if message.role != 'system' %}{%- set role = message['role'] %}{%- set content = message['content'] %}{%- set meta = message.get(\"metadata\", \"\") %}{%- if role == 'user' %}<|user|>\n{{ content }}{%- elif role == 'assistant' and not meta %}<|assistant|>\n{{ content }}{%- elif role == 'assistant' and meta %}<|assistant|>{{ meta }} \n{{ content }}{%- elif role == 'observation' %}<|observation|>\n{{ content }}{%- endif %}{%- endfor %}{% if add_generation_prompt %}<|assistant|>{% endif %}",
|
|
11081
|
+
"stop_token_ids": [
|
|
11082
|
+
151329,
|
|
11083
|
+
151336,
|
|
11084
|
+
151338
|
|
11085
|
+
],
|
|
11086
|
+
"stop": [
|
|
11087
|
+
"<|endoftext|>",
|
|
11088
|
+
"<|user|>",
|
|
11089
|
+
"<|observation|>"
|
|
11090
|
+
]
|
|
11091
|
+
},
|
|
11092
|
+
{
|
|
11093
|
+
"version": 1,
|
|
11094
|
+
"context_length": 32768,
|
|
11095
|
+
"model_name": "skywork-or1-preview",
|
|
11096
|
+
"model_lang": [
|
|
11097
|
+
"en",
|
|
11098
|
+
"zh"
|
|
11099
|
+
],
|
|
11100
|
+
"model_ability": [
|
|
11101
|
+
"chat"
|
|
11102
|
+
],
|
|
11103
|
+
"model_description": "The Skywork-OR1 (Open Reasoner 1) model series consists of powerful math and code reasoning models trained using large-scale rule-based reinforcement learning with carefully designed datasets and training recipes.",
|
|
11104
|
+
"model_specs": [
|
|
11105
|
+
{
|
|
11106
|
+
"model_format": "pytorch",
|
|
11107
|
+
"model_size_in_billions": 32,
|
|
11108
|
+
"quantizations": [
|
|
11109
|
+
"none"
|
|
11110
|
+
],
|
|
11111
|
+
"model_id": "Skywork/Skywork-OR1-32B-Preview"
|
|
11112
|
+
},
|
|
11113
|
+
{
|
|
11114
|
+
"model_format": "gptq",
|
|
11115
|
+
"model_size_in_billions": 32,
|
|
11116
|
+
"quantizations": [
|
|
11117
|
+
"Int4",
|
|
11118
|
+
"int8"
|
|
11119
|
+
],
|
|
11120
|
+
"model_id": "JunHowie/Skywork-OR1-32B-Preview-GPTQ-{quantization}"
|
|
11121
|
+
},
|
|
11122
|
+
{
|
|
11123
|
+
"model_format": "pytorch",
|
|
11124
|
+
"model_size_in_billions": 7,
|
|
11125
|
+
"quantizations": [
|
|
11126
|
+
"none"
|
|
11127
|
+
],
|
|
11128
|
+
"model_id": "Skywork/Skywork-OR1-7B-Preview"
|
|
11129
|
+
},
|
|
11130
|
+
{
|
|
11131
|
+
"model_format": "ggufv2",
|
|
11132
|
+
"model_size_in_billions": 32,
|
|
11133
|
+
"quantizations": [
|
|
11134
|
+
"IQ2_M",
|
|
11135
|
+
"IQ2_S",
|
|
11136
|
+
"IQ2_XS",
|
|
11137
|
+
"IQ3_M",
|
|
11138
|
+
"IQ3_XS",
|
|
11139
|
+
"IQ3_XXS",
|
|
11140
|
+
"IQ4_NL",
|
|
11141
|
+
"IQ4_XS",
|
|
11142
|
+
"Q2_K",
|
|
11143
|
+
"Q2_K_L",
|
|
11144
|
+
"Q3_K_L",
|
|
11145
|
+
"Q3_K_M",
|
|
11146
|
+
"Q3_K_S",
|
|
11147
|
+
"Q3_K_XL",
|
|
11148
|
+
"Q4_0",
|
|
11149
|
+
"Q4_1",
|
|
11150
|
+
"Q4_K_L",
|
|
11151
|
+
"Q4_K_M",
|
|
11152
|
+
"Q4_K_S",
|
|
11153
|
+
"Q5_K_L",
|
|
11154
|
+
"Q5_K_M",
|
|
11155
|
+
"Q5_K_S",
|
|
11156
|
+
"Q6_K",
|
|
11157
|
+
"Q6_K_L",
|
|
11158
|
+
"Q8_0"
|
|
11159
|
+
],
|
|
11160
|
+
"model_id": "bartowski/Skywork_Skywork-OR1-32B-Preview-GGUF",
|
|
11161
|
+
"model_file_name_template": "Skywork_Skywork-OR1-32B-Preview-{quantization}.gguf"
|
|
11162
|
+
},
|
|
11163
|
+
{
|
|
11164
|
+
"model_format": "ggufv2",
|
|
11165
|
+
"model_size_in_billions": 7,
|
|
11166
|
+
"quantizations": [
|
|
11167
|
+
"IQ2_M",
|
|
11168
|
+
"IQ2_S",
|
|
11169
|
+
"IQ2_XS",
|
|
11170
|
+
"IQ3_M",
|
|
11171
|
+
"IQ3_XS",
|
|
11172
|
+
"IQ3_XXS",
|
|
11173
|
+
"IQ4_NL",
|
|
11174
|
+
"IQ4_XS",
|
|
11175
|
+
"Q2_K",
|
|
11176
|
+
"Q2_K_L",
|
|
11177
|
+
"Q3_K_L",
|
|
11178
|
+
"Q3_K_M",
|
|
11179
|
+
"Q3_K_S",
|
|
11180
|
+
"Q3_K_XL",
|
|
11181
|
+
"Q4_0",
|
|
11182
|
+
"Q4_1",
|
|
11183
|
+
"Q4_K_L",
|
|
11184
|
+
"Q4_K_M",
|
|
11185
|
+
"Q4_K_S",
|
|
11186
|
+
"Q5_K_L",
|
|
11187
|
+
"Q5_K_M",
|
|
11188
|
+
"Q5_K_S",
|
|
11189
|
+
"Q6_K",
|
|
11190
|
+
"Q6_K_L",
|
|
11191
|
+
"Q8_0"
|
|
11192
|
+
],
|
|
11193
|
+
"model_id": "bartowski/Skywork_Skywork-OR1-7B-Preview-GGUF",
|
|
11194
|
+
"model_file_name_template": "Skywork_Skywork-OR1-7B-Preview-{quantization}.gguf"
|
|
11195
|
+
}
|
|
11196
|
+
],
|
|
11197
|
+
"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='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- 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 message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\\n' + '```json' + '\\n' + tool['function']['arguments'] + '\\n' + '```' + '<|tool▁call▁end|>'}}{%- 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|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- 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 %}{{'\\n<|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|><think>\\n'}}{% endif %}",
|
|
11198
|
+
"stop_token_ids": [
|
|
11199
|
+
151643,
|
|
11200
|
+
151644,
|
|
11201
|
+
151645
|
|
11202
|
+
],
|
|
11203
|
+
"stop": [
|
|
11204
|
+
"<|endoftext|>",
|
|
11205
|
+
"<|im_start|>",
|
|
11206
|
+
"<|im_end|>"
|
|
11207
|
+
]
|
|
10877
11208
|
}
|
|
10878
11209
|
]
|
|
@@ -36,6 +36,7 @@ from ...constants import (
|
|
|
36
36
|
XINFERENCE_ENV_CSG_TOKEN,
|
|
37
37
|
XINFERENCE_MODEL_DIR,
|
|
38
38
|
)
|
|
39
|
+
from ..core import VirtualEnvSettings
|
|
39
40
|
from ..utils import (
|
|
40
41
|
IS_NEW_HUGGINGFACE_HUB,
|
|
41
42
|
create_symlink,
|
|
@@ -134,7 +135,9 @@ class LLMFamilyV1(BaseModel):
|
|
|
134
135
|
model_name: str
|
|
135
136
|
model_lang: List[str]
|
|
136
137
|
model_ability: List[
|
|
137
|
-
Literal[
|
|
138
|
+
Literal[
|
|
139
|
+
"embed", "generate", "chat", "tools", "vision", "audio", "omni", "reasoning"
|
|
140
|
+
]
|
|
138
141
|
]
|
|
139
142
|
model_description: Optional[str]
|
|
140
143
|
# reason for not required str here: legacy registration
|
|
@@ -145,6 +148,7 @@ class LLMFamilyV1(BaseModel):
|
|
|
145
148
|
stop: Optional[List[str]]
|
|
146
149
|
reasoning_start_tag: Optional[str]
|
|
147
150
|
reasoning_end_tag: Optional[str]
|
|
151
|
+
virtualenv: Optional[VirtualEnvSettings]
|
|
148
152
|
|
|
149
153
|
|
|
150
154
|
class CustomLLMFamilyV1(LLMFamilyV1):
|
|
@@ -264,6 +268,25 @@ SUPPORTED_ENGINES: Dict[str, List[Type[LLM]]] = {}
|
|
|
264
268
|
LLM_LAUNCH_VERSIONS: Dict[str, List[str]] = {}
|
|
265
269
|
|
|
266
270
|
|
|
271
|
+
# Add decorator definition
|
|
272
|
+
def register_transformer(cls):
|
|
273
|
+
"""
|
|
274
|
+
Decorator function to register a class as a transformer.
|
|
275
|
+
|
|
276
|
+
This decorator appends the provided class to the TRANSFORMERS_CLASSES list.
|
|
277
|
+
It is used to keep track of classes that are considered transformers.
|
|
278
|
+
|
|
279
|
+
Args:
|
|
280
|
+
cls (class): The class to be registered as a transformer.
|
|
281
|
+
|
|
282
|
+
Returns:
|
|
283
|
+
class: The same class that was passed in, after being registered.
|
|
284
|
+
"""
|
|
285
|
+
# Append the class to the list of transformer classes
|
|
286
|
+
TRANSFORMERS_CLASSES.append(cls)
|
|
287
|
+
return cls
|
|
288
|
+
|
|
289
|
+
|
|
267
290
|
def download_from_self_hosted_storage() -> bool:
|
|
268
291
|
from ...constants import XINFERENCE_ENV_MODEL_SRC
|
|
269
292
|
|