Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
•
fbbefcc
1
Parent(s):
b37adc3
fixed typo
Browse files
scripts/create_request_file.py
CHANGED
@@ -17,7 +17,7 @@ weight_types = ("Original", "Delta", "Adapter")
|
|
17 |
|
18 |
|
19 |
def get_model_size(model_info, precision: str):
|
20 |
-
size_pattern =
|
21 |
try:
|
22 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
23 |
except (AttributeError, TypeError):
|
|
|
17 |
|
18 |
|
19 |
def get_model_size(model_info, precision: str):
|
20 |
+
size_pattern = re.compile(r"(\d+\.)?\d+(b|m)")
|
21 |
try:
|
22 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
23 |
except (AttributeError, TypeError):
|
src/submission/check_validity.py
CHANGED
@@ -64,7 +64,7 @@ def is_model_on_hub(model_name: str, revision: str, token: str = None, trust_rem
|
|
64 |
|
65 |
|
66 |
def get_model_size(model_info: ModelInfo, precision: str):
|
67 |
-
size_pattern =
|
68 |
try:
|
69 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
70 |
except (AttributeError, TypeError ):
|
|
|
64 |
|
65 |
|
66 |
def get_model_size(model_info: ModelInfo, precision: str):
|
67 |
+
size_pattern = re.compile(r"(\d+\.)?\d+(b|m)")
|
68 |
try:
|
69 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
70 |
except (AttributeError, TypeError ):
|