Muennighoff commited on
Commit
7d1d0b3
1 Parent(s): dda305a

Add hidden_size to parsing

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- dim = json.load(open(config_path)).get("hidden_dim", "")
 
 
 
 
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