Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Tom Aarsen
commited on
Commit
•
d8b28e2
1
Parent(s):
a9153cc
Clarify math for memory usage
Browse files
app.py
CHANGED
@@ -254,6 +254,9 @@ def get_mteb_data(tasks=["Clustering"], langs=[], datasets=[], fillna=True, add_
|
|
254 |
MODEL_INFOS[model.modelId]["dim_seq_size"] = list(get_dim_seq_size(model))
|
255 |
except:
|
256 |
name_without_org = model.modelId.split("/")[-1]
|
|
|
|
|
|
|
257 |
MODEL_INFOS[model.modelId]["dim_seq_size"] = (
|
258 |
EXTERNAL_MODEL_TO_DIM.get(name_without_org, ""),
|
259 |
EXTERNAL_MODEL_TO_SEQLEN.get(name_without_org, ""),
|
|
|
254 |
MODEL_INFOS[model.modelId]["dim_seq_size"] = list(get_dim_seq_size(model))
|
255 |
except:
|
256 |
name_without_org = model.modelId.split("/")[-1]
|
257 |
+
# EXTERNAL_MODEL_TO_SIZE[name_without_org] refers to millions of parameters, so for memory usage
|
258 |
+
# we multiply by 1e6 to get just the number of parameters, then by 4 to get the number of bytes
|
259 |
+
# given fp32 precision (4 bytes per float), then divide by 1024**3 to get the number of GB
|
260 |
MODEL_INFOS[model.modelId]["dim_seq_size"] = (
|
261 |
EXTERNAL_MODEL_TO_DIM.get(name_without_org, ""),
|
262 |
EXTERNAL_MODEL_TO_SEQLEN.get(name_without_org, ""),
|