Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Added precision check validity
Browse files
src/submission/check_validity.py
CHANGED
@@ -71,6 +71,9 @@ def get_model_size(model_info: ModelInfo, precision: str):
|
|
71 |
|
72 |
size_factor = 8 if (precision == "GPTQ" or "gptq" in model_info.modelId.lower()) else 1
|
73 |
model_size = size_factor * model_size
|
|
|
|
|
|
|
74 |
return model_size
|
75 |
|
76 |
def get_model_arch(model_info: ModelInfo):
|
|
|
71 |
|
72 |
size_factor = 8 if (precision == "GPTQ" or "gptq" in model_info.modelId.lower()) else 1
|
73 |
model_size = size_factor * model_size
|
74 |
+
if model_size > 9 and precision != 'float16':
|
75 |
+
raise ValueError("For larger models we only support running in float16")
|
76 |
+
|
77 |
return model_size
|
78 |
|
79 |
def get_model_arch(model_info: ModelInfo):
|