Commit
·
b305e6a
1
Parent(s):
ea45772
docs: update contents
Browse files- app.py +0 -3
- src/content.py +47 -53
- src/style.css +1 -1
app.py
CHANGED
|
@@ -6,7 +6,6 @@ from src.content import (
|
|
| 6 |
CITATION_LABEL,
|
| 7 |
CITATION_TEXT,
|
| 8 |
LICENCE_TEXT,
|
| 9 |
-
INTRO_TEXT,
|
| 10 |
METHODOLOGY_TEXT,
|
| 11 |
SUPPORT_TEXT,
|
| 12 |
)
|
|
@@ -22,8 +21,6 @@ with open("src/style.css") as css:
|
|
| 22 |
|
| 23 |
st.html(HERO_TEXT)
|
| 24 |
|
| 25 |
-
st.success(INTRO_TEXT, icon="🌱")
|
| 26 |
-
|
| 27 |
tab_calculator, tab_expert, tab_token, tab_method, tab_about, tab_support = st.tabs(
|
| 28 |
[
|
| 29 |
"🧮 Calculator",
|
|
|
|
| 6 |
CITATION_LABEL,
|
| 7 |
CITATION_TEXT,
|
| 8 |
LICENCE_TEXT,
|
|
|
|
| 9 |
METHODOLOGY_TEXT,
|
| 10 |
SUPPORT_TEXT,
|
| 11 |
)
|
|
|
|
| 21 |
|
| 22 |
st.html(HERO_TEXT)
|
| 23 |
|
|
|
|
|
|
|
| 24 |
tab_calculator, tab_expert, tab_token, tab_method, tab_about, tab_support = st.tabs(
|
| 25 |
[
|
| 26 |
"🧮 Calculator",
|
src/content.py
CHANGED
|
@@ -1,26 +1,20 @@
|
|
| 1 |
HERO_TEXT = """
|
| 2 |
-
<div align="center">
|
| 3 |
<a href="https://ecologits.ai/">
|
| 4 |
<img style="max-height: 200px" alt="EcoLogits" src="https://raw.githubusercontent.com/genai-impact/ecologits/main/docs/assets/logo_calculator.png">
|
| 5 |
</a>
|
| 6 |
</div>
|
| 7 |
<div align="center">
|
| 8 |
<p style="max-width: 850px; text-align: left">
|
| 9 |
-
<b>EcoLogits</b> is
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
This Calculator allows a broader access to <b>EcoLogits</b> estimates through a visual application.</i>
|
| 13 |
-
|
| 14 |
</p>
|
| 15 |
|
| 16 |
</div>
|
| 17 |
<br>
|
| 18 |
"""
|
| 19 |
|
| 20 |
-
INTRO_TEXT = """
|
| 21 |
-
EcoLogits Calculator is developed and maintained by [GenAI Impact](https://genai-impact.org/) non-profit. To learn more about EcoLogits documentation visit [ecologits.ai](https://ecologits.ai).
|
| 22 |
-
"""
|
| 23 |
-
|
| 24 |
HOW_TO_TEXT = """
|
| 25 |
Chose a provider, a model and an example of usage (prompts).
|
| 26 |
|
|
@@ -74,7 +68,7 @@ When you're writing or interacting with an LLM, being aware of token count can h
|
|
| 74 |
"""
|
| 75 |
|
| 76 |
ABOUT_TEXT = r"""
|
| 77 |
-
|
| 78 |
|
| 79 |
**The main goal of the EcoLogits Calculator is to raise awareness on the environmental impacts of LLM inference.**
|
| 80 |
|
|
@@ -83,7 +77,7 @@ The rapid evolution of generative AI is reshaping numerous industries and aspect
|
|
| 83 |
At **[GenAI Impact](https://genai-impact.org/) we are dedicated to understanding and mitigating the environmental impacts of generative AI** through rigorous research, innovative tools, and community engagement. Especially, in early 2024 we have launched an new open-source tool called [EcoLogits](https://github.com/genai-impact/ecologits) that tracks the energy consumption and environmental footprint of using generative AI models through APIs.
|
| 84 |
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
**How we assess the impacts of closed-source models?**
|
| 89 |
|
|
@@ -115,88 +109,84 @@ To see the full list of **generative AI providers** currently supported by EcoLo
|
|
| 115 |
EcoLogits is focused on estimating the environmental impacts of generative AI (only LLMs for now) used **through API providers (such as OpenAI, Anthropic, Cloud APIs...)** whereas CodeCarbon is more general tool to measure energy consumption and estimate GHG emissions measurement. If you deploy LLMs locally we encourage you to use CodeCarbon to get real numbers of your energy consumption.
|
| 116 |
|
| 117 |
|
| 118 |
-
|
| 119 |
|
| 120 |
We are eager to get feedback from the community, don't hesitate to engage the discussion with us on this [GitHub thread](https://github.com/genai-impact/ecologits/discussions/45) or message us on [LinkedIn](https://www.linkedin.com/company/genai-impact/).
|
| 121 |
|
| 122 |
We also welcome any open-source contributions on 🌱 **[EcoLogits](https://github.com/genai-impact/ecologits)** or on 🧮 **EcoLogits Calculator**.
|
| 123 |
|
| 124 |
|
| 125 |
-
|
| 126 |
|
| 127 |
<p xmlns:cc="http://creativecommons.org/ns#" >
|
| 128 |
This work is licensed under
|
| 129 |
<a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">
|
| 130 |
CC BY-SA 4.0
|
| 131 |
</a>
|
| 132 |
-
<br>
|
| 133 |
-
<br>
|
| 134 |
-
<img style="display:inline-block;height:5px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1" height="30" width="30" alt="">
|
| 135 |
-
<img style="display:inline-block;height:5px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/by.svg?ref=chooser-v1" height="30" width="30" alt="">
|
| 136 |
-
<img style="display:inline-block;height:5px!important;margin-left:3px;vertical-align:text-bottom;" src="https://mirrors.creativecommons.org/presskit/icons/sa.svg?ref=chooser-v1" height="30" width="30" alt="">
|
| 137 |
</p>
|
| 138 |
|
| 139 |
-
|
| 140 |
|
| 141 |
We thank [Data For Good](https://dataforgood.fr/) and [Boavizta](https://boavizta.org/en) for supporting the development of this project. Their contributions of tools, best practices, and expertise in environmental impact assessment have been invaluable.
|
| 142 |
|
| 143 |
-
We also extend our gratitude to the open-source contributions of 🤗 [Hugging Face](huggingface.com) on the LLM-Perf Leaderboard.
|
| 144 |
|
| 145 |
-
|
| 146 |
-
## 🤝 Contact
|
| 147 |
|
| 148 |
For general question on the project, please use the [GitHub thread](https://github.com/genai-impact/ecologits/discussions/45).
|
| 149 |
Otherwise use our contact form on [genai-impact.org/contact](https://genai-impact.org/contact/).
|
| 150 |
"""
|
| 151 |
|
| 152 |
SUPPORT_TEXT = r"""
|
| 153 |
-
|
| 154 |
|
| 155 |
At GenAI Impact, our projects are powered by the passion and dedication of our team.
|
| 156 |
-
Since its first release in June 2024, this calculator has been **
|
| 157 |
-
We aim to keep this tool available as a free and open-source
|
|
|
|
|
|
|
| 158 |
|
| 159 |
-
|
| 160 |
-
3 easy ways to help this project :
|
| 161 |
- Give a ❤️ like to this space
|
| 162 |
-
- Give a ⭐ to the EcoLogits
|
| 163 |
- Follow us on [LinkedIn](https://fr.linkedin.com/company/genai-impact)
|
| 164 |
|
| 165 |
-
|
|
|
|
| 166 |
Share your feedback, ask questions, help other members of the community !
|
| 167 |
|
| 168 |
-
Engage the discussion with us
|
| 169 |
- Start a new discussion on this space or on this
|
| 170 |
[GitHub thread](https://github.com/genai-impact/ecologits/discussions/45)
|
| 171 |
- Use the contact form on [GenAI Impact website](https://genai-impact.org/contact/)
|
| 172 |
- message us on [LinkedIn](https://www.linkedin.com/company/genai-impact/).
|
| 173 |
|
| 174 |
-
|
|
|
|
|
|
|
| 175 |
|
| 176 |
-
##### As an individual
|
| 177 |
We welcome any open source contribution ! You can :
|
| 178 |
- Contribute on **[EcoLogits](https://github.com/genai-impact/ecologits)** or on
|
| 179 |
**EcoLogits Calculator**.
|
| 180 |
- Become a an active member of [GenAI Impact ](https://genai-impact.org/contact/) non profit. Get involved in our broader mission !
|
| 181 |
|
| 182 |
|
| 183 |
-
|
|
|
|
| 184 |
If EcoLogits Calculator brings value to your organization, customers or communities you can help finance this project.
|
| 185 |
- Become a **sponsor**
|
| 186 |
- Become a **benefactor member** if you are a public sector or non-profit organization or a university.
|
| 187 |
|
| 188 |
-
Contact us on [GenAI Impact
|
| 189 |
-
|
| 190 |
"""
|
| 191 |
|
| 192 |
METHODOLOGY_TEXT = r"""
|
| 193 |
-
|
| 194 |
|
| 195 |
We have developed a methodology to **estimate the energy consumption and environmental impacts for an LLM inference** based on request parameters and hypotheses on the data center location, the hardware used, the model architecture and more.
|
| 196 |
|
| 197 |
In this section we will only cover the principles of the methodology related to the 🧮 **EcoLogits Calculator**. If you wish to learn more on the environmental impacts modeling of an LLM request checkout the 🌱 [EcoLogits documentation page](https://ecologits.ai/methodology/).
|
| 198 |
|
| 199 |
-
|
| 200 |
|
| 201 |
The environmental impacts of an LLM inference are split into the **usage impacts** $I_{request}^u$ to account for electricity consumption and the **embodied impacts** $I_{request}^e$ that relates to resource extraction, hardware manufacturing and transportation. In general terms it can be expressed as follow:
|
| 202 |
|
|
@@ -216,8 +206,10 @@ Additionally, to ⚡️ **direct energy consumption** the environmental impacts
|
|
| 216 |
* 🌍 **Global Warming Potential** (GWP): Potential impact on global warming in kgCO2eq (commonly known as GHG/carbon emissions).
|
| 217 |
* 🪨 **Abiotic Depletion Potential for Elements** (ADPe): Impact on the depletion of non-living resources such as minerals or metals in kgSbeq.
|
| 218 |
* ⛽️ **Primary Energy** (PE): Total energy consumed from primary sources in MJ.
|
|
|
|
|
|
|
|
|
|
| 219 |
|
| 220 |
-
### Principles, Data and Hypotheses
|
| 221 |
We use a **bottom-up methodology** to model impacts, meaning that we will estimate the impacts of low-level physical components to then estimate the impacts at software level (in that case an LLM inference). We also rely on **Life Cycle Approach (LCA) proxies and approach** to model both usage and embodied phases with multi-criteria impacts. If you are interested in this approach we recommend you to read the following [Boavizta](https://boavizta.org/) resources.
|
| 222 |
|
| 223 |
* [Digital & environment: How to evaluate server manufacturing footprint, beyond greenhouse gas emissions?](https://boavizta.org/en/blog/empreinte-de-la-fabrication-d-un-serveur)
|
|
@@ -225,26 +217,27 @@ We use a **bottom-up methodology** to model impacts, meaning that we will estima
|
|
| 225 |
* [Boavizta API documentation](https://doc.api.boavizta.org/)
|
| 226 |
|
| 227 |
We leverage **open data to estimate the environmental impacts**, here is an exhaustive list of our data providers.
|
| 228 |
-
|
|
|
|
| 229 |
* [Boavizta API](https://github.com/Boavizta/boaviztapi) to estimate server embodied impacts and base energy consumption.
|
| 230 |
-
* [ADEME Base Empreinte®](https://base-empreinte.ademe.fr/) for electricity mix impacts per country.
|
| 231 |
|
| 232 |
Finally here are the **main hypotheses** we have made to compute the impacts.
|
| 233 |
|
| 234 |
* ⚠️ **We *"guesstimate"* the model architecture of proprietary LLMs when not disclosed by the provider.**
|
| 235 |
-
* Production setup: quantized models running on data center grade servers and GPUs such as
|
| 236 |
-
* Electricity
|
| 237 |
* Ignore the following impacts: unused cloud resources, data center building, network and end-user devices... (for now)
|
| 238 |
|
| 239 |
-
|
| 240 |
|
| 241 |
We have integrated impact equivalents to help people better understand the impacts and have reference points for standard use cases and everyday activities.
|
| 242 |
|
| 243 |
-
|
| 244 |
|
| 245 |
These equivalents are computed based on the request impacts only.
|
| 246 |
|
| 247 |
-
|
| 248 |
|
| 249 |
We compare the ⚡️ direct energy consumption with the energy consumption of someone 🚶♂️➡️ walking or 🏃♂️➡️ running. From [runningtools.com](https://www.runningtools.com/energyusage.htm) we consider the following energy values per physical activity (for someone weighing 70kg):
|
| 250 |
|
|
@@ -253,18 +246,19 @@ We compare the ⚡️ direct energy consumption with the energy consumption of s
|
|
| 253 |
|
| 254 |
We divide the request energy consumption by these values to compute the distance traveled.
|
| 255 |
|
| 256 |
-
|
|
|
|
| 257 |
We compare the ⚡️ direct energy consumption with the energy consumer by a EV car. From [selectra.info](https://selectra.info/energie/actualites/insolite/consommation-vehicules-electriques-france-2040) or [tesla.com](https://www.tesla.com/fr_fr/support/power-consumption) we consider an average value of energy consumed per kilometer of: $ 0.17\ kWh/km $.
|
| 258 |
|
| 259 |
We divide the request energy consumption by this value to compute the distance driven by an EV.
|
| 260 |
|
| 261 |
-
|
| 262 |
|
| 263 |
We compare the 🌍 GHG emissions of the request and of streaming a video. From [impactco2.fr](https://impactco2.fr/outils/comparateur?value=1&comparisons=streamingvideo), we consider that $ 1\ kgCO2eq $ is equivalent to $ 15.6\ h $ of streaming.
|
| 264 |
|
| 265 |
We multiply that value by the GHG emissions of the request to get an equivalent in hours of video streaming.
|
| 266 |
|
| 267 |
-
|
| 268 |
|
| 269 |
These equivalents are computed based on the request impacts scaled to a worldwide adoption use case. We imply that the same request is done 1% of the planet everyday for 1 year, and then compute impact equivalents.
|
| 270 |
|
|
@@ -272,25 +266,25 @@ $$
|
|
| 272 |
I_{scaled} = I_{request} * [1 \% \ \text{of}\ 8B\ \text{people on earth}] * 365\ \text{days}
|
| 273 |
$$
|
| 274 |
|
| 275 |
-
|
| 276 |
|
| 277 |
We compare the ⚡️ direct energy consumption (scaled) by the energy production of wind turbines and nuclear power plants. From [ecologie.gouv.fr](https://www.ecologie.gouv.fr/eolien-terrestre) we consider that a $ 2\ MW $ wind turbine produces $ 4.2\ GWh $ a year. And from [edf.fr](https://www.edf.fr/groupe-edf/espaces-dedies/jeunes-enseignants/pour-les-jeunes/lenergie-de-a-a-z/produire-de-lelectricite/le-nucleaire-en-chiffres) we learn that a $ 900\ MW $ nuclear power plant produces $ 6\ TWh $ a year.
|
| 278 |
|
| 279 |
We divide the scaled energy consumption by these values to get the number of wind turbines or nuclear power plants needed.
|
| 280 |
|
| 281 |
-
|
| 282 |
|
| 283 |
We compare the ⚡️ direct energy consumption (scaled) by the electricity consumption of Ireland per year. From [wikipedia.org](https://en.wikipedia.org/wiki/List_of_countries_by_electricity_consumption) we consider the Ireland electricity consumption to be $ 33\ TWh $ a year for a population of 5M.
|
| 284 |
|
| 285 |
We divide the scaled energy consumption by this value to get the equivalent number of "Ireland countries".
|
| 286 |
|
| 287 |
-
|
| 288 |
|
| 289 |
We compare the 🌍 GHG emissions (scaled) of the request and of a return flight Paris ↔ New York City. From [impactco2.fr](https://impactco2.fr/outils/comparateur?value=1&comparisons=&equivalent=avion-pny) we consider that a return flight Paris → New York City → Paris for one passenger emits $ 1,770\ kgCO2eq $ and we consider an overall average load of 100 passengers per flight.
|
| 290 |
|
| 291 |
We divide the scaled GHG emissions by this value to get the equivalent number of return flights.
|
| 292 |
|
| 293 |
-
|
| 294 |
"""
|
| 295 |
|
| 296 |
CITATION_LABEL = "BibTeX citation for EcoLogits Calculator and the EcoLogits library:"
|
|
|
|
| 1 |
HERO_TEXT = """
|
| 2 |
+
<div align="center" class="hero">
|
| 3 |
<a href="https://ecologits.ai/">
|
| 4 |
<img style="max-height: 200px" alt="EcoLogits" src="https://raw.githubusercontent.com/genai-impact/ecologits/main/docs/assets/logo_calculator.png">
|
| 5 |
</a>
|
| 6 |
</div>
|
| 7 |
<div align="center">
|
| 8 |
<p style="max-width: 850px; text-align: left">
|
| 9 |
+
<b><a href="https://ecologits.ai/" target="_blank">EcoLogits</a></b> is an <b>open source</b> tool for estimating the <b>energy consumption</b> and <b>environmental footprint</b> when using <b>generative AI models</b>. It is developed by the <b><a href="https://genai-impact.org/">GenAI Impact</a></b> non-profit.
|
| 10 |
+
<br><br>
|
| 11 |
+
This page is the official calculator made for everyone to explore the impact evaluation methodology and raise awareness on sustainable AI.
|
|
|
|
|
|
|
| 12 |
</p>
|
| 13 |
|
| 14 |
</div>
|
| 15 |
<br>
|
| 16 |
"""
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
HOW_TO_TEXT = """
|
| 19 |
Chose a provider, a model and an example of usage (prompts).
|
| 20 |
|
|
|
|
| 68 |
"""
|
| 69 |
|
| 70 |
ABOUT_TEXT = r"""
|
| 71 |
+
### 🎯 Our goal
|
| 72 |
|
| 73 |
**The main goal of the EcoLogits Calculator is to raise awareness on the environmental impacts of LLM inference.**
|
| 74 |
|
|
|
|
| 77 |
At **[GenAI Impact](https://genai-impact.org/) we are dedicated to understanding and mitigating the environmental impacts of generative AI** through rigorous research, innovative tools, and community engagement. Especially, in early 2024 we have launched an new open-source tool called [EcoLogits](https://github.com/genai-impact/ecologits) that tracks the energy consumption and environmental footprint of using generative AI models through APIs.
|
| 78 |
|
| 79 |
|
| 80 |
+
### 🙋 FAQ
|
| 81 |
|
| 82 |
**How we assess the impacts of closed-source models?**
|
| 83 |
|
|
|
|
| 109 |
EcoLogits is focused on estimating the environmental impacts of generative AI (only LLMs for now) used **through API providers (such as OpenAI, Anthropic, Cloud APIs...)** whereas CodeCarbon is more general tool to measure energy consumption and estimate GHG emissions measurement. If you deploy LLMs locally we encourage you to use CodeCarbon to get real numbers of your energy consumption.
|
| 110 |
|
| 111 |
|
| 112 |
+
### 🤗 Contributing
|
| 113 |
|
| 114 |
We are eager to get feedback from the community, don't hesitate to engage the discussion with us on this [GitHub thread](https://github.com/genai-impact/ecologits/discussions/45) or message us on [LinkedIn](https://www.linkedin.com/company/genai-impact/).
|
| 115 |
|
| 116 |
We also welcome any open-source contributions on 🌱 **[EcoLogits](https://github.com/genai-impact/ecologits)** or on 🧮 **EcoLogits Calculator**.
|
| 117 |
|
| 118 |
|
| 119 |
+
### ⚖️ License
|
| 120 |
|
| 121 |
<p xmlns:cc="http://creativecommons.org/ns#" >
|
| 122 |
This work is licensed under
|
| 123 |
<a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">
|
| 124 |
CC BY-SA 4.0
|
| 125 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
</p>
|
| 127 |
|
| 128 |
+
### 🙌 Acknowledgement
|
| 129 |
|
| 130 |
We thank [Data For Good](https://dataforgood.fr/) and [Boavizta](https://boavizta.org/en) for supporting the development of this project. Their contributions of tools, best practices, and expertise in environmental impact assessment have been invaluable.
|
| 131 |
|
|
|
|
| 132 |
|
| 133 |
+
### 🤝 Contact
|
|
|
|
| 134 |
|
| 135 |
For general question on the project, please use the [GitHub thread](https://github.com/genai-impact/ecologits/discussions/45).
|
| 136 |
Otherwise use our contact form on [genai-impact.org/contact](https://genai-impact.org/contact/).
|
| 137 |
"""
|
| 138 |
|
| 139 |
SUPPORT_TEXT = r"""
|
| 140 |
+
### How to support us
|
| 141 |
|
| 142 |
At GenAI Impact, our projects are powered by the passion and dedication of our team.
|
| 143 |
+
Since its first release in June 2024, this calculator has been **developed and maintained entirely on a volunteer basis by our members**.
|
| 144 |
+
We aim to keep this tool available as a free and open-source resource for the common good. We need your support to reach this goal, this is how you can help.
|
| 145 |
+
|
| 146 |
+
#### If you have 1 second
|
| 147 |
|
| 148 |
+
3 easy ways to help this project:
|
|
|
|
| 149 |
- Give a ❤️ like to this space
|
| 150 |
+
- Give a ⭐ to the EcoLogits repository on [GitHub](https://github.com/genai-impact/ecologits)
|
| 151 |
- Follow us on [LinkedIn](https://fr.linkedin.com/company/genai-impact)
|
| 152 |
|
| 153 |
+
#### If you have 5 minutes
|
| 154 |
+
|
| 155 |
Share your feedback, ask questions, help other members of the community !
|
| 156 |
|
| 157 |
+
Engage the discussion with us:
|
| 158 |
- Start a new discussion on this space or on this
|
| 159 |
[GitHub thread](https://github.com/genai-impact/ecologits/discussions/45)
|
| 160 |
- Use the contact form on [GenAI Impact website](https://genai-impact.org/contact/)
|
| 161 |
- message us on [LinkedIn](https://www.linkedin.com/company/genai-impact/).
|
| 162 |
|
| 163 |
+
#### If you have more to give
|
| 164 |
+
|
| 165 |
+
###### As an individual
|
| 166 |
|
|
|
|
| 167 |
We welcome any open source contribution ! You can :
|
| 168 |
- Contribute on **[EcoLogits](https://github.com/genai-impact/ecologits)** or on
|
| 169 |
**EcoLogits Calculator**.
|
| 170 |
- Become a an active member of [GenAI Impact ](https://genai-impact.org/contact/) non profit. Get involved in our broader mission !
|
| 171 |
|
| 172 |
|
| 173 |
+
###### As an organization
|
| 174 |
+
|
| 175 |
If EcoLogits Calculator brings value to your organization, customers or communities you can help finance this project.
|
| 176 |
- Become a **sponsor**
|
| 177 |
- Become a **benefactor member** if you are a public sector or non-profit organization or a university.
|
| 178 |
|
| 179 |
+
Contact us on [GenAI Impact](https://genai-impact.org/contact/)
|
|
|
|
| 180 |
"""
|
| 181 |
|
| 182 |
METHODOLOGY_TEXT = r"""
|
| 183 |
+
### 📖 Methodology
|
| 184 |
|
| 185 |
We have developed a methodology to **estimate the energy consumption and environmental impacts for an LLM inference** based on request parameters and hypotheses on the data center location, the hardware used, the model architecture and more.
|
| 186 |
|
| 187 |
In this section we will only cover the principles of the methodology related to the 🧮 **EcoLogits Calculator**. If you wish to learn more on the environmental impacts modeling of an LLM request checkout the 🌱 [EcoLogits documentation page](https://ecologits.ai/methodology/).
|
| 188 |
|
| 189 |
+
#### Modeling impacts of an LLM request
|
| 190 |
|
| 191 |
The environmental impacts of an LLM inference are split into the **usage impacts** $I_{request}^u$ to account for electricity consumption and the **embodied impacts** $I_{request}^e$ that relates to resource extraction, hardware manufacturing and transportation. In general terms it can be expressed as follow:
|
| 192 |
|
|
|
|
| 206 |
* 🌍 **Global Warming Potential** (GWP): Potential impact on global warming in kgCO2eq (commonly known as GHG/carbon emissions).
|
| 207 |
* 🪨 **Abiotic Depletion Potential for Elements** (ADPe): Impact on the depletion of non-living resources such as minerals or metals in kgSbeq.
|
| 208 |
* ⛽️ **Primary Energy** (PE): Total energy consumed from primary sources in MJ.
|
| 209 |
+
* ⛽️ **Water Consumption Footprint** (WCF): Water consumed by data centers and electricity generation power plants.
|
| 210 |
+
|
| 211 |
+
#### Principles, Data and Hypotheses
|
| 212 |
|
|
|
|
| 213 |
We use a **bottom-up methodology** to model impacts, meaning that we will estimate the impacts of low-level physical components to then estimate the impacts at software level (in that case an LLM inference). We also rely on **Life Cycle Approach (LCA) proxies and approach** to model both usage and embodied phases with multi-criteria impacts. If you are interested in this approach we recommend you to read the following [Boavizta](https://boavizta.org/) resources.
|
| 214 |
|
| 215 |
* [Digital & environment: How to evaluate server manufacturing footprint, beyond greenhouse gas emissions?](https://boavizta.org/en/blog/empreinte-de-la-fabrication-d-un-serveur)
|
|
|
|
| 217 |
* [Boavizta API documentation](https://doc.api.boavizta.org/)
|
| 218 |
|
| 219 |
We leverage **open data to estimate the environmental impacts**, here is an exhaustive list of our data providers.
|
| 220 |
+
|
| 221 |
+
* [ML.ENERGY Leaderboard](https://ml.energy/leaderboard/) to estimate GPU energy consumption and latency based on the model architecture and number of output tokens.
|
| 222 |
* [Boavizta API](https://github.com/Boavizta/boaviztapi) to estimate server embodied impacts and base energy consumption.
|
| 223 |
+
* [Our World in Data](https://ourworldindata.org/), [ADEME Base Empreinte®](https://base-empreinte.ademe.fr/) and [World Resource Institute](https://www.wri.org/) for electricity mix impacts per country.
|
| 224 |
|
| 225 |
Finally here are the **main hypotheses** we have made to compute the impacts.
|
| 226 |
|
| 227 |
* ⚠️ **We *"guesstimate"* the model architecture of proprietary LLMs when not disclosed by the provider.**
|
| 228 |
+
* Production setup: quantized models running on data center grade servers and GPUs such as H100.
|
| 229 |
+
* Electricity mixes are yearly averages.
|
| 230 |
* Ignore the following impacts: unused cloud resources, data center building, network and end-user devices... (for now)
|
| 231 |
|
| 232 |
+
### Equivalents
|
| 233 |
|
| 234 |
We have integrated impact equivalents to help people better understand the impacts and have reference points for standard use cases and everyday activities.
|
| 235 |
|
| 236 |
+
#### Request impacts
|
| 237 |
|
| 238 |
These equivalents are computed based on the request impacts only.
|
| 239 |
|
| 240 |
+
##### 🚶♂️➡️ Walking or 🏃♂️➡️ running distance
|
| 241 |
|
| 242 |
We compare the ⚡️ direct energy consumption with the energy consumption of someone 🚶♂️➡️ walking or 🏃♂️➡️ running. From [runningtools.com](https://www.runningtools.com/energyusage.htm) we consider the following energy values per physical activity (for someone weighing 70kg):
|
| 243 |
|
|
|
|
| 246 |
|
| 247 |
We divide the request energy consumption by these values to compute the distance traveled.
|
| 248 |
|
| 249 |
+
##### 🔋 Electric Vehicle distance
|
| 250 |
+
|
| 251 |
We compare the ⚡️ direct energy consumption with the energy consumer by a EV car. From [selectra.info](https://selectra.info/energie/actualites/insolite/consommation-vehicules-electriques-france-2040) or [tesla.com](https://www.tesla.com/fr_fr/support/power-consumption) we consider an average value of energy consumed per kilometer of: $ 0.17\ kWh/km $.
|
| 252 |
|
| 253 |
We divide the request energy consumption by this value to compute the distance driven by an EV.
|
| 254 |
|
| 255 |
+
##### ⏯️ Streaming time
|
| 256 |
|
| 257 |
We compare the 🌍 GHG emissions of the request and of streaming a video. From [impactco2.fr](https://impactco2.fr/outils/comparateur?value=1&comparisons=streamingvideo), we consider that $ 1\ kgCO2eq $ is equivalent to $ 15.6\ h $ of streaming.
|
| 258 |
|
| 259 |
We multiply that value by the GHG emissions of the request to get an equivalent in hours of video streaming.
|
| 260 |
|
| 261 |
+
#### Scaled impacts
|
| 262 |
|
| 263 |
These equivalents are computed based on the request impacts scaled to a worldwide adoption use case. We imply that the same request is done 1% of the planet everyday for 1 year, and then compute impact equivalents.
|
| 264 |
|
|
|
|
| 266 |
I_{scaled} = I_{request} * [1 \% \ \text{of}\ 8B\ \text{people on earth}] * 365\ \text{days}
|
| 267 |
$$
|
| 268 |
|
| 269 |
+
##### Number of 💨 wind turbines or ☢️ nuclear plants
|
| 270 |
|
| 271 |
We compare the ⚡️ direct energy consumption (scaled) by the energy production of wind turbines and nuclear power plants. From [ecologie.gouv.fr](https://www.ecologie.gouv.fr/eolien-terrestre) we consider that a $ 2\ MW $ wind turbine produces $ 4.2\ GWh $ a year. And from [edf.fr](https://www.edf.fr/groupe-edf/espaces-dedies/jeunes-enseignants/pour-les-jeunes/lenergie-de-a-a-z/produire-de-lelectricite/le-nucleaire-en-chiffres) we learn that a $ 900\ MW $ nuclear power plant produces $ 6\ TWh $ a year.
|
| 272 |
|
| 273 |
We divide the scaled energy consumption by these values to get the number of wind turbines or nuclear power plants needed.
|
| 274 |
|
| 275 |
+
##### Multiplier of 🇮🇪 Ireland electricity consumption
|
| 276 |
|
| 277 |
We compare the ⚡️ direct energy consumption (scaled) by the electricity consumption of Ireland per year. From [wikipedia.org](https://en.wikipedia.org/wiki/List_of_countries_by_electricity_consumption) we consider the Ireland electricity consumption to be $ 33\ TWh $ a year for a population of 5M.
|
| 278 |
|
| 279 |
We divide the scaled energy consumption by this value to get the equivalent number of "Ireland countries".
|
| 280 |
|
| 281 |
+
##### Number of ✈️ Paris ↔ New York City flights
|
| 282 |
|
| 283 |
We compare the 🌍 GHG emissions (scaled) of the request and of a return flight Paris ↔ New York City. From [impactco2.fr](https://impactco2.fr/outils/comparateur?value=1&comparisons=&equivalent=avion-pny) we consider that a return flight Paris → New York City → Paris for one passenger emits $ 1,770\ kgCO2eq $ and we consider an overall average load of 100 passengers per flight.
|
| 284 |
|
| 285 |
We divide the scaled GHG emissions by this value to get the equivalent number of return flights.
|
| 286 |
|
| 287 |
+
##### If you are motivated to help us test and enhance this methodology [contact us](https://genai-impact.org/contact/)! 💪
|
| 288 |
"""
|
| 289 |
|
| 290 |
CITATION_LABEL = "BibTeX citation for EcoLogits Calculator and the EcoLogits library:"
|
src/style.css
CHANGED
|
@@ -4,7 +4,7 @@ html, body, [class*="css"] {
|
|
| 4 |
font-family: 'Montserrat', sans-serif;
|
| 5 |
font-size: 18px;
|
| 6 |
font-weight: 500;
|
| 7 |
-
color: #
|
| 8 |
}
|
| 9 |
|
| 10 |
[data-testid="metric-container"] {
|
|
|
|
| 4 |
font-family: 'Montserrat', sans-serif;
|
| 5 |
font-size: 18px;
|
| 6 |
font-weight: 500;
|
| 7 |
+
color: #062522;
|
| 8 |
}
|
| 9 |
|
| 10 |
[data-testid="metric-container"] {
|