From 15619a1270f054a780d1d2d2db42513e492efd61 Mon Sep 17 00:00:00 2001 From: imClumsyPanda Date: Tue, 5 Sep 2023 08:59:06 +0800 Subject: [PATCH] update model_config.py.example --- configs/model_config.py.example | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/configs/model_config.py.example b/configs/model_config.py.example index 1b54e837..1acaf1c1 100644 --- a/configs/model_config.py.example +++ b/configs/model_config.py.example @@ -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" # 此处请写绝对路径