ecologits  by mlco2

Track generative AI's environmental impact

Created 2 years ago
258 stars

Top 98.1% on SourcePulse

GitHubView on GitHub
Project Summary

EcoLogits addresses the need to quantify the environmental impact of generative AI models accessed via APIs. It provides researchers, developers, and organizations with tools to track energy consumption and greenhouse gas (GHG) emissions, enabling more sustainable AI development and deployment. The project aims to bring transparency to the often-opaque environmental footprint of cloud-based AI services.

How It Works

EcoLogits integrates directly with popular generative AI API clients, such as OpenAI, Anthropic, and Google. Upon initialization with specified providers, it intercepts API calls and augments the responses to include estimated energy consumption and GHG emissions data. This approach leverages existing API infrastructure, allowing users to gain environmental insights with minimal code changes, directly correlating usage with tangible environmental metrics.

Quick Start & Requirements

  • Installation: pip install ecologits
  • Provider Integration: Install specific provider support via pip install ecologits[openai], ecologits[anthropic], etc. Supported providers include anthropic, cohere, google-genai, huggingface-hub, mistralai, and openai.
  • Prerequisites: Python. API keys are required for supported providers.
  • Documentation: Full documentation is available at ecologits.ai.

Highlighted Details

  • Tracks energy consumption (kWh) and GHG emissions (kgCO2eq) for GenAI API inferences.
  • Supports a growing list of major LLM API providers.
  • Aims to foster transparency in AI's environmental footprint.
  • Part of the CodeCarbon non-profit initiative.

Maintenance & Community

The project acknowledges "Sponsors & benefactors" and provides guidance for contributions via a "Contributing to EcoLogits" document. No direct community channels like Discord or Slack are listed in the README.

Licensing & Compatibility

Licensed under the Mozilla Public License Version 2.0 (MPL-2.0). This license permits use in proprietary software but requires modifications to the licensed code itself to be shared under MPL-2.0.

Limitations & Caveats

Currently, EcoLogits explicitly supports a defined set of API providers. Its functionality with other models, custom integrations, or offline inference scenarios is not detailed in the provided README.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
9
Issues (30d)
1
Star History
10 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.