update ollama: granite4,deepseek-v3.1,gpt-oss (#1531)

Co-authored-by: xiaojiaping.xjp <xiaojiaping.xjp@alibaba-inc.com>
This commit is contained in:
xiaojianping.xjp
2025-11-07 17:33:25 +08:00
committed by GitHub
parent 95a95343db
commit 23f3b9a43e
2 changed files with 24 additions and 0 deletions

View File

@@ -194,6 +194,10 @@ template_info = [
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/deepseek-llm',
),
TemplateInfo(
template_regex=f'.*{cases("DeepSeek-V3.1")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/deepseek-v3.1'),
TemplateInfo(
template_regex=
f'.*{cases("deepseek")}.*{cases("v3")}.*',
@@ -994,6 +998,14 @@ template_info = [
template_regex=f'.*{cases("deepscaler")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/deepscaler'),
TemplateInfo(
template_regex=f'.*{cases("granite-4.0")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/granite4'),
TemplateInfo(
template_regex=f'.*{cases("gpt-oss")}.*',
modelfile_prefix=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/gpt-oss'),
]

View File

@@ -122,6 +122,18 @@ class TestToOllama(unittest.TestCase):
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
def test_check_template_type(self):
_test_check_tmpl_type(
'unsloth/gpt-oss-20b-GGUF',
'gpt-oss',
gguf_meta={'general.name': 'Gpt-Oss-20B'})
_test_check_tmpl_type(
'unsloth/granite-4.0-h-tiny-GGUF',
'granite4',
gguf_meta={'general.name': 'Granite-4.0-H-Tiny'})
_test_check_tmpl_type(
'unsloth/DeepSeek-V3.1-GGUF',
'deepseek-v3.1',
gguf_meta={'general.name': 'Deepseek-V3.1'})
_test_check_tmpl_type('unsloth/Qwen3-Coder-30B-A3B-Instruct-GGUF',
'qwen3-coder')
_test_check_tmpl_type(