qwen3-coder etc

This commit is contained in:
suluyan
2025-08-03 17:46:26 +08:00
parent 49d50b2126
commit c98bdd3605
2 changed files with 53 additions and 0 deletions

View File

@@ -208,6 +208,12 @@ template_info = [
), ),
# qwen # qwen
TemplateInfo(
template_regex=f'.*{cases("qwen3")}.*{cases("coder")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/qwen3-coder',
allow_general_name=False,
),
TemplateInfo( TemplateInfo(
template_regex=f'.*{cases("qwen3")}{no_multi_modal()}.*', template_regex=f'.*{cases("qwen3")}{no_multi_modal()}.*',
modelfile_prefix= modelfile_prefix=
@@ -255,6 +261,13 @@ template_info = [
), ),
# gemma # gemma
TemplateInfo(
template=TemplateType.gemma,
template_regex=
f'{no("pali")}.*{cases("gemma")}.*{cases("3n")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/gemma3n',
),
TemplateInfo( TemplateInfo(
template_regex= template_regex=
f'.*{cases("codegemma")}.*', f'.*{cases("codegemma")}.*',
@@ -365,6 +378,12 @@ template_info = [
modelfile_prefix= modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/yarn-mistral', 'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/yarn-mistral',
), ),
TemplateInfo(
template_regex=
f'.*{cases("mistral")}.*{cases("small3.2", "small-3.2")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/mistral-small3.2',
),
TemplateInfo( TemplateInfo(
template_regex= template_regex=
f'.*{cases("mistral")}.*{cases("small3.1", "small-3.1")}.*', f'.*{cases("mistral")}.*{cases("small3.1", "small-3.1")}.*',
@@ -595,6 +614,22 @@ template_info = [
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/wizardlm', 'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/wizardlm',
), ),
# magistral
TemplateInfo(
template_regex=
f'.*{cases("magistral")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/magistral',
),
# devstral
TemplateInfo(
template_regex=
f'.*{cases("devstral")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/devstral',
),
# vicuna # vicuna
TemplateInfo( TemplateInfo(
template_regex= template_regex=

View File

@@ -122,6 +122,24 @@ class TestToOllama(unittest.TestCase):
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level') @unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
def test_check_template_type(self): def test_check_template_type(self):
_test_check_tmpl_type('unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF',
'qwen3-coder')
_test_check_tmpl_type(
'unsloth/gemma-3n-E4B-it-GGUF',
'gemma3n',
gguf_meta={'general.name': 'Gemma-3N-E4B-It'})
_test_check_tmpl_type(
'unsloth/Mistral-Small-3.2-24B-Instruct-2506-GGUF',
'mistral-small3.2',
gguf_meta={'general.name': 'Mistral-Small-3.2-24B-Instruct-2506'})
_test_check_tmpl_type(
'unsloth/Magistral-Small-2507-GGUF',
'magistral',
gguf_meta={'general.name': 'Magistral-Small-2507'})
_test_check_tmpl_type(
'mistralai/Devstral-Small-2507_gguf',
'devstral',
gguf_meta={'general.name': 'devstral-small-2507'})
_test_check_tmpl_type( _test_check_tmpl_type(
'unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF', 'unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF',
'deepseek-r1', 'deepseek-r1',