lvkaokao
commited on
Commit
·
a16a56e
1
Parent(s):
b778b1a
revise model params.
Browse files
src/leaderboard/read_evals.py
CHANGED
|
@@ -56,6 +56,8 @@ class EvalResult:
|
|
| 56 |
weight_dtype = WeightDtype.from_str(config.get("weight_dtype", "int4"))
|
| 57 |
compute_dtype = ComputeDtype.from_str(data["task_info"].get("compute_dtype", "bfloat16"))
|
| 58 |
double_quant = data["quantization_config"].get("bnb_4bit_use_double_quant", False)
|
|
|
|
|
|
|
| 59 |
local = config.get("local", False)
|
| 60 |
if not local:
|
| 61 |
local = data["task_info"].get("local", False)
|
|
@@ -105,7 +107,8 @@ class EvalResult:
|
|
| 105 |
weight_dtype=weight_dtype,
|
| 106 |
compute_dtype=compute_dtype,
|
| 107 |
double_quant=double_quant,
|
| 108 |
-
revision=
|
|
|
|
| 109 |
)
|
| 110 |
|
| 111 |
def update_with_request_file(self, requests_path):
|
|
@@ -119,7 +122,7 @@ class EvalResult:
|
|
| 119 |
request = json.load(f)
|
| 120 |
# self.model_type = ModelType.from_str(request.get("model_type", "Unknown"))
|
| 121 |
# self.precision = WeightType[request.get("weight_type", "Original")]
|
| 122 |
-
self.num_params = request.get("model_size", 0) / 2 # need fix
|
| 123 |
self.date = request.get("submitted_time", "")
|
| 124 |
self.architecture = request.get("architectures", "Unknown")
|
| 125 |
self.status = request.get("status", "Failed")
|
|
|
|
| 56 |
weight_dtype = WeightDtype.from_str(config.get("weight_dtype", "int4"))
|
| 57 |
compute_dtype = ComputeDtype.from_str(data["task_info"].get("compute_dtype", "bfloat16"))
|
| 58 |
double_quant = data["quantization_config"].get("bnb_4bit_use_double_quant", False)
|
| 59 |
+
model_params = config["model_params"]
|
| 60 |
+
|
| 61 |
local = config.get("local", False)
|
| 62 |
if not local:
|
| 63 |
local = data["task_info"].get("local", False)
|
|
|
|
| 107 |
weight_dtype=weight_dtype,
|
| 108 |
compute_dtype=compute_dtype,
|
| 109 |
double_quant=double_quant,
|
| 110 |
+
revision=config.get("model_sha", "main"),
|
| 111 |
+
num_params=model_params,
|
| 112 |
)
|
| 113 |
|
| 114 |
def update_with_request_file(self, requests_path):
|
|
|
|
| 122 |
request = json.load(f)
|
| 123 |
# self.model_type = ModelType.from_str(request.get("model_type", "Unknown"))
|
| 124 |
# self.precision = WeightType[request.get("weight_type", "Original")]
|
| 125 |
+
# self.num_params = request.get("model_size", 0) / 2 # need fix
|
| 126 |
self.date = request.get("submitted_time", "")
|
| 127 |
self.architecture = request.get("architectures", "Unknown")
|
| 128 |
self.status = request.get("status", "Failed")
|