Skip to content

ganapathyhari/responsible-ai

Repository files navigation

🌱 Responsible AI

A Personal Realisation

AI has successfully shifted me from "plan, design, build" to "I can ship code" mindset.

I can deploy a state-of-the-art language model in minutes.

I can fine-tune BERT variants before my coffee gets cold.

I can build and ship RAG systems faster than ever before..*

🎯 Mission (IKIGAI)

But then I read something that stopped me cold.

Training a single AI model can emit more CO2 than five cars will produce in their entire lifetimes. And I've deployed dozens of models this year alone.

This led me back to my IKIGAI: What should I build with AI?

β–‘ Be part of building solutions to all or some of humanity's problems

If my AI solutions contribute to climate change, am I really solving problems?

This repository tracks the environmental and qualitative responsibility of AI models. We believe AI should:

  • βœ… Help the economy, not just optimize production
  • βœ… Be selective β€” can't be the solution for everything & the value of nothing
  • βœ… Reduce cost of living (e.g., cost-saving drugs, affordable groceries)
  • βœ… Solve humanity's problems β€” be part of building sustainable AI solutions

πŸ“Š What We Track

This repository provides frameworks and tools to evaluate AI models across two dimensions:

Phase 1: Environmental Responsibility ♻️ βœ…

  • CO2 emissions from model training
  • Hardware efficiency metrics
  • Energy consumption analysis
  • Visualization dashboards

Phase 2: Qualitative Performance πŸ“ˆ 🚧

  • Accuracy metrics
  • Precision & Recall
  • F1-Score analysis
  • Task-specific benchmarks

Phase 3: Unified Responsibility Score πŸ† πŸ“‹

  • Combined environmental + performance metrics
  • Model selection guide for responsible AI
  • Trade-off analysis (efficiency vs. accuracy)

πŸš€ Quick Start

Prerequisites

python >= 3.8
pip install -r requirements.txt

Run CO2 Emissions Analysis

cd notebooks
jupyter notebook co2_emissions_tracker.ipynb

View Results

Generated files are saved to outputs/:

  • co2_emissions_latest.csv β€” Clean dataset with CO2 metrics
  • co2_emissions_bar_chart.png β€” Top models by emissions
  • co2_emissions_histogram.png β€” Distribution analysis
  • co2_emissions_categories.png β€” Emission categories

πŸ“ Repository Structure

responsible-ai/
β”œβ”€β”€ README.md                          # This file
β”œβ”€β”€ LICENSE                            # MIT License
β”œβ”€β”€ CONTRIBUTING.md                    # How to contribute
β”œβ”€β”€ requirements.txt                   # Python dependencies
β”‚
β”œβ”€β”€ notebooks/
β”‚   β”œβ”€β”€ README_CO2_EMISSIONS.md        # Detailed notebook guide
β”‚   └── co2_emissions_tracker.ipynb    # Main analysis notebook
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ data_collection.py             # HF Hub data fetching
β”‚   β”œβ”€β”€ co2_estimator.py               # CO2 calculation engine
β”‚   └── visualization.py               # Chart generation utilities
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ METHODOLOGY.md                 # CO2 estimation formulas & references
β”‚   β”œβ”€β”€ ROADMAP.md                     # Phase-by-phase development plan
β”‚   └── FUTURE_ENHANCEMENTS.md         # GitHub Actions automation, etc.
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ sample/                        # Sample datasets
β”‚   └── .gitkeep
β”‚
β”œβ”€β”€ outputs/
β”‚   └── [Generated by notebooks]
β”‚
└── tests/
    └── [Test files]

πŸ“š Documentation

Document Purpose
notebooks/README_CO2_EMISSIONS.md Step-by-step guide for CO2 analysis notebook
docs/METHODOLOGY.md CO2 estimation formulas, hardware assumptions, references
docs/ROADMAP.md Three-phase development plan
CONTRIBUTING.md How to extend with qualitative metrics

πŸ”¬ Key Insights

Based on Hugging Face Hub analysis (10K+ models scanned):

  • Model Coverage: ~2-5% of models report CO2 emissions
  • Emission Range: From <1 kg (small models) to >100K kg (large LLMs)
  • Most Emitting Models: Large language models (70B+)
  • Green Alternatives: Distilled models show 40-60% lower emissions

πŸ› οΈ Technologies

  • Data Collection: Hugging Face Hub API
  • Analysis: pandas, numpy
  • Visualization: matplotlib, seaborn
  • Future: scikit-learn (metrics), GitHub Actions (automation)

πŸ“– How to Use This Repository

For Researchers

  1. Read docs/METHODOLOGY.md to understand CO2 calculation
  2. Run notebooks/co2_emissions_tracker.ipynb to collect fresh data
  3. Generate visualizations for your papers/presentations

For Practitioners

  1. Check outputs/ for latest analysis
  2. Use data/sample/ to find green models
  3. Compare models using the responsibility framework (Phase 2+)

For Contributors

  1. Read CONTRIBUTING.md
  2. Start with Phase 2: Adding qualitative metrics
  3. Follow the modular structure in src/

πŸ“ Citation

If you use this repository in research, please cite:

@software{responsible_ai_2025,
  title={Responsible AI: Environmental & Qualitative Model Tracking},
  author={Your Name},
  year={2025},
  url={https://github.com/yourusername/responsible-ai}
}

πŸ”— References

Key Papers on AI CO2 Emissions:

https://codecarbon.io/

https://huggingface.co/blog/carbon-emissions-on-the-hub

Data Sources:


πŸ“„ License

MIT License β€” See LICENSE file


🀝 Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.


πŸ’¬ Questions?

  • πŸ“§ Open an Issue
  • πŸ’‘ Start a Discussion
  • πŸ”€ Submit a Pull Request

Last Updated: January 2025
Status: Active Development (Phase 1 βœ…, Phase 2 🚧, Phase 3 πŸ“‹)

About

🌱 Responsible AI: Environmental & Qualitative Model Tracking

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors