Make the Climate Impact of AI Visible, Measurable, and Actionable
A comprehensive decision-support system to estimate, track, and reduce the carbon footprint of AI operations including text generation, image creation, and video synthesis.
Carbon-Aware AI helps developers, researchers, and organizations understand and minimize the environmental impact of their AI workloads. The platform provides:
- Real-time carbon footprint estimation for AI models
- Smart model recommendations to reduce emissions
- Multi-modal support: Text AI, Image Generation, and Video Generation
- Data center comparison across global cloud providers
- Historical tracking of your AI carbon footprint
- Estimate COโ emissions for LLM queries (GPT-4, Claude, Llama, etc.)
- Support for 9+ popular AI models
- Token-based calculation with regional carbon intensity
- Batch query analysis
- Track emissions for DALL-E, Stable Diffusion, Midjourney, Flux, and more
- Resolution and step-based calculations
- Model comparison visualizations
- Measure carbon footprint for Sora, Runway, Pika, and other video models
- Duration, resolution, and FPS-based estimates
- Real-world equivalents (phone charges, streaming hours, car emissions)
- Compare carbon intensity across global data centers
- PUE (Power Usage Effectiveness) metrics
- Renewable energy percentage tracking
- Provider-level emissions analysis
- Track your carbon footprint over time
- Visualize trends and patterns
- Export data for reporting
- Python 3.9 or higher
- pip package manager
- Clone the repository
git clone https://github.com/MalikZeeshan1122/Carbon-Aware-AI.git
cd Carbon-Aware-AI- Set up the Backend API
Open a terminal and run:
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000The API will be available at:
- API Endpoint: http://localhost:8000
- Interactive Docs: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
- Set up the Frontend Dashboard
Open a new terminal and run:
cd frontend
pip install -r requirements.txt
streamlit run app.py --server.port 8501The dashboard will open automatically at http://localhost:8501
Carbon-Aware-AI/
โโโ backend/ # FastAPI backend
โ โโโ app/
โ โ โโโ main.py # API entry point
โ โ โโโ models/ # Data models
โ โ โโโ services/ # Business logic
โ โ โ โโโ estimator.py # Carbon estimation engine
โ โ โ โโโ recommender.py # Model recommendation system
โ โ โ โโโ image_estimator.py
โ โ โ โโโ video_estimator.py
โ โ โ โโโ datacenter.py
โ โ โโโ utils/ # Helper functions
โ โโโ requirements.txt
โ
โโโ frontend/ # Streamlit dashboard
โ โโโ app.py # Main dashboard application
โ โโโ requirements.txt
โ
โโโ README.md
โโโ LICENSE
- Open the dashboard at http://localhost:8501
- Select your AI model (e.g., GPT-4, Claude, Llama)
- Choose the task type (Classification, Summarization, etc.)
- Set prompt and completion token counts
- Select your cloud region
- Click "๐ฟ Estimate Impact"
You'll see:
- Energy consumed (kWh)
- COโ emissions (grams)
- Real-world equivalents (phone charges, tree-days needed)
- Smart recommendations for more efficient models
- Navigate to the "๐ผ๏ธ Image AI" tab
- Select your image model (DALL-E, Stable Diffusion, etc.)
- Configure resolution, steps, and number of images
- Click "๐ฟ Estimate Image Impact"
- Go to the "๐ฌ Video AI" tab
- Choose your video model (Sora, Runway, etc.)
- Set duration, resolution, and FPS
- Click "๐ฟ Estimate Video Impact"
POST /estimate- Estimate carbon footprint for text generationPOST /recommend- Get model recommendations
GET /image/estimate- Estimate image generation emissions
GET /video/estimate- Estimate video generation emissions
GET /datacenters/comparison- Compare global data centers
For full API documentation, visit http://localhost:8000/docs
- GPT-4, GPT-3.5-turbo (OpenAI)
- Claude-3-Opus, Claude-3-Sonnet (Anthropic)
- Llama-3-70B, Llama-3-8B (Meta)
- Mistral-Large (Mistral AI)
- DistilBERT, FLAN-T5 (Hugging Face/Google)
- DALL-E 2 & 3, Stable Diffusion (XL, 3, 2.1, Turbo, Lightning)
- Midjourney v5 & v6, Flux (Pro, Schnell)
- Imagen 2, LCM
- Sora, Runway Gen2 & Gen3, Veo
- Pika 1.0 & 1.5, Stable Video Diffusion, AnimateDiff
The system accounts for different carbon intensities across regions:
- Global (average)
- US-East (Virginia)
- US-West (Oregon)
- EU-West (Ireland)
- AsiaPac (Singapore)
Our carbon estimation is based on:
- Model parameters and computational requirements
- Token/pixel/frame counts for workload estimation
- Regional carbon intensity (gCOโ/kWh)
- Data center PUE (Power Usage Effectiveness)
- Hardware efficiency (GPU/TPU specifications)
References:
- Patterson et al. (2021) - "Carbon Emissions and Large Neural Network Training"
- Strubell et al. (2019) - "Energy and Policy Considerations for Deep Learning in NLP"
- Luccioni et al. (2023) - "Estimating the Carbon Footprint of BLOOM"
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Carbon intensity data from Electricity Maps
- Model efficiency research from leading AI labs
- Open-source community for tools and libraries
Muhammad Zeeshan
- LinkedIn: Muhammad Zeeshan
- GitHub: @MalikZeeshan1122
- Repository: Carbon-Aware-AI
If you find this project useful, please consider giving it a โญ on GitHub!
Together, let's make AI more sustainable! ๐ฑ