fix llava-llama-3 & yi-1.5

This commit is contained in:
suluyana
2024-10-09 17:34:28 +08:00
parent adc0374088
commit 3433655ab7
2 changed files with 10 additions and 1 deletions

View File

@@ -83,7 +83,7 @@ template_info = [
TemplateInfo(
template=TemplateType.chatml,
template_regex=
f'.*{cases("yi")}{no_multi_modal()}{no("coder")}.*{chat_suffix}.*',
f'.*{cases("yi")}{no_multi_modal()}{no("coder")}.*',
modelfile_link=
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/yi-1.5.modelfile',
),
@@ -110,6 +110,10 @@ template_info = [
'https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/glm4.modelfile',
),
TemplateInfo(
template_regex=f'.*{cases("llava-llama-3")}.*',
modelfile_link='https://modelscope.oss-cn-beijing.aliyuncs.com/llm_template/ollama/llava-llama-3.modelfile'),
# baichuan
TemplateInfo(
template=TemplateType.baichuan,

View File

@@ -100,6 +100,11 @@ class TestToOllama(unittest.TestCase):
ollama = TemplateLoader.to_ollama(
'QuantFactory/Mistral-Nemo-Japanese-Instruct-2408-GGUF')
self.assertTrue(ollama is not None)
ollama = TemplateLoader.to_ollama('AI-ModelScope/Yi-1.5-9B-32K-GGUF')
self.assertTrue(ollama is not None)
ollama = TemplateLoader.to_ollama(
'AI-ModelScope/llava-llama-3-8b-v1_1-gguf')
self.assertTrue(ollama is not None)
if __name__ == '__main__':