update model_config.py.example

This commit is contained in:
imClumsyPanda 2023-09-05 08:59:06 +08:00
parent 35f2c04535
commit 15619a1270
1 changed files with 0 additions and 13 deletions

View File

@ -7,19 +7,6 @@ logger.setLevel(logging.INFO)
logging.basicConfig(format=LOG_FORMAT)
# 分布式部署时不运行LLM的机器上可以不装torch
def default_device():
try:
import torch
if torch.cuda.is_available():
return "cuda"
if torch.backends.mps.is_available():
return "mps"
except:
pass
return "cpu"
# 在以下字典中修改属性值以指定本地embedding模型存储位置
# 如将 "text2vec": "GanymedeNil/text2vec-large-chinese" 修改为 "text2vec": "User/Downloads/text2vec-large-chinese"
# 此处请写绝对路径