提交 75cf9f9b 作者: glide-the

ptuning-v2配置

上级 55a414ec
...@@ -88,8 +88,6 @@ USE_PTUNING_V2 = False ...@@ -88,8 +88,6 @@ USE_PTUNING_V2 = False
# LLM running device # LLM running device
LLM_DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu" LLM_DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
# MOSS load in 8bit
LOAD_IN_8BIT = True
VS_ROOT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "vector_store") VS_ROOT_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "vector_store")
......
...@@ -65,7 +65,7 @@ class LoaderCheckPoint: ...@@ -65,7 +65,7 @@ class LoaderCheckPoint:
self.tokenizer = None self.tokenizer = None
self.model_dir = params.get('model_dir', '') self.model_dir = params.get('model_dir', '')
self.lora_dir = params.get('lora_dir', '') self.lora_dir = params.get('lora_dir', '')
self.ptuning_dir = params.get('ptuning_dir', '') self.ptuning_dir = params.get('ptuning_dir', 'ptuning-v2')
self.cpu = params.get('cpu', False) self.cpu = params.get('cpu', False)
self.gpu_memory = params.get('gpu_memory', None) self.gpu_memory = params.get('gpu_memory', None)
self.cpu_memory = params.get('cpu_memory', None) self.cpu_memory = params.get('cpu_memory', None)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论