Help with Adding Custom Models to Ecologits #106
-
Hi all, We are currently using Ecologits to monitor the energy consumption of cloud-based LLMs (Azure OpenAI), and it seems to be working well. Now, we would like to run a model from Hugging Face Hub (phi2) on our local infrastructure. However, we couldn’t find the option for a 'Custom' model as mentioned in the Ecologits calculator within the Ecologits packages. Could you help us with this or perhaps create a new issue to add support for custom models in the list of Ecologits providers? Thank you for your assistance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hey @vchemla, Thanks a lot for using EcoLogits. :-) First of all, Ecologits really aims at approximating cloud-based requests impacts. If you run your model locally, I would advise to use other packages such as CodeCarbon (https://codecarbon.io/), that will lead to more precise results! If however you want to approximate custom cloud-based models, as of today, the only way to do that is to directly call the ecologits/ecologits/impacts/llm.py Line 424 in 0cd0df2 For each request, you'll have to provide
from ecologits.electricity_mix_repository import electricity_mixes
electricity_mix = electricity_mixes.find_electricity_mix(zone=zone)
if_electricity_mix_adpe=electricity_mix.adpe
if_electricity_mix_pe=electricity_mix.pe
if_electricity_mix_gwp=electricity_mix.gwp This is the way it is coded right now in the calculator. Right now, it is not possible to wrap a custom request with an impact (and seems technically complex). |
Beta Was this translation helpful? Give feedback.
Hey @vchemla,
Thanks a lot for using EcoLogits. :-)
First of all, Ecologits really aims at approximating cloud-based requests impacts. If you run your model locally, I would advise to use other packages such as CodeCarbon (https://codecarbon.io/), that will lead to more precise results!
If however you want to approximate custom cloud-based models, as of today, the only way to do that is to directly call the
compute_llm_impacts
function fromecologits/ecologits/impacts/llm.py
Line 424 in 0cd0df2
For each request, you'll have to provide