Commit
·
3433b65
1
Parent(s):
fbdc657
final draft
Browse files- __pycache__/app.cpython-310.pyc +0 -0
- app.py +111 -77
- src/main_df.csv +24 -24
- src/process_data.py +1 -0
- utils/__pycache__/filter_utils.cpython-310.pyc +0 -0
- utils/__pycache__/text_utils.cpython-310.pyc +0 -0
- utils/filter_utils.py +36 -23
- utils/text_utils.py +17 -0
__pycache__/app.cpython-310.pyc
ADDED
Binary file (4.91 kB). View file
|
|
app.py
CHANGED
@@ -5,6 +5,7 @@ from gradio_rangeslider import RangeSlider
|
|
5 |
import math
|
6 |
|
7 |
from utils.filter_utils import filter, filter_cols
|
|
|
8 |
|
9 |
# MAPS = filter_utils.LANG_MAPPING
|
10 |
|
@@ -60,95 +61,126 @@ max_context = math.ceil(math.log2(max_context))
|
|
60 |
min_date = min(dates)
|
61 |
max_date = max(dates)
|
62 |
|
|
|
63 |
|
64 |
llm_calc_app = gr.Blocks()
|
65 |
-
with llm_calc_app:
|
66 |
-
### Language filter
|
67 |
-
with gr.Row():
|
68 |
-
lang_dropdown = gr.Dropdown(
|
69 |
-
choices=langs,
|
70 |
-
value=[],
|
71 |
-
multiselect=True,
|
72 |
-
label="Select Languages 🕹️"
|
73 |
-
)
|
74 |
|
75 |
-
|
76 |
-
with gr.Column(scale=3):
|
77 |
-
parameter_slider = RangeSlider(
|
78 |
-
minimum=0,
|
79 |
-
maximum=max_parameter,
|
80 |
-
label="Select Parameters. Range -> 2^x - 2^y"
|
81 |
-
)
|
82 |
-
with gr.Column(scale=1):
|
83 |
-
range_ = gr.Markdown(value=text.format(min=0, max=math.pow(2, max_parameter)))
|
84 |
-
parameter_slider.change(lambda s: text.format(min=int(pow(2,s[0])), max=int(pow(2,s[1]))), parameter_slider, range_,
|
85 |
-
show_progress="hide", trigger_mode="always_last")
|
86 |
-
|
87 |
-
with gr.Row():
|
88 |
-
with gr.Column(scale=3):
|
89 |
-
context_slider = RangeSlider(
|
90 |
-
minimum=0,
|
91 |
-
maximum=max_context,
|
92 |
-
label="Select Context length range. Range -> 2^x k - 2^y k"
|
93 |
-
)
|
94 |
-
with gr.Column(scale=1):
|
95 |
-
context_range_ = gr.Markdown(value=text.format(min=0, max=math.pow(2, max_context)))
|
96 |
-
context_slider.change(lambda s: text.format(min=int(pow(2,s[0])), max=int(pow(2,s[1]))), context_slider, context_range_,
|
97 |
-
show_progress="hide", trigger_mode="always_last")
|
98 |
-
|
99 |
-
with gr.Row():
|
100 |
-
with gr.Column():
|
101 |
-
start_date = gr.DateTime(
|
102 |
-
value=min_date,
|
103 |
-
type="string",
|
104 |
-
label="Select start date"
|
105 |
-
)
|
106 |
|
107 |
-
|
108 |
-
end_date = gr.DateTime(
|
109 |
-
value=max_date,
|
110 |
-
type="string",
|
111 |
-
label="Select end date"
|
112 |
-
)
|
113 |
|
114 |
with gr.Row():
|
115 |
-
input_pricing_slider = RangeSlider(
|
116 |
-
minimum=0,
|
117 |
-
maximum=max_input_price,
|
118 |
-
value=(0, max_input_price),
|
119 |
-
label="Select Price range /1M input tokens"
|
120 |
-
)
|
121 |
-
|
122 |
-
output_pricing_slider = RangeSlider(
|
123 |
-
minimum=0,
|
124 |
-
maximum=max_output_price,
|
125 |
-
value=(0, max_output_price),
|
126 |
-
label="Select Price range /1M output tokens"
|
127 |
-
)
|
128 |
-
|
129 |
-
with gr.Row():
|
130 |
-
with gr.Column():
|
131 |
-
multimodal_checkbox = gr.CheckboxGroup(
|
132 |
-
choices=['Image', 'Multi-Image', 'Audio', 'Video'],
|
133 |
-
value=[],
|
134 |
-
label="Select additional Modalities",
|
135 |
-
)
|
136 |
|
|
|
|
|
|
|
|
|
137 |
with gr.Column():
|
138 |
-
open_weight_checkbox = gr.CheckboxGroup(
|
139 |
-
choices=['Open', 'Commercial'],
|
140 |
-
value=['Open', 'Commercial'],
|
141 |
-
label="Filter Open-weight model or commercial model",
|
142 |
-
)
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
with gr.Column():
|
145 |
-
license_checkbox = gr.CheckboxGroup(
|
146 |
-
choices=licenses,
|
147 |
-
value=licenses,
|
148 |
-
label="Filter based on the type of License",
|
149 |
-
)
|
150 |
|
|
|
|
|
|
|
151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
|
153 |
with gr.Row():
|
154 |
"""
|
@@ -298,3 +330,5 @@ model_name, input_price, output_price,
|
|
298 |
source, release_date
|
299 |
|
300 |
"""
|
|
|
|
|
|
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 |
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
+
##################################################
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
|
75 |
+
#####################################
|
76 |
+
# First Column
|
77 |
+
####################################
|
78 |
+
## Language Select
|
79 |
with gr.Column():
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
with gr.Row():
|
82 |
+
lang_dropdown = gr.Dropdown(
|
83 |
+
choices=langs,
|
84 |
+
value=[],
|
85 |
+
multiselect=True,
|
86 |
+
label="### Select Languages 🗣️"
|
87 |
+
)
|
88 |
+
|
89 |
+
with gr.Row():
|
90 |
+
|
91 |
+
with gr.Column():
|
92 |
+
start_date = gr.DateTime(
|
93 |
+
value=min_date,
|
94 |
+
type="string",
|
95 |
+
label="Release Date Range 📅 - Start Date"
|
96 |
+
)
|
97 |
+
|
98 |
+
with gr.Column():
|
99 |
+
end_date = gr.DateTime(
|
100 |
+
value=max_date,
|
101 |
+
type="string",
|
102 |
+
label="End Date"
|
103 |
+
)
|
104 |
+
|
105 |
+
# Multiodality Select
|
106 |
+
with gr.Row():
|
107 |
+
multimodal_checkbox = gr.CheckboxGroup(
|
108 |
+
choices=['Image', 'Multi-Image', 'Audio', 'Video'],
|
109 |
+
value=[],
|
110 |
+
label="Select Additional Modalities 📷🎧🎬",
|
111 |
+
)
|
112 |
+
|
113 |
+
# Open/Commercial Selection
|
114 |
+
with gr.Row():
|
115 |
+
open_weight_checkbox = gr.CheckboxGroup(
|
116 |
+
choices=['Open', 'Commercial'],
|
117 |
+
value=['Open', 'Commercial'],
|
118 |
+
label="Filter by Model Type 🔓 💼",
|
119 |
+
)
|
120 |
+
|
121 |
+
# License selection
|
122 |
+
with gr.Row():
|
123 |
+
license_checkbox = gr.CheckboxGroup(
|
124 |
+
choices=licenses,
|
125 |
+
value=licenses,
|
126 |
+
label="License Type 🛡️",
|
127 |
+
)
|
128 |
+
|
129 |
+
#############################################################
|
130 |
+
# Second Column
|
131 |
+
#############################################################
|
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 🔍 (in Billion, log2 scale)"
|
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 📏 (log2 scale)"
|
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():
|
168 |
+
input_pricing_slider = RangeSlider(
|
169 |
+
minimum=0,
|
170 |
+
maximum=max_input_price,
|
171 |
+
value=(0, max_input_price),
|
172 |
+
label="Select Price range /1M input tokens"
|
173 |
+
)
|
174 |
+
|
175 |
+
############### PRICE SLIDER 2 ###############
|
176 |
+
with gr.Row():
|
177 |
+
output_pricing_slider = RangeSlider(
|
178 |
+
minimum=0,
|
179 |
+
maximum=max_output_price,
|
180 |
+
value=(0, max_output_price),
|
181 |
+
label="Select Price range /1M output tokens"
|
182 |
+
)
|
183 |
+
|
184 |
|
185 |
with gr.Row():
|
186 |
"""
|
|
|
330 |
source, release_date
|
331 |
|
332 |
"""
|
333 |
+
|
334 |
+
|
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
|
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,8192,11.703,1.116,70.0,False
|
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,8192,6.663,0.705,8.0,False
|
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,131072,17.37,0.263,405.0,False
|
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,131072,12.943,0.27,70.0,False
|
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,131072,6.12,0.069,8.0,False
|
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,8192,21.81,2.609,40.0,False
|
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,8192,19.74,0.837,8.0,False
|
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,8192,25.71,4.591,76.0,False
|
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,8192,23.24,1.759,26.0,False
|
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,8192,23.24,1.759,26.0,False
|
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,8192,15.13,0.415,70.0,False
|
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,8192,4.23,0.359,141.0,False
|
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,8192,3.25,0.255,7.0,False
|
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,8192,2.67,0.094,7.0,False
|
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,8192,2.723,0.313,46.7,False
|
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,8192,5.7,0.097,7.0,False
|
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,8192,6.073,0.093,7.0,False
|
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,8192,7.88,0.106,7.0,False
|
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,131072,52.323,1.619,8.0,True
|
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,131072,69.57,1.577,200.0,True
|
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,131072,66.873,3.705,200.0,True
|
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,131072,47.23,2.217,1760.0,True
|
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,131072,42.537,26.268,1760.0,True
|
|
|
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,8192,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,8192,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,131072,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,131072,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,131072,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,8192,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,131072,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,131072,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,131072,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,131072,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,131072,42.537,26.268,1760.0,True,2024-05-24
|
src/process_data.py
CHANGED
@@ -203,6 +203,7 @@ df = df.rename(columns={
|
|
203 |
|
204 |
df['License'] = df.apply(lambda row: f'<a href="{row["License"]}" style="color: blue;">{row["License Name"]}</a>', axis=1)
|
205 |
df['Model Name'] = df.apply(lambda row: f'<a href="{row["Source"]}" style="color: blue;">{row["Model Name"]}</a>', axis=1)
|
|
|
206 |
print(df)
|
207 |
# Save to CSV
|
208 |
df.to_csv('src/main_df.csv', index=False)
|
|
|
203 |
|
204 |
df['License'] = df.apply(lambda row: f'<a href="{row["License"]}" style="color: blue;">{row["License Name"]}</a>', axis=1)
|
205 |
df['Model Name'] = df.apply(lambda row: f'<a href="{row["Source"]}" style="color: blue;">{row["Model Name"]}</a>', axis=1)
|
206 |
+
df['Temp Date'] = df['Release Date']
|
207 |
print(df)
|
208 |
# Save to CSV
|
209 |
df.to_csv('src/main_df.csv', index=False)
|
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
ADDED
Binary file (431 Bytes). View file
|
|
utils/filter_utils.py
CHANGED
@@ -22,38 +22,51 @@ def filter_cols(df):
|
|
22 |
def filter(df, language_list, parameters, input_price, output_price, multimodal,
|
23 |
context, open_weight, start, end, license ):
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
if
|
35 |
-
df = df[df['
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
-
|
|
|
47 |
|
48 |
# Convert 'Release Date' to int temporarily
|
49 |
-
|
|
|
50 |
|
51 |
# Convert start and end to int (seconds since epoch)
|
52 |
start = int(pd.to_datetime(start).timestamp())
|
53 |
end = int(pd.to_datetime(end).timestamp())
|
54 |
|
55 |
# Filter based on the converted 'Release Date'
|
56 |
-
|
|
|
57 |
|
58 |
df = filter_cols(df)
|
59 |
return df # Return the filtered dataframe
|
|
|
22 |
def filter(df, language_list, parameters, input_price, output_price, multimodal,
|
23 |
context, open_weight, start, end, license ):
|
24 |
|
25 |
+
if not df.empty: # Check if df is non-empty
|
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 |
+
df = df[(df['Parameter Size (B)'] >= pow(2, parameters[0])) & (df['Parameter Size (B)'] <= pow(2, parameters[1]))]
|
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])]
|
33 |
+
|
34 |
+
if not df.empty: # Check if df is non-empty
|
35 |
+
df = df[(df['Output $/1M'] >= output_price[0]) & (df['Output $/1M'] <= output_price[1])]
|
36 |
+
|
37 |
+
if not df.empty: # Check if df is non-empty
|
38 |
+
if "Image" in multimodal:
|
39 |
+
df = df[df['Multimodality Image'] == True]
|
40 |
+
if "Multi-Image" in multimodal:
|
41 |
+
df = df[df['Multimodality Multiple Image'] == True]
|
42 |
+
if "Audio" in multimodal:
|
43 |
+
df = df[df['Multimodality Audio'] == True]
|
44 |
+
if "Video" in 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'] >= (2**context[0])*1024) & (df['Context Size'] <= (2**context[1])*1024)]
|
49 |
+
|
50 |
+
if not df.empty: # Check if df is non-empty
|
51 |
+
if "Open" in open_weight and "Commercial" not in open_weight:
|
52 |
+
df = df[df['Open Weight'] == True]
|
53 |
+
elif "Commercial" in open_weight and "Open" not in open_weight:
|
54 |
+
df = df[df['Open Weight'] == False]
|
55 |
|
56 |
+
if not df.empty: # Check if df is non-empty
|
57 |
+
df = df[df['License Name'].apply(lambda x: any(lic in x for lic in license))]
|
58 |
|
59 |
# Convert 'Release Date' to int temporarily
|
60 |
+
if not df.empty: # Check if df is non-empty
|
61 |
+
df['Temp Date'] = pd.to_datetime(df['Temp Date']).astype(int) // 10**9 # Convert to seconds since epoch
|
62 |
|
63 |
# Convert start and end to int (seconds since epoch)
|
64 |
start = int(pd.to_datetime(start).timestamp())
|
65 |
end = int(pd.to_datetime(end).timestamp())
|
66 |
|
67 |
# Filter based on the converted 'Release Date'
|
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 = filter_cols(df)
|
72 |
return df # Return the filtered dataframe
|
utils/text_utils.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
return gr.Markdown(f"### Selected Context Range : {min_context}k - {max_context}k")
|
9 |
+
|
10 |
+
|
11 |
+
def parameter_markdown(parameters):
|
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 |
+
|