Spaces:
Running
Running
Vokturz
commited on
Commit
·
2d1f5e3
1
Parent(s):
03a3e66
set access_token to None in get_model function
Browse files- src/app.py +4 -11
src/app.py
CHANGED
|
@@ -13,26 +13,19 @@ model_list = [
|
|
| 13 |
"NousResearch/Meta-Llama-3-8B-Instruct",
|
| 14 |
"NousResearch/Meta-Llama-3-70B-Instruct",
|
| 15 |
"mistral-community/Mistral-7B-v0.2",
|
| 16 |
-
# "mistralai/Mixtral-8x7B-Instruct-v0.1",
|
| 17 |
"mistral-community/Mixtral-8x22B-v0.1",
|
| 18 |
-
"HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1",
|
| 19 |
-
# "CohereForAI/c4ai-command-r-plus",
|
| 20 |
-
# "CohereForAI/c4ai-command-r-v01",
|
| 21 |
-
"hpcai-tech/grok-1",
|
| 22 |
"NexaAIDev/Octopus-v2",
|
| 23 |
"HuggingFaceH4/zephyr-7b-gemma-v0.1",
|
| 24 |
"HuggingFaceH4/starchat2-15b-v0.1",
|
|
|
|
| 25 |
"deepseek-ai/deepseek-coder-6.7b-instruct",
|
| 26 |
-
"deepseek-ai/
|
| 27 |
-
"microsoft/phi-2",
|
| 28 |
"TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
| 29 |
"codellama/CodeLlama-7b-hf",
|
| 30 |
"codellama/CodeLlama-13b-hf",
|
| 31 |
"codellama/CodeLlama-34b-hf",
|
| 32 |
"Phind/Phind-CodeLlama-34B-v2",
|
| 33 |
-
"tiiuae/falcon-40B",
|
| 34 |
"tiiuae/falcon-40B-Instruct",
|
| 35 |
-
"tiiuae/falcon-180B",
|
| 36 |
"tiiuae/falcon-180B-Chat",
|
| 37 |
]
|
| 38 |
st.title("Can you run it? LLM version")
|
|
@@ -52,7 +45,7 @@ def cache_model_list():
|
|
| 52 |
model_list_info = {}
|
| 53 |
for model_name in model_list:
|
| 54 |
if not "tiiuae/falcon" in model_name: # Exclude Falcon models
|
| 55 |
-
model = get_model(model_name, library="transformers", access_token=
|
| 56 |
model_list_info[model_name] = calculate_memory(model, ["float32", "float16/bfloat16", "int8", "int4"])
|
| 57 |
del model
|
| 58 |
gc.collect()
|
|
@@ -139,7 +132,7 @@ if model_name not in st.session_state:
|
|
| 139 |
if model_name in model_list_info.keys():
|
| 140 |
st.session_state[model_name] = model_list_info[model_name]
|
| 141 |
else:
|
| 142 |
-
model = get_model(model_name, library="transformers", access_token=access_token)
|
| 143 |
st.session_state[model_name] = calculate_memory(model, ["float32", "float16/bfloat16", "int8", "int4"])
|
| 144 |
del model
|
| 145 |
gc.collect()
|
|
|
|
| 13 |
"NousResearch/Meta-Llama-3-8B-Instruct",
|
| 14 |
"NousResearch/Meta-Llama-3-70B-Instruct",
|
| 15 |
"mistral-community/Mistral-7B-v0.2",
|
|
|
|
| 16 |
"mistral-community/Mixtral-8x22B-v0.1",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
"NexaAIDev/Octopus-v2",
|
| 18 |
"HuggingFaceH4/zephyr-7b-gemma-v0.1",
|
| 19 |
"HuggingFaceH4/starchat2-15b-v0.1",
|
| 20 |
+
"Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 21 |
"deepseek-ai/deepseek-coder-6.7b-instruct",
|
| 22 |
+
"deepseek-ai/DeepSeek-R1-Distill-Qwen-32B",
|
|
|
|
| 23 |
"TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
| 24 |
"codellama/CodeLlama-7b-hf",
|
| 25 |
"codellama/CodeLlama-13b-hf",
|
| 26 |
"codellama/CodeLlama-34b-hf",
|
| 27 |
"Phind/Phind-CodeLlama-34B-v2",
|
|
|
|
| 28 |
"tiiuae/falcon-40B-Instruct",
|
|
|
|
| 29 |
"tiiuae/falcon-180B-Chat",
|
| 30 |
]
|
| 31 |
st.title("Can you run it? LLM version")
|
|
|
|
| 45 |
model_list_info = {}
|
| 46 |
for model_name in model_list:
|
| 47 |
if not "tiiuae/falcon" in model_name: # Exclude Falcon models
|
| 48 |
+
model = get_model(model_name, library="transformers", access_token=None)
|
| 49 |
model_list_info[model_name] = calculate_memory(model, ["float32", "float16/bfloat16", "int8", "int4"])
|
| 50 |
del model
|
| 51 |
gc.collect()
|
|
|
|
| 132 |
if model_name in model_list_info.keys():
|
| 133 |
st.session_state[model_name] = model_list_info[model_name]
|
| 134 |
else:
|
| 135 |
+
model = get_model(model_name, library="transformers", access_token=access_token if access_token else None)
|
| 136 |
st.session_state[model_name] = calculate_memory(model, ["float32", "float16/bfloat16", "int8", "int4"])
|
| 137 |
del model
|
| 138 |
gc.collect()
|