Unverified 提交 6f8da560 作者: glide-the 提交者: GitHub

Update loader.py

删除低显存加载参数
上级 52cf43a4
...@@ -113,7 +113,6 @@ class LoaderCheckPoint: ...@@ -113,7 +113,6 @@ class LoaderCheckPoint:
if num_gpus < 2 and self.device_map is None: if num_gpus < 2 and self.device_map is None:
model = ( model = (
LoaderClass.from_pretrained(checkpoint, LoaderClass.from_pretrained(checkpoint,
low_cpu_mem_usage=True,
config=self.model_config, config=self.model_config,
torch_dtype=torch.bfloat16 if self.bf16 else torch.float16, torch_dtype=torch.bfloat16 if self.bf16 else torch.float16,
trust_remote_code=True) trust_remote_code=True)
...@@ -124,7 +123,6 @@ class LoaderCheckPoint: ...@@ -124,7 +123,6 @@ class LoaderCheckPoint:
from accelerate import dispatch_model from accelerate import dispatch_model
model = LoaderClass.from_pretrained(checkpoint, model = LoaderClass.from_pretrained(checkpoint,
low_cpu_mem_usage=True,
config=self.model_config, config=self.model_config,
torch_dtype=torch.bfloat16 if self.bf16 else torch.float16, torch_dtype=torch.bfloat16 if self.bf16 else torch.float16,
trust_remote_code=True).half() trust_remote_code=True).half()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论