Spaces:
Runtime error
Runtime error
:recycle: refactor larger model whitelisting.
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ logo = open('./logo.svg').read()
|
|
53 |
|
54 |
with open('./model-cache.json', 'r') as f_model_cache:
|
55 |
model_cache = json.load(f_model_cache)
|
56 |
-
|
57 |
|
58 |
model_class_filter = {
|
59 |
"mistral-v02-7b-std-lc": True,
|
@@ -72,6 +72,15 @@ model_class_filter = {
|
|
72 |
"llama3-405b-lc":False,
|
73 |
}
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
def build_model_choices():
|
76 |
all_choices = []
|
77 |
for model_class in model_cache:
|
@@ -83,14 +92,7 @@ def build_model_choices():
|
|
83 |
continue
|
84 |
all_choices += [ (f"{model_id} ({model_class})", model_id) for model_id in model_cache[model_class] ]
|
85 |
|
86 |
-
|
87 |
-
model_class = "llama3-70b-8k"
|
88 |
-
model_id = "mattshumer/Reflection-Llama-3.1-70B"
|
89 |
-
all_choices += [(f"{model_id} ({model_class})", model_id)]
|
90 |
-
|
91 |
-
model_class = "qwen2-72b"
|
92 |
-
model_id = "Qwen/Qwen2.5-72B"
|
93 |
-
all_choices += [(f"{model_id} ({model_class})", model_id)]
|
94 |
|
95 |
return all_choices
|
96 |
|
|
|
53 |
|
54 |
with open('./model-cache.json', 'r') as f_model_cache:
|
55 |
model_cache = json.load(f_model_cache)
|
56 |
+
model_class_from_model_id = { model_id: model_class for model_class, model_ids in model_cache.items() for model_id in model_ids }
|
57 |
|
58 |
model_class_filter = {
|
59 |
"mistral-v02-7b-std-lc": True,
|
|
|
72 |
"llama3-405b-lc":False,
|
73 |
}
|
74 |
|
75 |
+
# we run a few other models here as well
|
76 |
+
REFLECTION="mattshumer/Reflection-Llama-3.1-70B"
|
77 |
+
QWEN25_72B="Qwen/Qwen2.5-72B"
|
78 |
+
bigger_whitelisted_models = [
|
79 |
+
REFLECTION,
|
80 |
+
QWEN25_72B
|
81 |
+
]
|
82 |
+
# REFLECTION is in backup hosting
|
83 |
+
model_class_from_model_id[REFLECTION] = 'llama31-70b-16k'
|
84 |
def build_model_choices():
|
85 |
all_choices = []
|
86 |
for model_class in model_cache:
|
|
|
92 |
continue
|
93 |
all_choices += [ (f"{model_id} ({model_class})", model_id) for model_id in model_cache[model_class] ]
|
94 |
|
95 |
+
all_choices += [ (f"{model_id}, {model_class_from_model_id[model_id]}", model_id) for model_id in bigger_whitelisted_models ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
return all_choices
|
98 |
|