Green-Software-Foundation / hack

Carbon Hack 24 - The annual hackathon from the Green Software Foundation
https://grnsft.org/hack/github
14 stars 1 forks source link

Create a model plugin to calculate the energy and carbon consumed during AI model training #76

Open sann3 opened 4 months ago

sann3 commented 4 months ago

Prize category

Best Plugin

Overview

Basically it is a one implementation for the problem statement https://github.com/Green-Software-Foundation/hack/discussions/33

I am thinking to implement this using https://mlco2.github.io/impact/. We can get the inputs Hardware type, Hours Used, Provider, Region of Compute and return the raw carbon emissions produced and the approximate offset carbon emissions. I know the data is outdated, but in future if we get a updated source we can use it.

If we need more accurate results then we can also integrate with paid services like https://www.climatiq.io/

Questions to be answered

No response

Have you got a project team yet?

I am working on this project alone

Project team

No response

Terms of Participation

Creating models needs a lot of resources so becoming one of the big carbon emission processes, sustainability is not integrated into AI development.

Application

Hugging Face serves as the GitHub for datasets and models. However, the process of creating models requires significant resources, contributing to substantial carbon emissions. Currently, benchmarks are used to compare models, but I foresee a future where creators also present carbon usage as a metric when introducing new models.

To achieve this, I developed an application using existing plugins within Impct framework. In the future, plugin creators will simply need to add five configurations to the config.json file during model upload, enabling Hugging Face to automatically display carbon usage.

Prize category

Best Content

Judging Criteria

This solution aligns with our goal of integrating sustainability into AI development, ensuring that environmental impact is considered alongside technological advancements.

Video

https://youtu.be/ZoPPBWSqf7Y

Artefacts

https://github.com/sann3/AI-Carbon-Counter

Usage

https://github.com/sann3/AI-Carbon-Counter/blob/main/README.md

Process

Initially I have started as a plugin development, and after understanding the IF eco system realized that we don't need a new plugin, it can be achieved by chaining the existing plugins.

Inspiration

I like sustainability, and introducing it in my day to day life. I want sustainability implemented in the AI ecosystem.

Learnings

Learned how to develop a plugin and application using Impact framework

What's next?

If the Impact framework is integrated into Hugging face ecosystem then we can show carbon impact in many areas like model creation, model inference, dataset creation etc..,

sann3 commented 3 months ago

@russelltrow I have found a way to achieve this without a new plugin ? How to proceed on this ?

jmcook1186 commented 3 months ago

Hi @sann3 - can you give any more detail? The solution has to integrate with the IF in some way.

sann3 commented 3 months ago

Initially I thought need a separate plugin to calculate the carbon consumption. But after exploring, found that it can be archived by combing existing plugins, no need for new plugin. Since I started this idea as a new plugin development, but it is changed now, not sure how to proceed. Should I present my finding as a application? or Should I work on a new Idea ?

jmcook1186 commented 3 months ago

It's up to you - you can pursue a new idea if you specifically want to build new plugins, or you can: a) refine some of our existing plugins to make them work better for your use case b) write and deploy a manifest file using our existing plugins and write an explainer for it c) build something on top of the IF, such as some kind of monitoring, tooling or a dataset that enables environmental measuremnets in some way

sann3 commented 3 months ago

ok, thanks for the options. I will go with option b and submit.