mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-07 19:34:04 +00:00
fix: set num_gpus reference for mps + cpu
This commit is contained in:
parent
d67a6a642a
commit
743863d52b
@ -117,8 +117,8 @@ def huggingface_loader(llm_adapter: BaseLLMAdaper, model_params: ModelParams):
|
||||
max_memory = None
|
||||
|
||||
# if device is cpu or mps. gpu need to be zero
|
||||
num_gpus = 0
|
||||
|
||||
num_gpus = 0
|
||||
|
||||
if device == "cpu":
|
||||
kwargs = {"torch_dtype": torch.float32}
|
||||
elif device == "cuda":
|
||||
|
Loading…
Reference in New Issue
Block a user