Commit
Β·
1580227
1
Parent(s):
529d871
update #2
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +32 -29
- src/main_df.csv +24 -24
- src/process_data.py +2 -2
- utils/__pycache__/filter_utils.cpython-310.pyc +0 -0
- utils/__pycache__/text_utils.cpython-310.pyc +0 -0
- utils/filter_utils.py +13 -6
- utils/text_utils.py +6 -10
__pycache__/app.cpython-310.pyc
CHANGED
|
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
|
|
|
app.py
CHANGED
|
@@ -5,13 +5,16 @@ from gradio_rangeslider import RangeSlider
|
|
| 5 |
import math
|
| 6 |
|
| 7 |
from utils.filter_utils import filter, filter_cols
|
| 8 |
-
from utils.text_utils import context_markdown, parameter_markdown
|
| 9 |
-
|
| 10 |
-
# MAPS = filter_utils.LANG_MAPPING
|
| 11 |
|
| 12 |
# Main Leaderboard containing everything
|
| 13 |
text_leaderboard = pd.read_csv(os.path.join('src', 'main_df.csv'))
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Short leaderboard containing fixed columns
|
| 17 |
short_leaderboard = filter_cols(text_leaderboard)
|
|
@@ -38,7 +41,7 @@ for i in range(len(text_leaderboard)):
|
|
| 38 |
op_prices.append(text_leaderboard.iloc[i]['Output $/1M'])
|
| 39 |
latencies.append(text_leaderboard.iloc[i]['Average Latency (s)'])
|
| 40 |
parameters.append(text_leaderboard.iloc[i]['Parameter Size (B)'])
|
| 41 |
-
contexts.append(text_leaderboard.iloc[i]['Context Size'])
|
| 42 |
dates.append(text_leaderboard.iloc[i]['Release Date'])
|
| 43 |
|
| 44 |
|
|
@@ -52,18 +55,26 @@ max_input_price = max(ip_prices)
|
|
| 52 |
max_output_price = max(op_prices)
|
| 53 |
max_latency = max(latencies)
|
| 54 |
|
| 55 |
-
|
| 56 |
-
max_parameter =
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
-
max_context =
|
|
|
|
| 60 |
|
| 61 |
min_date = min(dates)
|
| 62 |
max_date = max(dates)
|
| 63 |
|
| 64 |
TITLE = """<h1 align="center" id="space-title"> LLM Calculator βοΈβ‘ ππ°</h1>"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
llm_calc_app = gr.Blocks()
|
| 67 |
with llm_calc_app:
|
| 68 |
|
| 69 |
gr.HTML(TITLE)
|
|
@@ -132,36 +143,26 @@ with llm_calc_app:
|
|
| 132 |
with gr.Column():
|
| 133 |
|
| 134 |
####### LOG SLIDER 1 ###########
|
| 135 |
-
with gr.Row():
|
| 136 |
-
range_ = gr.Markdown("### Select Parameter Range")
|
| 137 |
-
|
| 138 |
with gr.Row():
|
| 139 |
parameter_slider = RangeSlider(
|
| 140 |
minimum=0,
|
| 141 |
maximum=max_parameter,
|
| 142 |
-
label="Parameter Range π (
|
|
|
|
|
|
|
| 143 |
)
|
| 144 |
-
|
| 145 |
-
parameter_slider.change(parameter_markdown, parameter_slider, range_,
|
| 146 |
-
show_progress="hide", trigger_mode="always_last")
|
| 147 |
|
| 148 |
########### LOG SLIDER 2 ################
|
| 149 |
-
with gr.Row():
|
| 150 |
-
context_range_ = gr.Markdown("### Select Context Range")
|
| 151 |
|
| 152 |
with gr.Row():
|
| 153 |
context_slider = RangeSlider(
|
| 154 |
minimum=0,
|
| 155 |
maximum=max_context,
|
| 156 |
-
label="Context Range
|
|
|
|
|
|
|
| 157 |
)
|
| 158 |
-
|
| 159 |
-
context_slider.change(context_markdown, context_slider, context_range_,
|
| 160 |
-
show_progress="hide", trigger_mode="always_last")
|
| 161 |
-
|
| 162 |
-
########## HTML BREK LINE ###########
|
| 163 |
-
with gr.Row():
|
| 164 |
-
break_mkdn = gr.Markdown("### Select the Price range π²π‘- Value shown in $ per Million tokens")
|
| 165 |
|
| 166 |
############# PRICE SLIDER 1 ###############
|
| 167 |
with gr.Row():
|
|
@@ -169,7 +170,8 @@ with llm_calc_app:
|
|
| 169 |
minimum=0,
|
| 170 |
maximum=max_input_price,
|
| 171 |
value=(0, max_input_price),
|
| 172 |
-
label="Select Price range
|
|
|
|
| 173 |
)
|
| 174 |
|
| 175 |
############### PRICE SLIDER 2 ###############
|
|
@@ -178,7 +180,8 @@ with llm_calc_app:
|
|
| 178 |
minimum=0,
|
| 179 |
maximum=max_output_price,
|
| 180 |
value=(0, max_output_price),
|
| 181 |
-
label="Select Price range
|
|
|
|
| 182 |
)
|
| 183 |
|
| 184 |
|
|
|
|
| 5 |
import math
|
| 6 |
|
| 7 |
from utils.filter_utils import filter, filter_cols
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
# Main Leaderboard containing everything
|
| 10 |
text_leaderboard = pd.read_csv(os.path.join('src', 'main_df.csv'))
|
| 11 |
+
text_leaderboard = text_leaderboard.sort_values(by='Average Clemscore', ascending=False)
|
| 12 |
+
|
| 13 |
+
text_leaderboard = text_leaderboard.sort_values(by='Average Clemscore', ascending=False)
|
| 14 |
+
|
| 15 |
+
open_weight_df = text_leaderboard[text_leaderboard['Open Weight'] == True]
|
| 16 |
+
if not open_weight_df.empty: # Check if filtered df is non-empty
|
| 17 |
+
max_parameter_size = open_weight_df['Parameter Size (B)'].max()
|
| 18 |
|
| 19 |
# Short leaderboard containing fixed columns
|
| 20 |
short_leaderboard = filter_cols(text_leaderboard)
|
|
|
|
| 41 |
op_prices.append(text_leaderboard.iloc[i]['Output $/1M'])
|
| 42 |
latencies.append(text_leaderboard.iloc[i]['Average Latency (s)'])
|
| 43 |
parameters.append(text_leaderboard.iloc[i]['Parameter Size (B)'])
|
| 44 |
+
contexts.append(text_leaderboard.iloc[i]['Context Size (k)'])
|
| 45 |
dates.append(text_leaderboard.iloc[i]['Release Date'])
|
| 46 |
|
| 47 |
|
|
|
|
| 55 |
max_output_price = max(op_prices)
|
| 56 |
max_latency = max(latencies)
|
| 57 |
|
| 58 |
+
min_parameters = min(parameters)
|
| 59 |
+
max_parameter = max_parameter_size
|
| 60 |
+
parameter_step = 1
|
| 61 |
|
| 62 |
+
min_context = min(contexts)
|
| 63 |
+
max_context = max(contexts)
|
| 64 |
+
context_step = 8
|
| 65 |
|
| 66 |
min_date = min(dates)
|
| 67 |
max_date = max(dates)
|
| 68 |
|
| 69 |
TITLE = """<h1 align="center" id="space-title"> LLM Calculator βοΈβ‘ ππ°</h1>"""
|
| 70 |
+
CSS = """
|
| 71 |
+
#double-slider-1 {height: 100px}
|
| 72 |
+
#double-slider-2 {height: 100px}
|
| 73 |
+
#double-slider-3 {height: 100px}
|
| 74 |
+
#double-slider-4 {height: 100px}
|
| 75 |
+
"""
|
| 76 |
|
| 77 |
+
llm_calc_app = gr.Blocks(css=CSS)
|
| 78 |
with llm_calc_app:
|
| 79 |
|
| 80 |
gr.HTML(TITLE)
|
|
|
|
| 143 |
with gr.Column():
|
| 144 |
|
| 145 |
####### LOG SLIDER 1 ###########
|
|
|
|
|
|
|
|
|
|
| 146 |
with gr.Row():
|
| 147 |
parameter_slider = RangeSlider(
|
| 148 |
minimum=0,
|
| 149 |
maximum=max_parameter,
|
| 150 |
+
label=f"Select Parameter Range π {int(min_parameters)}B - {int(max_parameter)}B+",
|
| 151 |
+
elem_id="double-slider-1",
|
| 152 |
+
step=parameter_step
|
| 153 |
)
|
| 154 |
+
|
|
|
|
|
|
|
| 155 |
|
| 156 |
########### LOG SLIDER 2 ################
|
|
|
|
|
|
|
| 157 |
|
| 158 |
with gr.Row():
|
| 159 |
context_slider = RangeSlider(
|
| 160 |
minimum=0,
|
| 161 |
maximum=max_context,
|
| 162 |
+
label="Select Context Range (k) π",
|
| 163 |
+
elem_id="double-slider-2",
|
| 164 |
+
step=context_step
|
| 165 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
|
| 167 |
############# PRICE SLIDER 1 ###############
|
| 168 |
with gr.Row():
|
|
|
|
| 170 |
minimum=0,
|
| 171 |
maximum=max_input_price,
|
| 172 |
value=(0, max_input_price),
|
| 173 |
+
label="Select Price range π²/1M input tokens",
|
| 174 |
+
elem_id="double-slider-3"
|
| 175 |
)
|
| 176 |
|
| 177 |
############### PRICE SLIDER 2 ###############
|
|
|
|
| 180 |
minimum=0,
|
| 181 |
maximum=max_output_price,
|
| 182 |
value=(0, max_output_price),
|
| 183 |
+
label="Select Price range π²/1M output tokens",
|
| 184 |
+
elem_id="double-slider-4"
|
| 185 |
)
|
| 186 |
|
| 187 |
|
src/main_df.csv
CHANGED
|
@@ -1,24 +1,24 @@
|
|
| 1 |
-
Model Name,Input $/1M,Output $/1M,Multimodality Image,Multimodality Multiple Image,Multimodality Audio,Multimodality Video,Source,License Name,License,Languages,Release Date,Open Weight,Context Size,Average Clemscore,Average Latency (s),Parameter Size (B),Estimated,Temp Date
|
| 2 |
-
"<a href=""https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct"" style=""color: blue;"">Meta-Llama-3-70B-Instruct-hf</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct,Meta Llama 3 License,"<a href=""https://www.llama.com/llama3/license/"" style=""color: blue;"">Meta Llama 3 License</a>",English,2024-04-18,True,
|
| 3 |
-
"<a href=""https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct"" style=""color: blue;"">Meta-Llama-3-8B-Instruct-hf</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct,Meta Llama 3 License,"<a href=""https://www.llama.com/llama3/license/"" style=""color: blue;"">Meta Llama 3 License</a>",English,2024-04-18,True,
|
| 4 |
-
"<a href=""https://huggingface.co/meta-llama/Llama-3.1-405B-Instruct"" style=""color: blue;"">Meta-Llama-3.1-405B-Instruct-Turbo</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Llama-3.1-405B-Instruct,Llama 3.1 Community License,"<a href=""https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE"" style=""color: blue;"">Llama 3.1 Community License</a>","English, German, French, Italian, Hindi, Portuguese, Spanish, Thai",2024-07-23,True,
|
| 5 |
-
"<a href=""https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct"" style=""color: blue;"">Meta-Llama-3.1-70B-Instruct</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct,Llama 3.1 Community License,"<a href=""https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE"" style=""color: blue;"">Llama 3.1 Community License</a>","English, German, French, Italian, Hindi, Portuguese, Spanish, Thai",2024-07-23,True,
|
| 6 |
-
"<a href=""https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct"" style=""color: blue;"">Meta-Llama-3.1-8B-Instruct</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct,Llama 3.1 Community License,"<a href=""https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE"" style=""color: blue;"">Llama 3.1 Community License</a>","English, German, French, Italian, Hindi, Portuguese, Spanish, Thai",2024-07-23,True,
|
| 7 |
-
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-40B"" style=""color: blue;"">InternVL2-40B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-40B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,
|
| 8 |
-
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-8B"" style=""color: blue;"">InternVL2-8B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-8B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,
|
| 9 |
-
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B"" style=""color: blue;"">InternVL2-Llama3-76B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,
|
| 10 |
-
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-26B"" style=""color: blue;"">InternVL2-26B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-26B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,
|
| 11 |
-
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-26B"" style=""color: blue;"">InternVL2-26B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-26B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,
|
| 12 |
-
"<a href=""https://huggingface.co/mistralai/Mistral-Large-Instruct-2407"" style=""color: blue;"">Mistral-Large-Instruct-2407</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mistral-Large-Instruct-2407,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian, Chinese, Japanese, Korean",2024-06-12,True,
|
| 13 |
-
"<a href=""https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1"" style=""color: blue;"">Mixtral-8x22B-Instruct-v0.1</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian",2024-04-17,True,
|
| 14 |
-
"<a href=""https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2"" style=""color: blue;"">Mistral-7B-Instruct-v0.2</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian, Chinese",2024-01-15,True,
|
| 15 |
-
"<a href=""https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1"" style=""color: blue;"">Mistral-7B-Instruct-v0.1</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian, Chinese",2023-12-11,True,
|
| 16 |
-
"<a href=""https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1"" style=""color: blue;"">Mixtral-8x7B-Instruct-v0.1</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian",2023-12-11,True,
|
| 17 |
-
"<a href=""https://huggingface.co/openchat/openchat-3.5-0106"" style=""color: blue;"">openchat-3.5-0106</a>",0.0,0.0,False,False,False,False,https://huggingface.co/openchat/openchat-3.5-0106,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>",English,2024-01-06,True,
|
| 18 |
-
"<a href=""https://huggingface.co/openchat/openchat-3.5-1210"" style=""color: blue;"">openchat-3.5-1210</a>",0.0,0.0,False,False,False,False,https://huggingface.co/openchat/openchat-3.5-1210,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>",English,2023-12-10,True,
|
| 19 |
-
"<a href=""https://huggingface.co/openchat/openchat_3.5"" style=""color: blue;"">openchat_3.5</a>",0.0,0.0,False,False,False,False,https://huggingface.co/openchat/openchat_3.5,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>",English,2023-10-30,True,
|
| 20 |
-
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4o-mini-2024-07-18</a>",0.15,0.6,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2024-07-18,False,
|
| 21 |
-
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4o-2024-08-06</a>",2.5,10.0,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2024-08-06,False,
|
| 22 |
-
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4o-2024-05-13</a>",2.5,10.0,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2024-05-13,False,
|
| 23 |
-
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4-1106-vision-preview</a>",10.0,30.0,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2023-11-06,False,
|
| 24 |
-
"<a href=""https://cloud.google.com/vertex-ai/generative-ai/pricing"" style=""color: blue;"">gemini-1.5-flash-latest</a>",0.075,0.3,True,True,True,True,https://cloud.google.com/vertex-ai/generative-ai/pricing,Commercial License,"<a href="""" style=""color: blue;"">Commercial License</a>","Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Latvian, Arabic, Bengali, Bulgarian",2024-05-24,False,
|
|
|
|
| 1 |
+
Model Name,Input $/1M,Output $/1M,Multimodality Image,Multimodality Multiple Image,Multimodality Audio,Multimodality Video,Source,License Name,License,Languages,Release Date,Open Weight,Context Size (k),Average Clemscore,Average Latency (s),Parameter Size (B),Estimated,Temp Date
|
| 2 |
+
"<a href=""https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct"" style=""color: blue;"">Meta-Llama-3-70B-Instruct-hf</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct,Meta Llama 3 License,"<a href=""https://www.llama.com/llama3/license/"" style=""color: blue;"">Meta Llama 3 License</a>",English,2024-04-18,True,8,11.703,1.116,70.0,False,2024-04-18
|
| 3 |
+
"<a href=""https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct"" style=""color: blue;"">Meta-Llama-3-8B-Instruct-hf</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct,Meta Llama 3 License,"<a href=""https://www.llama.com/llama3/license/"" style=""color: blue;"">Meta Llama 3 License</a>",English,2024-04-18,True,8,6.663,0.705,8.0,False,2024-04-18
|
| 4 |
+
"<a href=""https://huggingface.co/meta-llama/Llama-3.1-405B-Instruct"" style=""color: blue;"">Meta-Llama-3.1-405B-Instruct-Turbo</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Llama-3.1-405B-Instruct,Llama 3.1 Community License,"<a href=""https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE"" style=""color: blue;"">Llama 3.1 Community License</a>","English, German, French, Italian, Hindi, Portuguese, Spanish, Thai",2024-07-23,True,128,17.37,0.263,405.0,False,2024-07-23
|
| 5 |
+
"<a href=""https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct"" style=""color: blue;"">Meta-Llama-3.1-70B-Instruct</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct,Llama 3.1 Community License,"<a href=""https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE"" style=""color: blue;"">Llama 3.1 Community License</a>","English, German, French, Italian, Hindi, Portuguese, Spanish, Thai",2024-07-23,True,128,12.943,0.27,70.0,False,2024-07-23
|
| 6 |
+
"<a href=""https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct"" style=""color: blue;"">Meta-Llama-3.1-8B-Instruct</a>",0.0,0.0,False,False,False,False,https://huggingface.co/meta-llama/Llama-3.1-8B-Instruct,Llama 3.1 Community License,"<a href=""https://github.com/meta-llama/llama-models/blob/main/models/llama3_1/LICENSE"" style=""color: blue;"">Llama 3.1 Community License</a>","English, German, French, Italian, Hindi, Portuguese, Spanish, Thai",2024-07-23,True,128,6.12,0.069,8.0,False,2024-07-23
|
| 7 |
+
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-40B"" style=""color: blue;"">InternVL2-40B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-40B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,8,21.81,2.609,40.0,False,2024-07-15
|
| 8 |
+
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-8B"" style=""color: blue;"">InternVL2-8B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-8B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,8,19.74,0.837,8.0,False,2024-07-15
|
| 9 |
+
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B"" style=""color: blue;"">InternVL2-Llama3-76B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-Llama3-76B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,8,25.71,4.591,76.0,False,2024-07-15
|
| 10 |
+
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-26B"" style=""color: blue;"">InternVL2-26B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-26B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,8,23.24,1.759,26.0,False,2024-07-15
|
| 11 |
+
"<a href=""https://huggingface.co/OpenGVLab/InternVL2-26B"" style=""color: blue;"">InternVL2-26B</a>",0.0,0.0,True,True,False,False,https://huggingface.co/OpenGVLab/InternVL2-26B,MIT,"<a href=""https://choosealicense.com/licenses/mit/"" style=""color: blue;"">MIT</a>","Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic",2024-07-15,True,8,23.24,1.759,26.0,False,2024-07-15
|
| 12 |
+
"<a href=""https://huggingface.co/mistralai/Mistral-Large-Instruct-2407"" style=""color: blue;"">Mistral-Large-Instruct-2407</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mistral-Large-Instruct-2407,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian, Chinese, Japanese, Korean",2024-06-12,True,8,15.13,0.415,70.0,False,2024-06-12
|
| 13 |
+
"<a href=""https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1"" style=""color: blue;"">Mixtral-8x22B-Instruct-v0.1</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mixtral-8x22B-Instruct-v0.1,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian",2024-04-17,True,8,4.23,0.359,141.0,False,2024-04-17
|
| 14 |
+
"<a href=""https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2"" style=""color: blue;"">Mistral-7B-Instruct-v0.2</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian, Chinese",2024-01-15,True,8,3.25,0.255,7.0,False,2024-01-15
|
| 15 |
+
"<a href=""https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1"" style=""color: blue;"">Mistral-7B-Instruct-v0.1</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian, Chinese",2023-12-11,True,8,2.67,0.094,7.0,False,2023-12-11
|
| 16 |
+
"<a href=""https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1"" style=""color: blue;"">Mixtral-8x7B-Instruct-v0.1</a>",0.0,0.0,False,False,False,False,https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>","English, French, Spanish, German, Italian, Russian",2023-12-11,True,8,2.723,0.313,46.7,False,2023-12-11
|
| 17 |
+
"<a href=""https://huggingface.co/openchat/openchat-3.5-0106"" style=""color: blue;"">openchat-3.5-0106</a>",0.0,0.0,False,False,False,False,https://huggingface.co/openchat/openchat-3.5-0106,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>",English,2024-01-06,True,8,5.7,0.097,7.0,False,2024-01-06
|
| 18 |
+
"<a href=""https://huggingface.co/openchat/openchat-3.5-1210"" style=""color: blue;"">openchat-3.5-1210</a>",0.0,0.0,False,False,False,False,https://huggingface.co/openchat/openchat-3.5-1210,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>",English,2023-12-10,True,8,6.073,0.093,7.0,False,2023-12-10
|
| 19 |
+
"<a href=""https://huggingface.co/openchat/openchat_3.5"" style=""color: blue;"">openchat_3.5</a>",0.0,0.0,False,False,False,False,https://huggingface.co/openchat/openchat_3.5,Apache 2.0,"<a href=""https://www.apache.org/licenses/LICENSE-2.0"" style=""color: blue;"">Apache 2.0</a>",English,2023-10-30,True,8,7.88,0.106,7.0,False,2023-10-30
|
| 20 |
+
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4o-mini-2024-07-18</a>",0.15,0.6,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2024-07-18,False,128,52.323,1.619,8.0,True,2024-07-18
|
| 21 |
+
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4o-2024-08-06</a>",2.5,10.0,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2024-08-06,False,128,69.57,1.577,200.0,True,2024-08-06
|
| 22 |
+
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4o-2024-05-13</a>",2.5,10.0,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2024-05-13,False,128,66.873,3.705,200.0,True,2024-05-13
|
| 23 |
+
"<a href=""https://openai.com/api/pricing/"" style=""color: blue;"">gpt-4-1106-vision-preview</a>",10.0,30.0,True,True,False,False,https://openai.com/api/pricing/,Commercial License,"<a href=""https://openai.com/policies/terms-of-use"" style=""color: blue;"">Commercial License</a>","English, Spanish, French, German, Chinese, Japanese, Korean, Italian, Portuguese, Dutch, Russian, Arabic, Hindi, Turkish, Vietnamese, Polish, Thai, Swedish, Danish, Norwegian, Finnish, Hungarian, Czech, Slovak, Romanian, Bulgarian, Ukrainian, Lithuanian, Latvian, Estonian, Slovenian, Malay, Indonesian, Tagalog, Swahili, Amharic",2023-11-06,False,128,47.23,2.217,1760.0,True,2023-11-06
|
| 24 |
+
"<a href=""https://cloud.google.com/vertex-ai/generative-ai/pricing"" style=""color: blue;"">gemini-1.5-flash-latest</a>",0.075,0.3,True,True,True,True,https://cloud.google.com/vertex-ai/generative-ai/pricing,Commercial License,"<a href="""" style=""color: blue;"">Commercial License</a>","Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Swahili, Swedish, Thai, Turkish, Ukrainian, Vietnamese, Chinese, Croatian, Czech, Danish, Dutch, English, Estonian, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, Italian, Japanese, Korean, Latvian, Arabic, Bengali, Bulgarian",2024-05-24,False,128,42.537,26.268,1760.0,True,2024-05-24
|
src/process_data.py
CHANGED
|
@@ -108,7 +108,7 @@ for col in additional_price_columns:
|
|
| 108 |
# Clean and convert context to integer
|
| 109 |
df['context_size'] = df['context_size'].replace({'k': ''}, regex=True).astype(int)
|
| 110 |
|
| 111 |
-
df['context_size'] = df['context_size']
|
| 112 |
|
| 113 |
df['parameter_size'] = df['parameter_size'].replace({'B': '', '': None}, regex=True).astype(float)
|
| 114 |
|
|
@@ -194,7 +194,7 @@ df = df.rename(columns={
|
|
| 194 |
'languages': 'Languages',
|
| 195 |
'release_date': 'Release Date',
|
| 196 |
'open_weight': 'Open Weight',
|
| 197 |
-
'context_size': 'Context Size',
|
| 198 |
'average_clemscore': 'Average Clemscore',
|
| 199 |
'average_latency': 'Average Latency (s)',
|
| 200 |
'parameter_size': 'Parameter Size (B)',
|
|
|
|
| 108 |
# Clean and convert context to integer
|
| 109 |
df['context_size'] = df['context_size'].replace({'k': ''}, regex=True).astype(int)
|
| 110 |
|
| 111 |
+
df['context_size'] = df['context_size']
|
| 112 |
|
| 113 |
df['parameter_size'] = df['parameter_size'].replace({'B': '', '': None}, regex=True).astype(float)
|
| 114 |
|
|
|
|
| 194 |
'languages': 'Languages',
|
| 195 |
'release_date': 'Release Date',
|
| 196 |
'open_weight': 'Open Weight',
|
| 197 |
+
'context_size': 'Context Size (k)',
|
| 198 |
'average_clemscore': 'Average Clemscore',
|
| 199 |
'average_latency': 'Average Latency (s)',
|
| 200 |
'parameter_size': 'Parameter Size (B)',
|
utils/__pycache__/filter_utils.cpython-310.pyc
CHANGED
|
Binary files a/utils/__pycache__/filter_utils.cpython-310.pyc and b/utils/__pycache__/filter_utils.cpython-310.pyc differ
|
|
|
utils/__pycache__/text_utils.cpython-310.pyc
CHANGED
|
Binary files a/utils/__pycache__/text_utils.cpython-310.pyc and b/utils/__pycache__/text_utils.cpython-310.pyc differ
|
|
|
utils/filter_utils.py
CHANGED
|
@@ -4,18 +4,20 @@ import pandas as pd
|
|
| 4 |
|
| 5 |
def filter_cols(df):
|
| 6 |
|
|
|
|
| 7 |
df = df[[
|
| 8 |
'Model Name',
|
| 9 |
'Input $/1M',
|
| 10 |
'Output $/1M',
|
| 11 |
'Average Clemscore',
|
| 12 |
-
'Context Size',
|
| 13 |
'Average Latency (s)',
|
| 14 |
'Parameter Size (B)',
|
| 15 |
'Release Date',
|
| 16 |
'License'
|
| 17 |
]]
|
| 18 |
|
|
|
|
| 19 |
return df
|
| 20 |
|
| 21 |
|
|
@@ -26,7 +28,15 @@ def filter(df, language_list, parameters, input_price, output_price, multimodal,
|
|
| 26 |
df = df[df['Languages'].apply(lambda x: all(lang in x for lang in language_list))]
|
| 27 |
|
| 28 |
if not df.empty: # Check if df is non-empty
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
if not df.empty: # Check if df is non-empty
|
| 32 |
df = df[(df['Input $/1M'] >= input_price[0]) & (df['Input $/1M'] <= input_price[1])]
|
|
@@ -45,7 +55,7 @@ def filter(df, language_list, parameters, input_price, output_price, multimodal,
|
|
| 45 |
df = df[df['Multimodality Video'] == True]
|
| 46 |
|
| 47 |
if not df.empty: # Check if df is non-empty
|
| 48 |
-
df = df[(df['Context Size'] >= (
|
| 49 |
|
| 50 |
if not df.empty: # Check if df is non-empty
|
| 51 |
if "Open" in open_weight and "Commercial" not in open_weight:
|
|
@@ -68,9 +78,6 @@ def filter(df, language_list, parameters, input_price, output_price, multimodal,
|
|
| 68 |
if not df.empty: # Check if df is non-empty
|
| 69 |
df = df[(df['Temp Date'] >= start) & (df['Temp Date'] <= end)]
|
| 70 |
|
| 71 |
-
df = df.sort_values(by='Average Clemscore', ascending=False) # Sort in descending order
|
| 72 |
-
|
| 73 |
-
|
| 74 |
df = filter_cols(df)
|
| 75 |
|
| 76 |
return df # Return the filtered dataframe
|
|
|
|
| 4 |
|
| 5 |
def filter_cols(df):
|
| 6 |
|
| 7 |
+
|
| 8 |
df = df[[
|
| 9 |
'Model Name',
|
| 10 |
'Input $/1M',
|
| 11 |
'Output $/1M',
|
| 12 |
'Average Clemscore',
|
| 13 |
+
'Context Size (k)',
|
| 14 |
'Average Latency (s)',
|
| 15 |
'Parameter Size (B)',
|
| 16 |
'Release Date',
|
| 17 |
'License'
|
| 18 |
]]
|
| 19 |
|
| 20 |
+
|
| 21 |
return df
|
| 22 |
|
| 23 |
|
|
|
|
| 28 |
df = df[df['Languages'].apply(lambda x: all(lang in x for lang in language_list))]
|
| 29 |
|
| 30 |
if not df.empty: # Check if df is non-empty
|
| 31 |
+
open_weight_df = df[df['Open Weight'] == True]
|
| 32 |
+
if not open_weight_df.empty: # Check if filtered df is non-empty
|
| 33 |
+
max_parameter_size = open_weight_df['Parameter Size (B)'].max()
|
| 34 |
+
print(f"MMMMMMMMMMMMMMMMMMMMMMm: {max_parameter_size}")
|
| 35 |
+
|
| 36 |
+
if parameters[1] >= max_parameter_size:
|
| 37 |
+
df = df[(df['Parameter Size (B)'] >= parameters[0])]
|
| 38 |
+
elif parameters[1] < max_parameter_size:
|
| 39 |
+
df = df[(df['Parameter Size (B)'] >= parameters[0]) & (df['Parameter Size (B)'] <= parameters[1])]
|
| 40 |
|
| 41 |
if not df.empty: # Check if df is non-empty
|
| 42 |
df = df[(df['Input $/1M'] >= input_price[0]) & (df['Input $/1M'] <= input_price[1])]
|
|
|
|
| 55 |
df = df[df['Multimodality Video'] == True]
|
| 56 |
|
| 57 |
if not df.empty: # Check if df is non-empty
|
| 58 |
+
df = df[(df['Context Size (k)'] >= (context[0])) & (df['Context Size (k)'] <= (context[1]))]
|
| 59 |
|
| 60 |
if not df.empty: # Check if df is non-empty
|
| 61 |
if "Open" in open_weight and "Commercial" not in open_weight:
|
|
|
|
| 78 |
if not df.empty: # Check if df is non-empty
|
| 79 |
df = df[(df['Temp Date'] >= start) & (df['Temp Date'] <= end)]
|
| 80 |
|
|
|
|
|
|
|
|
|
|
| 81 |
df = filter_cols(df)
|
| 82 |
|
| 83 |
return df # Return the filtered dataframe
|
utils/text_utils.py
CHANGED
|
@@ -1,17 +1,13 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def context_markdown(context):
|
|
|
|
| 4 |
|
| 5 |
-
min_context = int(2**context[0])
|
| 6 |
-
max_context = int(2**context[1])
|
| 7 |
|
| 8 |
-
|
| 9 |
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
min_p = int(2**parameters[0])
|
| 14 |
-
max_p = int(2**parameters[1])
|
| 15 |
-
|
| 16 |
-
return gr.Markdown(f"### Selected Parameter Range : {min_p}B - {max_p}B")
|
| 17 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
# def context_markdown(context):
|
| 4 |
+
# return gr.Markdown(f"### Selected Context Range : {min_context}k - {max_context}k")
|
| 5 |
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
# def parameter_markdown(parameters):
|
| 8 |
|
| 9 |
+
# min_p = int(2**parameters[0])
|
| 10 |
+
# max_p = int(2**parameters[1])
|
| 11 |
|
| 12 |
+
# return gr.Markdown(f"### Selected Parameter Range : {min_p}B - {max_p}B")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|