Spaces:
Runtime error
Runtime error
sashavor
commited on
Commit
Β·
c0f2fe1
1
Parent(s):
1f6c998
fixing PUE
Browse files
app.py
CHANGED
@@ -116,9 +116,9 @@ st.markdown('### Experimental Emissions π©βπ¬')
|
|
116 |
st.markdown('##### These are the emissions produced by generating the electricity necessary for powering the experiments and tests needed to pick your final model architecture '
|
117 |
'and parameters.')
|
118 |
with st.expander("Calculate the experimental emissions of your model"):
|
119 |
-
st.info('Consult your training logs to figure out how many ablations, baselines and experiments were run before converging on the final model.')
|
120 |
-
experimentation_time = st.number_input(label='Number of hours of experimentation
|
121 |
-
st.
|
122 |
' found that experimentation roughly doubles the amount of compute used by training the model itself.')
|
123 |
experimental_emissions = round(gpu_tdp * (experimentation_time) * carbon_intensity/1000000)
|
124 |
st.metric(label="Experimental emissions", value=str(experimental_emissions)+' kilograms of CO2eq')
|
@@ -126,10 +126,11 @@ with st.expander("Calculate the experimental emissions of your model"):
|
|
126 |
st.markdown('### Datacenter (Overhead) Emissions π')
|
127 |
st.markdown('##### These are the emissions produced by generating the electricity needed to power the rest of the infrastructure'
|
128 |
'used for model training -- the datacenter, network, heating/cooling, storage, etc.')
|
129 |
-
with st.expander("Calculate the
|
130 |
st.info('A proxy often used to reflect idle emissions is PUE (Power Usage Effectiveness), which represents '
|
131 |
' the ratio of energy used for computing overheads like cooling, which varies depending on the data center.')
|
132 |
pue = instances['PUE'][(instances['provider'] == provider.lower()) & (instances['region'] == region)].tolist()[0]
|
|
|
133 |
if math.isnan(pue) == True:
|
134 |
if provider != 'Local/Private Infastructure':
|
135 |
st.markdown('##### The exact information isn\'t available for this datacenter! We will use your provider\'s average instead, which is:')
|
@@ -153,10 +154,9 @@ with st.expander("Calculate the idle emissions of your model"):
|
|
153 |
st.markdown('##### Try to find the PUE of your local infrastructure. Otherwise, you can use the industry average, 1.58:')
|
154 |
pue = st.slider('Total number of GPU hours', value = 1.58)
|
155 |
else:
|
156 |
-
st.markdown('##### The PUE of the datacenter you used is: ')
|
157 |
-
st.markdown('#### '+ str(pue))
|
158 |
pue_emissions = round((experimental_emissions+ dynamic_emissions)*pue)
|
159 |
-
st.metric(label="
|
160 |
|
161 |
st.markdown('### Embodied Emissions π₯οΈπ¨')
|
162 |
st.markdown('##### These are the emissions associated with the materials and processes involved in producing'
|
|
|
116 |
st.markdown('##### These are the emissions produced by generating the electricity necessary for powering the experiments and tests needed to pick your final model architecture '
|
117 |
'and parameters.')
|
118 |
with st.expander("Calculate the experimental emissions of your model"):
|
119 |
+
#st.info('Consult your training logs to figure out how many ablations, baselines and experiments were run before converging on the final model.')
|
120 |
+
experimentation_time = st.number_input(label='Number of hours of experimentation (including ablations, baselines and evaluation)', value=training_time)
|
121 |
+
st.info('As a baseline, language models such as [OPT](https://arxiv.org/pdf/2205.01068.pdf) and [BLOOM](https://arxiv.org/abs/2211.02001)'
|
122 |
' found that experimentation roughly doubles the amount of compute used by training the model itself.')
|
123 |
experimental_emissions = round(gpu_tdp * (experimentation_time) * carbon_intensity/1000000)
|
124 |
st.metric(label="Experimental emissions", value=str(experimental_emissions)+' kilograms of CO2eq')
|
|
|
126 |
st.markdown('### Datacenter (Overhead) Emissions π')
|
127 |
st.markdown('##### These are the emissions produced by generating the electricity needed to power the rest of the infrastructure'
|
128 |
'used for model training -- the datacenter, network, heating/cooling, storage, etc.')
|
129 |
+
with st.expander("Calculate the datacenter emissions of your model"):
|
130 |
st.info('A proxy often used to reflect idle emissions is PUE (Power Usage Effectiveness), which represents '
|
131 |
' the ratio of energy used for computing overheads like cooling, which varies depending on the data center.')
|
132 |
pue = instances['PUE'][(instances['provider'] == provider.lower()) & (instances['region'] == region)].tolist()[0]
|
133 |
+
source = instances['PUE source'][(instances['provider'] == provider.lower()) & (instances['region'] == region)].tolist()[0]
|
134 |
if math.isnan(pue) == True:
|
135 |
if provider != 'Local/Private Infastructure':
|
136 |
st.markdown('##### The exact information isn\'t available for this datacenter! We will use your provider\'s average instead, which is:')
|
|
|
154 |
st.markdown('##### Try to find the PUE of your local infrastructure. Otherwise, you can use the industry average, 1.58:')
|
155 |
pue = st.slider('Total number of GPU hours', value = 1.58)
|
156 |
else:
|
157 |
+
st.markdown('##### The PUE of the datacenter you used is: '+ str(pue) + ' [(source)]('+source+')')
|
|
|
158 |
pue_emissions = round((experimental_emissions+ dynamic_emissions)*pue)
|
159 |
+
st.metric(label="Dynamic and experimental emissions, considering PUE", value=str(pue_emissions)+' kilograms of CO2eq')
|
160 |
|
161 |
st.markdown('### Embodied Emissions π₯οΈπ¨')
|
162 |
st.markdown('##### These are the emissions associated with the materials and processes involved in producing'
|