Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions xinference/model/llm/llm_family.json
Original file line number Diff line number Diff line change
Expand Up @@ -10989,5 +10989,122 @@
"<|user|>",
"<|observation|>"
]
},
{
"version": 1,
"context_length": 32768,
"model_name": "skywork-or1-preview",
"model_lang": [
"en",
"zh"
],
"model_ability": [
"chat"
],
"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.",
"model_specs": [
{
"model_format": "pytorch",
"model_size_in_billions": 32,
"quantizations": [
"none"
],
"model_id": "Skywork/Skywork-OR1-32B-Preview"
},
{
"model_format": "gptq",
"model_size_in_billions": 32,
"quantizations": [
"Int4",
"int8"
],
"model_id": "JunHowie/Skywork-OR1-32B-Preview-GPTQ-{quantization}"
},
{
"model_format": "pytorch",
"model_size_in_billions": 7,
"quantizations": [
"none"
],
"model_id": "Skywork/Skywork-OR1-7B-Preview"
},
{
"model_format": "ggufv2",
"model_size_in_billions": 32,
"quantizations": [
"IQ2_M",
"IQ2_S",
"IQ2_XS",
"IQ3_M",
"IQ3_XS",
"IQ3_XXS",
"IQ4_NL",
"IQ4_XS",
"Q2_K",
"Q2_K_L",
"Q3_K_L",
"Q3_K_M",
"Q3_K_S",
"Q3_K_XL",
"Q4_0",
"Q4_1",
"Q4_K_L",
"Q4_K_M",
"Q4_K_S",
"Q5_K_L",
"Q5_K_M",
"Q5_K_S",
"Q6_K",
"Q6_K_L",
"Q8_0"
],
"model_id": "bartowski/Skywork_Skywork-OR1-32B-Preview-GGUF",
"model_file_name_template": "Skywork_Skywork-OR1-32B-Preview-{quantization}.gguf"
},
{
"model_format": "ggufv2",
"model_size_in_billions": 7,
"quantizations": [
"IQ2_M",
"IQ2_S",
"IQ2_XS",
"IQ3_M",
"IQ3_XS",
"IQ3_XXS",
"IQ4_NL",
"IQ4_XS",
"Q2_K",
"Q2_K_L",
"Q3_K_L",
"Q3_K_M",
"Q3_K_S",
"Q3_K_XL",
"Q4_0",
"Q4_1",
"Q4_K_L",
"Q4_K_M",
"Q4_K_S",
"Q5_K_L",
"Q5_K_M",
"Q5_K_S",
"Q6_K",
"Q6_K_L",
"Q8_0"
],
"model_id": "bartowski/Skywork_Skywork-OR1-7B-Preview-GGUF",
"model_file_name_template": "Skywork_Skywork-OR1-7B-Preview-{quantization}.gguf"
}
],
"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 %}",
"stop_token_ids": [
151643,
151644,
151645
],
"stop": [
"<|endoftext|>",
"<|im_start|>",
"<|im_end|>"
]
}
]
122 changes: 122 additions & 0 deletions xinference/model/llm/llm_family_modelscope.json
Original file line number Diff line number Diff line change
Expand Up @@ -8764,5 +8764,127 @@
"<|user|>",
"<|observation|>"
]
},
{
"version": 1,
"context_length": 32768,
"model_name": "skywork-or1-preview",
"model_lang": [
"en",
"zh"
],
"model_ability": [
"chat"
],
"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.",
"model_specs": [
{
"model_format": "pytorch",
"model_size_in_billions": 32,
"quantizations": [
"none"
],
"model_id": "Skywork/Skywork-OR1-32B-Preview",
"model_hub": "modelscope"
},
{
"model_format": "gptq",
"model_size_in_billions": 32,
"quantizations": [
"Int4",
"int8"
],
"model_id": "JunHowie/Skywork-OR1-32B-Preview-GPTQ-{quantization}",
"model_hub": "modelscope"
},
{
"model_format": "pytorch",
"model_size_in_billions": 7,
"quantizations": [
"none"
],
"model_id": "Skywork/Skywork-OR1-7B-Preview",
"model_hub": "modelscope"
},
{
"model_format": "ggufv2",
"model_size_in_billions": 32,
"quantizations": [
"IQ2_M",
"IQ2_S",
"IQ2_XS",
"IQ3_M",
"IQ3_XS",
"IQ3_XXS",
"IQ4_NL",
"IQ4_XS",
"Q2_K",
"Q2_K_L",
"Q3_K_L",
"Q3_K_M",
"Q3_K_S",
"Q3_K_XL",
"Q4_0",
"Q4_1",
"Q4_K_L",
"Q4_K_M",
"Q4_K_S",
"Q5_K_L",
"Q5_K_M",
"Q5_K_S",
"Q6_K",
"Q6_K_L",
"Q8_0"
],
"model_id": "bartowski/Skywork_Skywork-OR1-32B-Preview-GGUF",
"model_file_name_template": "Skywork_Skywork-OR1-32B-Preview-{quantization}.gguf",
"model_hub": "modelscope"
},
{
"model_format": "ggufv2",
"model_size_in_billions": 7,
"quantizations": [
"IQ2_M",
"IQ2_S",
"IQ2_XS",
"IQ3_M",
"IQ3_XS",
"IQ3_XXS",
"IQ4_NL",
"IQ4_XS",
"Q2_K",
"Q2_K_L",
"Q3_K_L",
"Q3_K_M",
"Q3_K_S",
"Q3_K_XL",
"Q4_0",
"Q4_1",
"Q4_K_L",
"Q4_K_M",
"Q4_K_S",
"Q5_K_L",
"Q5_K_M",
"Q5_K_S",
"Q6_K",
"Q6_K_L",
"Q8_0"
],
"model_id": "bartowski/Skywork_Skywork-OR1-7B-Preview-GGUF",
"model_file_name_template": "Skywork_Skywork-OR1-7B-Preview-{quantization}.gguf",
"model_hub": "modelscope"
}
],
"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 %}",
"stop_token_ids": [
151643,
151644,
151645
],
"stop": [
"<|endoftext|>",
"<|im_start|>",
"<|im_end|>"
]
}
]
1 change: 1 addition & 0 deletions xinference/model/llm/vllm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ class VLLMGenerateConfig(TypedDict, total=False):
VLLM_SUPPORTED_CHAT_MODELS.append("deepseek-r1-distill-qwen")
VLLM_SUPPORTED_CHAT_MODELS.append("fin-r1")
VLLM_SUPPORTED_CHAT_MODELS.append("seallms-v3")
VLLM_SUPPORTED_CHAT_MODELS.append("skywork-or1-preview")

if VLLM_INSTALLED and vllm.__version__ >= "0.3.2":
VLLM_SUPPORTED_CHAT_MODELS.append("gemma-it")
Expand Down
Loading