Remove wrong usegpu behavior

This commit is contained in:
Henk
2023-06-22 07:07:02 +02:00
parent 5ee20bd7d6
commit 1da4580e8b

View File

@@ -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(