sasha HF staff commited on
Commit
42411ac
1 Parent(s): 7a5ff17

adding data and initial plots

Browse files
app.py CHANGED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+ import os
4
+ import plotly.express as px
5
+ import numpy as np
6
+
7
+ datadir = 'data/emissions/complete'
8
+
9
+ model_param_df = pd.read_csv('data/model_parameters.csv', header=0)
10
+ model_performance_df = pd.read_csv('data/performance.csv', header=0)
11
+ emissions_df = pd.read_csv('data/co2_data.csv',header=0)
12
+ modalities_df = pd.read_csv('data/modalities_data.csv',header=0)
13
+ finetuned_df = emissions_df[~emissions_df['task'].str.contains('zero')]
14
+
15
+ fig0 = px.scatter(finetuned_df, x="dataset", y="query emissions (g)", color="model", log_y=True)
16
+ fig0.update_layout(xaxis={'categoryorder':'mean ascending'})
17
+ fig0.update_layout(yaxis_title='Total carbon emitted (g)')
18
+ fig0.update_layout(xaxis_title='Dataset')
19
+
20
+
21
+ fig1 = px.box(finetuned_df, x="task", y="query_energy (kWh)", color="task", log_y=True)
22
+ fig1.update_layout(xaxis={'categoryorder':'mean ascending'})
23
+ fig1.update_layout(yaxis_title='Total energy used (Wh)')
24
+ fig1.update_layout(xaxis_title='Task')
25
+
26
+ fig2 = px.scatter(modalities_df, x="num_params", y="query emissions (g)", color="modality",
27
+ log_x=True, log_y=True, custom_data=['model','task'])
28
+
29
+ fig2.update_traces(
30
+ hovertemplate="<br>".join([
31
+ "Model: %{customdata[0]}",
32
+ "Task: %{customdata[1]}",
33
+ ])
34
+ )
35
+ fig2.update_layout(xaxis_title='Model size (number of parameters)')
36
+ fig2.update_layout(yaxis_title='Model emissions (g of CO<sub>2</sub>)')
37
+
38
+
39
+ demo = gr.Blocks()
40
+
41
+ with demo:
42
+ gr.Markdown("# CO2 Inference Demo")
43
+ gr.Markdown("## Explore the plots below to get more insights about the different models and tasks from our study.")
44
+ with gr.Row():
45
+ with gr.Column():
46
+ gr.Plot(fig0)
47
+ with gr.Row():
48
+ with gr.Column():
49
+ gr.Plot(fig1)
50
+ with gr.Row():
51
+ with gr.Column():
52
+ gr.Plot(fig2)
53
+
54
+
55
+
56
+
57
+
58
+
59
+ demo.launch()
data/co2_data.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/cnn.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/cnn_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/imdb.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/imdb_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/rotten_tomatoes.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/rotten_tomatoes_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/samsum.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/samsum_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/sciq.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/sciq_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/squad.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/squad2.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/squad2_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/squad_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/sst2.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/sst2_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/xsum.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/lengths/complete/xsum_flan.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/modalities_data.csv ADDED
The diff for this file is too large to render. See raw diff
 
data/model_parameters.csv ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model_name,num_parameters
2
+ ainize/kobart-news,123859968
3
+ albert-base-v2,11683584
4
+ alvaroalon2/biobert_diseases_ner,108310272
5
+ Babelscape/wikineural-multilingual-ner,177853440
6
+ bert-base-cased,108310272
7
+ bert-base-uncased,109482240
8
+ bert-large-uncased-whole-word-masking-finetuned-squad,335141888
9
+ bigscience/bloomz-560m,559214592
10
+ bigscience/bloom-560m,559214592
11
+ cardiffnlp/twitter-roberta-base-irony,124645632
12
+ cardiffnlp/twitter-roberta-base-sentiment-latest,124645632
13
+ deepset/bert-large-uncased-whole-word-masking-squad2,335141888
14
+ deepset/electra-base-squad2,108891648
15
+ deepset/roberta-base-squad2,124645632
16
+ deepset/tinyroberta-squad2,82118400
17
+ distilbert-base-cased-distilled-squad,65190912
18
+ distilbert-base-multilingual-cased,134734080
19
+ distilbert-base-uncased,66362880
20
+ distilbert-base-uncased-distilled-squad,66362880
21
+ distilgpt2,81912576
22
+ dslim/bert-base-NER,108310272
23
+ dslim/bert-large-NER,333579264
24
+ EleutherAI/gpt-neo-125m,125198592
25
+ facebook/bart-large-cnn,406290432
26
+ facebook/convnextv2-tiny-1k-224,27866496
27
+ facebook/convnextv2-tiny-22k-384,27866496
28
+ facebook/detr-resnet-101,60308416
29
+ facebook/detr-resnet-50,41368512
30
+ facebook/opt-1.3b,1315758080
31
+ facebook/opt-6.7b,6658473984
32
+ google/mobilenet_v1_0.75_192,1816560
33
+ google/pegasus-xsum,569748480
34
+ google/vit-base-patch16-224,86389248
35
+ google/vit-base-patch16-384,86681088
36
+ gpt2,124439808
37
+ gpt2-medium,354823168
38
+ gpt2-xl,1557611200
39
+ hustvl/yolos-small,30204288
40
+ hustvl/yolos-tiny,6359040
41
+ j-hartmann/emotion-english-distilroberta-base,82118400
42
+ Jean-Baptiste/roberta-large-ner-english,355359744
43
+ joeddav/xlm-roberta-large-xnli,559890432
44
+ jozhang97/deta-swin-large,217683380
45
+ martin-ha/toxic-comment-model,66362880
46
+ microsoft/beit-base-patch16-224-pt22k-ft22k,85761984
47
+ microsoft/deberta-base,138601728
48
+ microsoft/git-base,153147648
49
+ microsoft/git-large-coco,370724608
50
+ microsoft/resnet-18,11176512
51
+ microsoft/resnet-50,23508032
52
+ MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli,183831552
53
+ nlpconnect/vit-gpt2-image-captioning,239195904
54
+ nlptown/bert-base-multilingual-uncased-sentiment,167356416
55
+ obi/deid_roberta_i2b2,355359744
56
+ oliverguhr/fullstop-punctuation-multilang-large,559890432
57
+ philschmid/bart-large-cnn-samsum,406290432
58
+ polejowska/detr-r50-cd45rb-1ah-6l,41368512
59
+ polejowska/detr-r50-cd45rb-8ah-6l-gelu-corrected,41368512
60
+ QCRI/bert-base-multilingual-cased-pos-english,177853440
61
+ Rakib/roberta-base-on-cuad,124645632
62
+ roberta-base,124645632
63
+ Salesforce/blip-image-captioning-base,224726017
64
+ Salesforce/blip-image-captioning-large,447175937
65
+ Salesforce/blip2-flan-t5-xl,3942446592
66
+ Salesforce/blip2-opt-2.7b,3744679936
67
+ SamLowe/roberta-base-go_emotions,124645632
68
+ SenseTime/deformable-detr,39913666
69
+ sshleifer/distilbart-cnn-12-6,305510400
70
+ t5-base,222903552
71
+ t5-large,737668096
72
+ t5-small,60506624
73
+ xlm-roberta-base,278043648
74
+ bhadresh-savani/distilbert-base-uncased-emotion,66362880
75
+ bert-base-multilingual-cased,177853440
76
+ ydshieh/vit-gpt2-coco-en,124439808
77
+ ml6team/keyphrase-extraction-distilbert-inspec,66365187
78
+ runwayml/stable-diffusion-v1-5,1370216895
79
+ stabilityai/stable-diffusion-2-1,1289952427
80
+ stabilityai/stable-diffusion-xl-base-1.0,3468837867
81
+ SG161222/Realistic_Vision_V1.4,1370216895
82
+ CompVis/stable-diffusion-v1-4,1370216895
83
+ stabilityai/stable-diffusion-2-1-base,1289952427
84
+ prompthero/openjourney,1370216895
85
+ dreamlike-art/dreamlike-photoreal-2.0,1066235307
86
+ warp-ai/wuerstchen,1426756238
87
+ gpt2,124439808
88
+ facebook/opt-1.3b,1315758080
89
+ meta-llama/Llama-2-7b-hf,6607343616
90
+ google/flan-t5-xxl,11003736064
91
+ google/flan-t5-xl,2783959040
92
+ google/flan-t5-large,750251008
93
+ google/flan-t5-base,222903552
94
+ sshleifer/distilbart-xsum-12-6,229933056
95
+ sshleifer/distilbart-cnn-12-6,305510400
96
+ pszemraj/led-large-book-summary,459801600
97
+ google/pegasus-xsum,569748480
98
+ google/pegasus-large,570797056
99
+ google/bigbird-pegasus-large-arxiv,576891904
100
+ facebook/bart-large-cnn,406290432
101
+ ainize/bart-base-cnn,139420416
102
+ lvwerra/distilbert-imdb,66362880
103
+ sbcBI/sentiment_analysis_model,66362880
104
+ distilbert-base-uncased-finetuned-sst-2-english,66362880
105
+ cardiffnlp/twitter-xlm-roberta-base-sentiment,278043648
106
+ finiteautomata/bertweet-base-sentiment-analysis,134899968
107
+ siebert/sentiment-roberta-large-english,355359744
108
+ timpal0l/mdeberta-v3-base-squad2,278218752
109
+ google/pegasus-multi_news,570797056
110
+ elastic/distilbert-base-cased-finetuned-conll03-english,65190912
111
+ dmargutierrez/distilbert-base-multilingual-cased-mapa_coarse-ner,134734080
112
+ xlm-roberta-large-finetuned-conll03-english,559890432
113
+ nota-ai/bk-sdm-tiny,834080895
114
+ segmind/tiny-sd,530099307
115
+ bigscience/bloomz-1b7,1720000000
116
+ bigscience/bloomz-7b1,7000000000
117
+ bigscience/bloomz-3b,3000000000
data/performance.csv ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model,task,type,sst2 (acc),imdb (acc),tomatoes (acc),sciq (acc),squad (f1),"squad_v2 (f1, has answer)",samsum (rouge),xsum (rouge),cnn (rouge)
2
+ bigscience/bloomz-560m,sentiment,decoder,0.9243,0.9409,0.848,,,,,,
3
+ bigscience/bloomz-560m,summarization,decoder,,,,,,,0.2253,0.1463,0.1017
4
+ bigscience/bloomz-560m,qa,decoder,,,,0.9180,0.4269,0.209,,,
5
+ bigscience/bloomz-1b7,sentiment,decoder,0.9438,0.9724,0.9296,,,,,,
6
+ bigscience/bloomz-1b7,summarization,decoder,,,,,,,0.257,0.1553,0.1803
7
+ bigscience/bloomz-1b7,qa,decoder,,,,0.9590,0.5033,0.248,,,
8
+ bigscience/bloomz-3b,sentiment,decoder,0.9472,0.9778,0.9493,,,,,,
9
+ bigscience/bloomz-3b,summarization,decoder,,,,,,,0.2792,0.1722,0.211
10
+ bigscience/bloomz-3b,qa,decoder,,,,0.9670,0.5341,0.2639,,,
11
+ bigscience/bloomz-7b1,sentiment,decoder,0.9438,0.9786,0.9465,,,,,,
12
+ bigscience/bloomz-7b1,summarization,decoder,,,,,,,0.3183,0.2145,0.0941
13
+ bigscience/bloomz-7b1,qa,decoder,,,,0.966,0.5388,0.2667,,,
14
+ google/flan-t5-xxl,sentiment,seq2seq,0.9553,0.9691,0.9193,,,,,,
15
+ google/flan-t5-xxl,qa,seq2seq,,,,0.7210,0.9754,0.4886,,,
16
+ google/flan-t5-xxl,summarization,seq2seq,,,,,,,0.30332,0.37269,0.2281
17
+ google/flan-t5-xl,sentiment,seq2seq,0.9564,0.9663,0.9259,,,,,,
18
+ google/flan-t5-xl,qa,seq2seq,,,,0.6550,0.968,0.4867,,,
19
+ google/flan-t5-xl,summarization,seq2seq,,,,,,,0.4919,0.3844,0.2371
20
+ google/flan-t5-large,sentiment,seq2seq,0.9438,0.9634,0.9174,,,,,,
21
+ google/flan-t5-large,qa,seq2seq,,,,0.5340,0.9683,0.5019,,,
22
+ google/flan-t5-large,summarization,seq2seq,,,,,,,0.4539,0.3047,0.2408
23
+ google/flan-t5-base,sentiment,seq2seq,0.9289,0.9466,0.8846,,,,,,
24
+ google/flan-t5-base,qa,seq2seq,,,,0.6100,0.9487,0.477,,,
25
+ google/flan-t5-base,summarization,seq2seq,,,,,,,0.4569,0.322,0.2336
26
+ distilbert-base-uncased-distilled-squad,qa,encoder-finetuned,,,,0.4434,0.8655,0.8621,,,
27
+ distilbert-base-cased-distilled-squad,qa,encoder-finetuned,,,,0.4615,0.8699,0.8694,,,
28
+ deepset/roberta-base-squad2,qa,encoder-finetuned,,,,0.4785,0.9315,0.8295,,,
29
+ bert-large-uncased-whole-word-masking-finetuned-squad,qa,encoder-finetuned,,,,0.4774,0.9300,0.8388,,,
30
+ timpal0l/mdeberta-v3-base-squad2,qa,encoder-finetuned,,,,0.4604,0.9059,0.9037,,,
31
+ deepset/tinyroberta-squad2,qa,encoder-finetuned,,,,0.4536,0.9793,0.9056,,,
32
+ deepset/electra-base-squad2,qa,encoder-finetuned,,,,0.4830,0.8882,0.8171,,,
33
+ deepset/bert-large-uncased-whole-word-masking-squad2,qa,encoder-finetuned,,,,0.4638,0.9250,0.9240,,,
34
+ sshleifer/distilbart-xsum-12-6,summarization,seq2seq-finetuned,,,,,,,0.203249,0.452877,0.230331
35
+ sshleifer/distilbart-cnn-12-6,summarization,seq2seq-finetuned,,,,,,,0.291424,0.210314,0.44241
36
+ pszemraj/led-large-book-summary,summarization,seq2seq-finetuned,,,,,,,0.334514,0.162446,0.328774
37
+ google/pegasus-xsum,summarization,seq2seq-finetuned,,,,,,,0.219676,0.218096,0.222062
38
+ google/pegasus-large,summarization,seq2seq-finetuned,,,,,,,0.270341,0.174476,0.342469
39
+ google/pegasus-multi_news,summarization,seq2seq-finetuned,,,,,,,0.11537,0.16396,0.290169
40
+ facebook/bart-large-cnn,summarization,seq2seq-finetuned,,,,,,,0.315257,0.207919,0.440558
41
+ ainize/bart-base-cnn,summarization,seq2seq-finetuned,,,,,,,0.270195,0.15911,0.259687
42
+ distilbert-base-uncased-finetuned-sst-2-english,sentiment,encoder-finetuned,0.9885521686,0.88412,0.8968105066,,,,,,
43
+ nlptown/bert-base-multilingual-uncased-sentiment,sentiment,encoder-finetuned,0.752293578,0.84824,0.7307692308,,,,,,
44
+ twitter-roberta-base-sentiment-latest,sentiment,encoder-finetuned,0.8199541284,0.7952,0.7664165103,,,,,,
45
+ cardiffnlp/twitter-xlm-roberta-base-sentiment,sentiment,encoder-finetuned,0.7912844037,0.70856,0.7420262664,,,,,,
46
+ lvwerra/distilbert-imdb,sentiment,encoder-finetuned,0.878440367,0.928,0.8151969981,,,,,,
47
+ siebert/sentiment-roberta-large-english,sentiment,encoder-finetuned,0.9243119266,0.91616,0.9202626642,,,,,,
48
+ finiteautomata/bertweet-base-sentiment-analysis,sentiment,encoder-finetuned,0.8188073394,0.72068,0.7739212008,,,,,,
49
+ sbcBI/sentiment_analysis_model,sentiment,encoder-finetuned,0.8061926606,0.74636,0.7636022514,,,,,,