alozowski commited on
Commit
f39cc2d
1 Parent(s): aefb9ee

update the second check submission logic

Browse files
Files changed (1) hide show
  1. src/submission/submit.py +9 -8
src/submission/submit.py CHANGED
@@ -105,14 +105,15 @@ def add_new_eval(
105
  return styled_error(f"Sadly, models larger than 100B parameters cannot be submitted in {precision} precision at this time. "
106
  f"Your model size: {model_size:.2f}B parameters.")
107
 
108
- # Second check: Precision-adjusted size limit
109
- size_checker = ModelSizeChecker(model=model, precision=precision, model_size_in_b=model_size)
110
-
111
- if not size_checker.can_evaluate():
112
- precision_factor = size_checker.get_precision_factor()
113
- max_size = 140 * precision_factor
114
- return styled_error(f"Sadly, models this big ({model_size:.2f}B parameters) cannot be evaluated automatically "
115
- f"at the moment on our cluster. The maximum size for {precision} precision is {max_size:.2f}B parameters.")
 
116
 
117
  architecture = "?"
118
  # Is the model on the hub?
 
105
  return styled_error(f"Sadly, models larger than 100B parameters cannot be submitted in {precision} precision at this time. "
106
  f"Your model size: {model_size:.2f}B parameters.")
107
 
108
+ # Second check: Precision-adjusted size limit for 8bit, 4bit, and GPTQ
109
+ if precision in ["8bit", "4bit", "GPTQ"]:
110
+ size_checker = ModelSizeChecker(model=model, precision=precision, model_size_in_b=model_size)
111
+
112
+ if not size_checker.can_evaluate():
113
+ precision_factor = size_checker.get_precision_factor()
114
+ max_size = 140 * precision_factor
115
+ return styled_error(f"Sadly, models this big ({model_size:.2f}B parameters) cannot be evaluated automatically "
116
+ f"at the moment on our cluster. The maximum size for {precision} precision is {max_size:.2f}B parameters.")
117
 
118
  architecture = "?"
119
  # Is the model on the hub?