mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-09 04:08:10 +00:00
commit
e9dfabe9fd
@ -115,6 +115,10 @@ class ModelLoader(metaclass=Singleton):
|
||||
def huggingface_loader(llm_adapter: BaseLLMAdaper, model_params: ModelParams):
|
||||
device = model_params.device
|
||||
max_memory = None
|
||||
|
||||
# if device is cpu or mps. gpu need to be zero
|
||||
num_gpus = 0
|
||||
|
||||
if device == "cpu":
|
||||
kwargs = {"torch_dtype": torch.float32}
|
||||
elif device == "cuda":
|
||||
|
Loading…
Reference in New Issue
Block a user