update model_config.py.example
This commit is contained in:
parent
35f2c04535
commit
15619a1270
|
|
@ -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"
|
||||
# 此处请写绝对路径
|
||||
|
|
|
|||
Loading…
Reference in New Issue