This commit is contained in:
wailovet
2024-06-04 02:40:12 +08:00
parent dc77aec330
commit 17a5baab48
5 changed files with 316 additions and 185 deletions
+2
View File
@@ -7,6 +7,8 @@
Use llama.cpp to assist in generating some nodes related to prompt words, including beautifying prompt words and image recognition similar to clip-interrogator
## Recent changes
* [2024-06-04] 新增了一些预设模型 (Added some preset models)
* [2024-06-04] 新增通用节点,支持手动选择模型 (Add universal node, support manual selection of models)
* [2024-05-30] 添加ImageCaptionerConfig节点来支持批量生成提示词 (Add ImageCaptionerConfig node to support batch generation of prompt words)
* [2024-05-24] 运行后在当前节点显示生成的提示词 (Display the generated prompt words in the current node after running)
* [2024-05-24] 兼容清华智谱API (Compatible with Zhipu API)
+17 -23
View File
@@ -96,20 +96,13 @@ NODE_DISPLAY_NAME_MAPPINGS[
class MZ_LLamaCPPModelConfig_DownloaderSelect:
@classmethod
def INPUT_TYPES(s):
optional_models = Utils.get_model_zoo(tags_filter="llama")
model_names = [
model["model"] for model in optional_models
]
return {
"required": {
"model_name": ([
"Meta-Llama-3-8B-Instruct.Q4_K_M",
"Phi-3-mini-4k-instruct-q4",
"Meta-Llama-3-8B-Q4_K_M",
"llama3_8b_instruct_dpo_zh-Q4_K_M",
"llama3-zh.Q4_K_M",
"qwen1_5-14b-chat-q4_k_m",
"qwen1_5-7b-chat-q4_k_m",
"qwen1_5-4b-chat-q4_k_m",
"qwen1_5-1_8b-chat-q4_k_m",
"qwen1_5-0_5b-chat-q4_k_m",
],),
"model_name": (model_names,),
},
"optional": {
},
@@ -456,19 +449,20 @@ NODE_DISPLAY_NAME_MAPPINGS[
class MZ_ImageInterrogatorModelConfig_DownloaderSelect:
@classmethod
def INPUT_TYPES(s):
optional_models = Utils.get_model_zoo(tags_filter="llava")
model_names = [
model["model"] for model in optional_models
]
optional_models = Utils.get_model_zoo(tags_filter="mmproj")
mmproj_model_names = [
model["model"] for model in optional_models
]
return {
"required": {
"model_name": ([
"ggml_llava1_5-7b-q4_k_m",
"ggml_bakllava-1-q4_k_m",
"llava_v1_6_mistral_7b_q5_k_m",
],),
"mmproj_model_name": ([
"auto",
"ggml_llava1_5-7b-mmproj-f16",
"ggml_bakllava-1-mmproj-f16",
"llava_v1_6_mistral_7b_mmproj_f16",
],),
"model_name": (model_names,),
"mmproj_model_name": (mmproj_model_names,),
},
"optional": {
},
+212
View File
@@ -0,0 +1,212 @@
[
{
"model": "Meta-Llama-3-8B-Instruct.Q4_K_M",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/Meta-Llama-3-8B-Instruct.Q4_K_M.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=Meta-Llama-3-8B-Instruct-GGUF%2FMeta-Llama-3-8B-Instruct.Q4_K_M.gguf",
"SHA256": "647a2b64cbcdbe670432d0502ebb2592b36dd364d51a9ef7a1387b7a4365781f"
},
{
"model": "omost-llama-3-8b-Q4_K_M",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/omost-llama-3-8b-Q4_K_M.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=omost-gguf%2Fomost-llama-3-8b-Q4_K_M.gguf",
"SHA256": "f09a3237a3b8ce8b96acdb3c83543a47bf7548764a659f888ead6ec1d8cfb780"
},
{
"model": "omost-phi-3-mini-128k-Q4_K_M",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/omost-phi-3-mini-128k-Q4_K_M.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=omost-gguf%2Fomost-phi-3-mini-128k-Q4_K_M.gguf",
"SHA256": "bd42cbddf4cbc00676292ddcbdb45567afe4795b9909482578f58bc2026cb60c"
},
{
"model": "Meta-Llama-3-8B.Q4_K_M",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/Meta-Llama-3-8B.Q4_K_M.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=Meta-Llama-3-8B%2FMeta-Llama-3-8B.Q4_K_M.gguf",
"SHA256": "2a19e7532fb544cfd164c65a1b045bb415e14924890a8abee0ec84644f66f61f"
},
{
"model": "Phi-3-mini-4k-instruct-q4",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/Phi-3-mini-4k-instruct-q4.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=Phi-3-mini-4k-instruct-gguf%2FPhi-3-mini-4k-instruct-q4.gguf",
"SHA256": "1cd9a9df07350196623f93bf4829cf228959e07ad32f787b8fdd7f5956f5b9de"
},
{
"model": "llama3-zh.Q4_K_M",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/llama3-zh.Q4_K_M.gguf",
"url": "https://modelscope.cn/api/v1/models/ModelM/Llama-3-8b-zh-gguf/repo?Revision=master&FilePath=llama3-zh.Q4_K_M.gguf",
"SHA256": "1b04ec22e4079af8064a8378d55d2cd79e43eff9faf4bbe8f341f1fd792a53cd"
},
{
"model": "llama3_8b_instruct_dpo_zh-Q4_K_M",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/llama3_8b_instruct_dpo_zh-Q4_K_M.gguf",
"url": "https://modelscope.cn/api/v1/models/shareAI/llama-3-8b-Instruct-dpo-chinese-loftq-gguf/repo?Revision=master&FilePath=llama3_8b_instruct_dpo_zh-Q4_K_M.gguf",
"SHA256": "5231f5f119e1ef7db058211b8a140b530930a40b9b89c54db8455cc20ae3f699"
},
{
"model": "qwen1_5-14b-chat-q4_k_m",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/qwen1_5-14b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-14B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-14b-chat-q4_k_m.gguf",
"SHA256": "46fbff2797c39c2d6aa555db0b0b4fe3f41b712a9b45266e438aa9a5047c0563"
},
{
"model": "qwen1_5-7b-chat-q4_k_m",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/qwen1_5-7b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-7B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-7b-chat-q4_k_m.gguf",
"SHA256": "d7f132b1eff9ce35acf8e83ab96d2bc87eaedb68244e467bbc99e9f46a122a4c"
},
{
"model": "qwen1_5-4b-chat-q4_k_m",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/qwen1_5-4b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-4B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-4b-chat-q4_k_m.gguf",
"SHA256": "426143ccd3241b9547c2b70c622b4f4ef3436ee07e44991bd69ad84b36cd9b9b"
},
{
"model": "qwen1_5-1_8b-chat-q4_k_m",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/qwen1_5-1_8b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-1.8B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-1_8b-chat-q4_k_m.gguf",
"SHA256": "702e983c77883426806a2af75d34ab3e462e1b822f9dc23b49e02280c24b2b18"
},
{
"model": "qwen1_5-0_5b-chat-q4_k_m",
"tags": ["llama"],
"find_path": ["gguf"],
"file_path": "gguf/qwen1_5-0_5b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-0.5B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-0_5b-chat-q4_k_m.gguf",
"SHA256": "92916b71d32f5afea48fb7383e3b48c5b1c111f5a59f0b83c764ea1d07fe1a3a"
},
{
"model": "llava-phi-3-mini-int4",
"tags": ["llava"],
"find_path": ["gguf"],
"file_path": "gguf/llava-phi-3-mini-int4.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-phi-3-mini-gguf%2Fllava-phi-3-mini-int4.gguf",
"SHA256": "377876be20bac24488716c04824ab3a6978900679b40013b0d2585004555e658"
},
{
"model": "llava-phi-3-mini-mmproj-f16",
"tags": [
"mmproj",
"377876be20bac24488716c04824ab3a6978900679b40013b0d2585004555e658"
],
"find_path": ["gguf"],
"file_path": "gguf/llava-phi-3-mini-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-phi-3-mini-gguf%2Fllava-phi-3-mini-mmproj-f16.gguf",
"SHA256": "004fc09697203296f72321b296a8d48aade2d23e553cbfb1c1e6a0b5157a08d5"
},
{
"model": "MiniCPM-Llama3-V-2_5-Q4_K_M",
"tags": ["llava-hide"],
"find_path": ["gguf"],
"file_path": "gguf/MiniCPM-Llama3-V-2_5-Q4_K_M.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=MiniCPM-Llama3-V-2_5-gguf%2FMiniCPM-Llama3-V-2_5-Q4_K_M.gguf",
"SHA256": "010ec3ba94cb5ad2d9c8f95f46f01c6d80f83deab9df0a0831334ea45afff3e2"
},
{
"model": "MiniCPM-Llama3-V-2_5-mmproj-f16",
"tags": [
"mmproj-hide",
"010ec3ba94cb5ad2d9c8f95f46f01c6d80f83deab9df0a0831334ea45afff3e2"
],
"find_path": ["gguf"],
"file_path": "gguf/MiniCPM-Llama3-V-2_5-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=MiniCPM-Llama3-V-2_5-gguf%2FMiniCPM-Llama3-V-2_5-mmproj-f16.gguf",
"SHA256": "391d11736c3cd24a90417c47b0c88975e86918fcddb1b00494c4d715b08af13e"
},
{
"model": "llava-llama-3-8b-v1_1-int4",
"tags": ["llava"],
"find_path": ["gguf"],
"file_path": "gguf/llava-llama-3-8b-v1_1-int4.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-llama-3-8b-v1_1-gguf%2Fllava-llama-3-8b-v1_1-int4.gguf",
"SHA256": "b6e1d703db0da8227fdb7127d8716bbc5049c9bf17ca2bb345be9470d217f3fc"
},
{
"model": "llava-llama-3-8b-v1_1-mmproj-f16",
"tags": [
"mmproj",
"b6e1d703db0da8227fdb7127d8716bbc5049c9bf17ca2bb345be9470d217f3fc"
],
"find_path": ["gguf"],
"file_path": "gguf/llava-llama-3-8b-v1_1-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-llama-3-8b-v1_1-gguf%2Fllava-llama-3-8b-v1_1-mmproj-f16.gguf",
"SHA256": "eb569aba7d65cf3da1d0369610eb6869f4a53ee369992a804d5810a80e9fa035"
},
{
"model": "ggml_llava1_5-7b-q4_k_m",
"tags": ["llava"],
"find_path": ["gguf"],
"file_path": "gguf/ggml_llava1_5-7b-q4_k_m.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_llava-v1.5-7b%2Fggml-model-q4_k.gguf",
"SHA256": "7ac9c2f7b8d76cc7f3118cdf0953ebab7a7a9b12bad5dbe237219d2ab61765ea"
},
{
"model": "ggml_llava1_5-7b-mmproj-f16",
"tags": [
"mmproj",
"7ac9c2f7b8d76cc7f3118cdf0953ebab7a7a9b12bad5dbe237219d2ab61765ea"
],
"find_path": ["gguf"],
"file_path": "gguf/ggml_llava1_5-7b-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_llava-v1.5-7b%2Fggml_llava1_5-7b-mmproj-f16.gguf",
"SHA256": "b7c8ff0f58fca47d28ba92c4443adf8653f3349282cb8d9e6911f22d9b3814fe"
},
{
"model": "ggml_bakllava-1-q4_k_m",
"tags": ["llava"],
"find_path": ["gguf"],
"file_path": "gguf/ggml_bakllava-1-q4_k_m.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_bakllava-1%2Fggml-model-q5_k.gguf",
"SHA256": "c93de1376be9b6977cc94d252a3d165d6059e07b528de0fa762534d9599b27d6"
},
{
"model": "ggml_bakllava-1-mmproj-f16",
"tags": [
"mmproj",
"c93de1376be9b6977cc94d252a3d165d6059e07b528de0fa762534d9599b27d6"
],
"find_path": ["gguf"],
"file_path": "gguf/ggml_bakllava-1-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_bakllava-1%2Fmmproj-model-f16.gguf",
"SHA256": "2e467eba710002839e0966d5e329942bb836eabd4e787bc713b07eff1d8ea13b"
},
{
"model": "llava_v1_6_mistral_7b_q5_k_m",
"tags": ["llava"],
"find_path": ["gguf"],
"file_path": "gguf/llava_v1_6_mistral_7b_q5_k_m.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-1.6-mistral-7b-gguf%2Fllava-v1.6-mistral-7b.Q5_K_M.gguf",
"SHA256": "b1d37fc65ecb80aa8f1ce185bf4d7605bc3c5cc5bcc77a160c3a1b0377631112"
},
{
"model": "llava_v1_6_mistral_7b_mmproj_f16",
"tags": [
"mmproj",
"b1d37fc65ecb80aa8f1ce185bf4d7605bc3c5cc5bcc77a160c3a1b0377631112"
],
"find_path": ["gguf"],
"file_path": "gguf/llava_v1_6_mistral_7b_mmproj_f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-1.6-mistral-7b-gguf%2Fmmproj-model-f16.gguf",
"SHA256": "00205ee8a0d7a381900cd031e43105f86aa0d8c07bf329851e85c71a26632d16"
}
]
+23 -15
View File
@@ -312,13 +312,6 @@ def image_interrogator_captioner(args_dict):
return result
image_interrogator_auto_mmproj_model = {
"7ac9c2f7b8d76cc7f3118cdf0953ebab7a7a9b12bad5dbe237219d2ab61765ea": "ggml_llava1_5-7b-mmproj-f16",
"c93de1376be9b6977cc94d252a3d165d6059e07b528de0fa762534d9599b27d6": "ggml_bakllava-1-mmproj-f16",
"b1d37fc65ecb80aa8f1ce185bf4d7605bc3c5cc5bcc77a160c3a1b0377631112": "llava_v1_6_mistral_7b_q5_k_m",
}
def image_interrogator_node_encode(args_dict):
importlib.reload(mz_prompts)
@@ -342,15 +335,21 @@ def image_interrogator_node_encode(args_dict):
if mmproj_model == "auto":
llama_cpp_model_sha256 = mz_prompt_utils.Utils.file_sha256(
llama_cpp_model)
mmproj_model_name = image_interrogator_auto_mmproj_model.get(
llama_cpp_model_sha256, None)
mmproj_model_name = mz_prompt_utils.Utils.get_model_zoo(
tags_filter=llama_cpp_model_sha256)
if len(mmproj_model_name) == 0:
mmproj_model_name = None
else:
mmproj_model_name = mmproj_model_name[0].get("model", None)
if mmproj_model_name is None:
mz_prompt_utils.Utils.print_log(
"llama_cpp_model_sha256: ", llama_cpp_model_sha256)
raise Exception(
"未能自动找到对应的mmproj文件 ; Failed to automatically find the corresponding mmproj file.")
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model_name)
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model_name)
elif select_model_type == "DownloaderSelect":
model_name = model_config.get("model_name")
@@ -365,13 +364,21 @@ def image_interrogator_node_encode(args_dict):
mz_prompt_utils.Utils.print_log(
"llama_cpp_model_sha256: ", llama_cpp_model_sha256)
mmproj_model_name = image_interrogator_auto_mmproj_model.get(
llama_cpp_model_sha256, None)
mmproj_model_name = mz_prompt_utils.Utils.get_model_zoo(
tags_filter=llama_cpp_model_sha256)
if len(mmproj_model_name) == 0:
mmproj_model_name = None
else:
mmproj_model_name = mmproj_model_name[0].get("model", None)
if mmproj_model_name is None:
raise Exception(
"未能自动找到对应的mmproj文件 ; Failed to automatically find the corresponding mmproj file")
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model_name)
mmproj_model = mmproj_model_name
mmproj_model = mz_prompt_utils.Utils.get_auto_model_fullpath(
mmproj_model)
else:
raise Exception("Unknown select_model_type")
@@ -394,6 +401,7 @@ def image_interrogator_node_encode(args_dict):
system_prompt = customize_instruct.get("system", "")
question = customize_instruct.get("instruct", "")
mz_prompt_utils.Utils.print_log(f"mmproj_model: {mmproj_model}")
response = mz_llama_cpp.llava_cpp_simple_interrogator(
model_file=llama_cpp_model,
mmproj_file=mmproj_model,
+62 -147
View File
@@ -1,4 +1,5 @@
import json
import os
import shutil
import subprocess
@@ -724,8 +725,51 @@ class Utils:
h.update(b)
return h.hexdigest()
def get_cache_by_local(key):
try:
cache_json_file = os.path.join(
Utils.get_models_path(), f"caches.json")
if not os.path.exists(cache_json_file):
return None
with open(cache_json_file, "r", encoding="utf-8") as f:
cache_json = json.load(f)
return cache_json.get(key, None)
except:
return None
def set_cache_by_local(key, value):
try:
cache_json_file = os.path.join(
Utils.get_models_path(), f"caches.json")
if not os.path.exists(cache_json_file):
cache_json = {}
else:
with open(cache_json_file, "r", encoding="utf-8") as f:
cache_json = json.load(f)
cache_json[key] = value
with open(cache_json_file, "w", encoding="utf-8") as f:
json.dump(cache_json, f, indent=4)
except:
pass
def file_sha256(file_path):
return Utils.file_hash(file_path, hashlib.sha256)
# 获取文件的更新时间
file_stat = os.stat(file_path)
file_mtime = file_stat.st_mtime
file_size = file_stat.st_size
cache_key = f"{file_path}_{file_mtime}_{file_size}"
cache_value = Utils.get_cache_by_local(cache_key)
if cache_value is not None:
return cache_value
sha256 = Utils.file_hash(file_path, hashlib.sha256)
Utils.set_cache_by_local(cache_key, sha256)
return sha256
def get_auto_model_fullpath(model_name):
fullpath = Utils.cache_get(f"get_auto_model_fullpath_{model_name}")
@@ -738,6 +782,8 @@ class Utils:
target_sha256 = ""
file_path = ""
download_url = ""
MODEL_ZOO = Utils.get_model_zoo()
for model in MODEL_ZOO:
if model["model"] == model_name:
find_paths = model["find_path"]
@@ -789,154 +835,23 @@ class Utils:
print(f"Test download speed failed: {e}")
return False
def get_model_zoo(tags_filter=None):
source_model_zoo_file = os.path.join(
os.path.dirname(__file__), "configs", "model_zoo.json")
source_model_zoo_json = []
try:
with open(source_model_zoo_file, "r", encoding="utf-8") as f:
source_model_zoo_json = json.load(f)
except:
pass
MODEL_ZOO = [
{
"model": "Meta-Llama-3-8B-Instruct.Q4_K_M",
"find_path": [
"gguf",
],
"file_path": "gguf/Meta-Llama-3-8B-Instruct.Q4_K_M.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=Meta-Llama-3-8B-Instruct-GGUF%2FMeta-Llama-3-8B-Instruct.Q4_K_M.gguf",
"SHA256": "647a2b64cbcdbe670432d0502ebb2592b36dd364d51a9ef7a1387b7a4365781f",
},
{
"model": "Meta-Llama-3-8B-Q4_K_M",
"find_path": [
"gguf",
],
"file_path": "gguf/Meta-Llama-3-8B-Q4_K_M.gguf",
"url": "https://modelscope.cn/api/v1/models/LLM-Research/Meta-Llama-3-8B-GGUF/repo?Revision=master&FilePath=Meta-Llama-3-8B-Q4_K_M.gguf",
"SHA256": "b3413ff367d0c568d1ebb06faa6d1e44c3a7fc2ad8eea40b1685788ce4f90e3e",
},
{
"model": "Phi-3-mini-4k-instruct-q4",
"find_path": [
"gguf",
],
"file_path": "gguf/Phi-3-mini-4k-instruct-q4.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=Phi-3-mini-4k-instruct-gguf%2FPhi-3-mini-4k-instruct-q4.gguf",
"SHA256": "1cd9a9df07350196623f93bf4829cf228959e07ad32f787b8fdd7f5956f5b9de",
},
{
"model": "llama3-zh.Q4_K_M",
"find_path": [
"gguf",
],
"file_path": "gguf/llama3-zh.Q4_K_M.gguf",
"url": "https://modelscope.cn/api/v1/models/ModelM/Llama-3-8b-zh-gguf/repo?Revision=master&FilePath=llama3-zh.Q4_K_M.gguf",
"SHA256": "1b04ec22e4079af8064a8378d55d2cd79e43eff9faf4bbe8f341f1fd792a53cd",
},
{
"model": "llama3_8b_instruct_dpo_zh-Q4_K_M",
"find_path": [
"gguf",
],
"file_path": "gguf/llama3_8b_instruct_dpo_zh-Q4_K_M.gguf",
"url": "https://modelscope.cn/api/v1/models/shareAI/llama-3-8b-Instruct-dpo-chinese-loftq-gguf/repo?Revision=master&FilePath=llama3_8b_instruct_dpo_zh-Q4_K_M.gguf",
"SHA256": "5231f5f119e1ef7db058211b8a140b530930a40b9b89c54db8455cc20ae3f699",
},
{
"model": "qwen1_5-14b-chat-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/qwen1_5-14b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-14B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-14b-chat-q4_k_m.gguf",
"SHA256": "46fbff2797c39c2d6aa555db0b0b4fe3f41b712a9b45266e438aa9a5047c0563",
},
{
"model": "qwen1_5-7b-chat-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/qwen1_5-7b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-7B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-7b-chat-q4_k_m.gguf",
"SHA256": "d7f132b1eff9ce35acf8e83ab96d2bc87eaedb68244e467bbc99e9f46a122a4c",
},
{
"model": "qwen1_5-4b-chat-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/qwen1_5-4b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-4B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-4b-chat-q4_k_m.gguf",
"SHA256": "426143ccd3241b9547c2b70c622b4f4ef3436ee07e44991bd69ad84b36cd9b9b",
},
{
"model": "qwen1_5-1_8b-chat-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/qwen1_5-1_8b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-1.8B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-1_8b-chat-q4_k_m.gguf",
"SHA256": "702e983c77883426806a2af75d34ab3e462e1b822f9dc23b49e02280c24b2b18",
},
{
"model": "qwen1_5-0_5b-chat-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/qwen1_5-0_5b-chat-q4_k_m.gguf",
"url": "https://modelscope.cn/api/v1/models/qwen/Qwen1.5-0.5B-Chat-GGUF/repo?Revision=master&FilePath=qwen1_5-0_5b-chat-q4_k_m.gguf",
"SHA256": "92916b71d32f5afea48fb7383e3b48c5b1c111f5a59f0b83c764ea1d07fe1a3a",
},
{
"model": "ggml_llava1_5-7b-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/ggml_llava1_5-7b-q4_k_m.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_llava-v1.5-7b%2Fggml-model-q4_k.gguf",
"SHA256": "7ac9c2f7b8d76cc7f3118cdf0953ebab7a7a9b12bad5dbe237219d2ab61765ea",
},
{
"model": "ggml_llava1_5-7b-mmproj-f16",
"find_path": [
"gguf",
],
"file_path": "gguf/ggml_llava1_5-7b-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_llava-v1.5-7b%2Fmmproj-model-f16.gguf",
"SHA256": "b7c8ff0f58fca47d28ba92c4443adf8653f3349282cb8d9e6911f22d9b3814fe",
},
{
"model": "ggml_bakllava-1-q4_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/ggml_bakllava-1-q4_k_m.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_bakllava-1%2Fggml-model-q5_k.gguf",
"SHA256": "c93de1376be9b6977cc94d252a3d165d6059e07b528de0fa762534d9599b27d6",
},
{
"model": "ggml_bakllava-1-mmproj-f16",
"find_path": [
"gguf",
],
"file_path": "gguf/ggml_bakllava-1-mmproj-f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=ggml_bakllava-1%2Fmmproj-model-f16.gguf",
"SHA256": "2e467eba710002839e0966d5e329942bb836eabd4e787bc713b07eff1d8ea13b",
},
{
"model": "llava_v1_6_mistral_7b_q5_k_m",
"find_path": [
"gguf",
],
"file_path": "gguf/llava_v1_6_mistral_7b_q5_k_m.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-1.6-mistral-7b-gguf%2Fllava-v1.6-mistral-7b.Q5_K_M.gguf",
"SHA256": "b1d37fc65ecb80aa8f1ce185bf4d7605bc3c5cc5bcc77a160c3a1b0377631112",
},
{
"model": "llava_v1_6_mistral_7b_mmproj_f16",
"find_path": [
"gguf",
],
"file_path": "gguf/llava_v1_6_mistral_7b_mmproj_f16.gguf",
"url": "https://www.modelscope.cn/api/v1/models/wailovet/MinusZoneAIModels/repo?Revision=master&FilePath=llava-1.6-mistral-7b-gguf%2Fmmproj-model-f16.gguf",
"SHA256": "00205ee8a0d7a381900cd031e43105f86aa0d8c07bf329851e85c71a26632d16",
},
# Utils.print_log(f"source_model_zoo_json: {json.dumps(source_model_zoo_json, indent=4)}")
if tags_filter is not None:
source_model_zoo_json = [
m for m in source_model_zoo_json if tags_filter in m["tags"]]
return source_model_zoo_json
]
modelscope_models_map = {
"llama3": {