[model] add seed coder and qwen3 quant models (#8039)
This commit is contained in:
@@ -115,12 +115,7 @@ def get_dataset_list(dataset_names: Optional[list[str]], dataset_dir: str) -> li
|
||||
dataset_list: list[DatasetAttr] = []
|
||||
for name in dataset_names:
|
||||
if dataset_info is None: # dataset_dir is ONLINE
|
||||
if use_modelscope():
|
||||
load_from = "ms_hub"
|
||||
elif use_openmind():
|
||||
load_from = "om_hub"
|
||||
else:
|
||||
load_from = "hf_hub"
|
||||
load_from = "ms_hub" if use_modelscope() else "om_hub" if use_openmind() else "hf_hub"
|
||||
dataset_attr = DatasetAttr(load_from, dataset_name=name)
|
||||
dataset_list.append(dataset_attr)
|
||||
continue
|
||||
|
||||
@@ -1622,6 +1622,20 @@ register_template(
|
||||
)
|
||||
|
||||
|
||||
register_template(
|
||||
name="seed_coder",
|
||||
format_user=StringFormatter(
|
||||
slots=[{"bos_token"}, "user\n{{content}}", {"eos_token"}, {"bos_token"}, "assistant\n"]
|
||||
),
|
||||
format_system=StringFormatter(slots=[{"bos_token"}, "system\n{{content}}", {"eos_token"}]),
|
||||
default_system=(
|
||||
"You are an AI programming assistant, utilizing the Seed-Coder model, developed by ByteDance Seed, "
|
||||
"and you only answer questions related to computer science. For politically sensitive questions, "
|
||||
"security and privacy issues, and other non-computer science questions, you will refuse to answer.\n\n"
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# copied from llama3 template
|
||||
register_template(
|
||||
name="skywork_o1",
|
||||
|
||||
@@ -237,9 +237,7 @@ class MistralToolUtils(ToolUtils):
|
||||
def tool_formatter(tools: list[dict[str, Any]]) -> str:
|
||||
wrapped_tools = []
|
||||
for tool in tools:
|
||||
wrapped_tools.append(
|
||||
tool if tool.get("type") == "function" else {"type": "function", "function": tool}
|
||||
)
|
||||
wrapped_tools.append(tool if tool.get("type") == "function" else {"type": "function", "function": tool})
|
||||
|
||||
return "[AVAILABLE_TOOLS] " + json.dumps(wrapped_tools, ensure_ascii=False) + "[/AVAILABLE_TOOLS]"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user