mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
CPU only warning
This commit is contained in:
@@ -49,6 +49,9 @@ class model_backend(HFTorchInferenceModel):
|
|||||||
|
|
||||||
def get_requested_parameters(self, model_name, model_path, menu_path, parameters = {}):
|
def get_requested_parameters(self, model_name, model_path, menu_path, parameters = {}):
|
||||||
requested_parameters = super().get_requested_parameters(model_name, model_path, menu_path, parameters)
|
requested_parameters = super().get_requested_parameters(model_name, model_path, menu_path, parameters)
|
||||||
|
if not utils.koboldai_vars.hascuda:
|
||||||
|
logger.warning("Your GPU has not been detected and you can only make use of 32-bit inference, meaning the ram requirements are 8 times higher than specified on the menu and your generations will be slow.\nUnless this is an error and your GPU is known to be compatible with our software check out https://koboldai.org/cpp for a suitable alternative that has wider GPU support and has the ability to run models in 4-bit on the CPU.")
|
||||||
|
|
||||||
dependency_exists = importlib.util.find_spec("bitsandbytes")
|
dependency_exists = importlib.util.find_spec("bitsandbytes")
|
||||||
if dependency_exists:
|
if dependency_exists:
|
||||||
if model_name != 'customhuggingface' or "custom_model_name" in parameters:
|
if model_name != 'customhuggingface' or "custom_model_name" in parameters:
|
||||||
@@ -57,7 +60,7 @@ class model_backend(HFTorchInferenceModel):
|
|||||||
temp = json.load(f)
|
temp = json.load(f)
|
||||||
else:
|
else:
|
||||||
temp = {}
|
temp = {}
|
||||||
if not hasattr(self.model_config, 'quantization_config'):
|
if not hasattr(self.model_config, 'quantization_config') and utils.koboldai_vars.hascuda:
|
||||||
requested_parameters.append({
|
requested_parameters.append({
|
||||||
"uitype": "dropdown",
|
"uitype": "dropdown",
|
||||||
"unit": "text",
|
"unit": "text",
|
||||||
|
Reference in New Issue
Block a user