Spaces:
Runtime error
Runtime error
Muennighoff
commited on
Commit
•
7d1d0b3
1
Parent(s):
dda305a
Add hidden_size to parsing
Browse files
app.py
CHANGED
@@ -299,7 +299,11 @@ def get_emb_dim(model):
|
|
299 |
dim = json.load(open(st_config_path)).get("word_embedding_dimension", "")
|
300 |
elif "config.json" in filenames:
|
301 |
config_path = hf_hub_download(model.modelId, filename="config.json")
|
302 |
-
|
|
|
|
|
|
|
|
|
303 |
return dim
|
304 |
|
305 |
|
|
|
299 |
dim = json.load(open(st_config_path)).get("word_embedding_dimension", "")
|
300 |
elif "config.json" in filenames:
|
301 |
config_path = hf_hub_download(model.modelId, filename="config.json")
|
302 |
+
config = json.load(open(config_path))
|
303 |
+
if "hidden_dim" in config:
|
304 |
+
dim = config["hidden_dim"]
|
305 |
+
elif "hidden_size" in config:
|
306 |
+
dim = config["hidden_size"]
|
307 |
return dim
|
308 |
|
309 |
|