genai-impact / ecologits

🌱 EcoLogits tracks the energy consumption and environmental footprint of using generative AI models through APIs.
https://ecologits.ai/
Mozilla Public License 2.0
34 stars 3 forks source link

Support regional energy mixes #42

Open adrienbanse opened 2 months ago

adrienbanse commented 2 months ago

For now, we only use the world mix to compute GWP, ADPE and PE:

IF_ELECTRICITY_MIX_GWP = 5.90478e-1     # kgCO2eq / kWh (World)
IF_ELECTRICITY_MIX_ADPE = 7.37708e-8    # kgSbeq / kWh (World)
IF_ELECTRICITY_MIX_PE = 9.988           # MJ / kWh (World)

But we know that some providers only have servers in a specific region (e.g. OpenAI in the US).

We could add a column in data/models.csv indicating a zone (country, continent, ...), and then query another .csv (or query some database in another way) to ask for an average energy mix of the zone, or keep the World mix if unspecified.

adrienbanse commented 2 months ago

If we can query an API such as Electricity Maps, then we can even make it time-dependent.

adrienbanse commented 2 months ago

Started to work on this in feat/variable_mixes