mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Merge pull request #19 from henk7171/accelerate-offloading
Remove wrong usegpu behavior
This commit is contained in:
@@ -114,9 +114,6 @@ class HFTorchInferenceModel(HFInferenceModel):
|
||||
self.breakmodel_config.gpu_blocks = self.layers
|
||||
self.breakmodel_config.disk_blocks = self.disk_layers
|
||||
|
||||
# HACK: Prevent get_auxiliary_device from returning cuda
|
||||
utils.koboldai_vars.hascuda = self.usegpu
|
||||
|
||||
return ret
|
||||
|
||||
def _get_target_dtype(self) -> Union[torch.float16, torch.float32]:
|
||||
@@ -124,8 +121,6 @@ class HFTorchInferenceModel(HFInferenceModel):
|
||||
return torch.float32
|
||||
elif utils.args.cpu:
|
||||
return torch.float32
|
||||
elif not self.usegpu:
|
||||
return torch.float32
|
||||
return torch.float16
|
||||
|
||||
def _apply_warpers(
|
||||
|
Reference in New Issue
Block a user