0
0
AI for Everyoneknowledge~30 mins

Environmental cost of training AI models in AI for Everyone - Mini Project: Build & Apply

Choose your learning style9 modes available
Environmental Cost of Training AI Models
📖 Scenario: You are part of a team raising awareness about the environmental impact of artificial intelligence (AI). Your goal is to create a simple data summary that shows the energy consumption and carbon emissions of training different AI models.
🎯 Goal: Build a clear data summary that lists AI models with their training energy use and carbon emissions, then calculate total energy and emissions to understand the environmental cost.
📋 What You'll Learn
Create a dictionary with AI model names as keys and their training energy consumption (in kWh) as values
Add a variable for the average carbon emission factor (kg CO2 per kWh)
Calculate a new dictionary with AI model names and their estimated carbon emissions
Calculate total energy consumption and total carbon emissions for all models
💡 Why This Matters
🌍 Real World
Understanding the environmental cost of AI training helps researchers and companies make greener choices and raise awareness about energy use.
💼 Career
Data analysts, AI researchers, and sustainability experts use such data to measure and reduce carbon footprints in technology projects.
Progress0 / 4 steps
1
Create AI models energy data
Create a dictionary called ai_models_energy with these exact entries: 'GPT-3': 1287000, 'BERT': 150000, 'ResNet': 50000, 'Transformer XL': 300000
AI for Everyone
Need a hint?

Use curly braces {} to create a dictionary with the model names as keys and energy values as integers.

2
Set carbon emission factor
Create a variable called carbon_per_kwh and set it to 0.475 representing average kg CO2 emitted per kWh of electricity
AI for Everyone
Need a hint?

Assign the value 0.475 to the variable carbon_per_kwh using the equals sign.

3
Calculate carbon emissions per model
Create a new dictionary called ai_models_carbon using dictionary comprehension that multiplies each model's energy in ai_models_energy by carbon_per_kwh
AI for Everyone
Need a hint?

Use {model: energy * carbon_per_kwh for model, energy in ai_models_energy.items()} to create the new dictionary.

4
Calculate total energy and carbon emissions
Create two variables: total_energy as the sum of all values in ai_models_energy, and total_carbon as the sum of all values in ai_models_carbon
AI for Everyone
Need a hint?

Use the sum() function on the dictionary values to get totals.