Skip to content

SC92113/ML-Carbon-Aware-Computing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ML-Carbon-Aware-Computing

☰ Table of Contents

🎯 Goal

Perform low carbon training by using real time carbon intensity

Note

This project is run by Vertex AI, which is only available after configuring Google Cloud environment. For other cloud provider users, please check the relevant training location services with your cloud providers.

  1. Set up Google Cloud account
  2. Initialize Vertex AI application
  3. Set up training environment and import libraries
  4. Load Electricity Map carbon intensity API
  5. Select a training location with lowest carbon intensity
    • Method 1: Select a training location based on public carbon intensity reference page
    • Method 2: Define a cleanest function to select a training location from the region list by API
  6. Define task.py
  7. Define storage bucket
  8. Define custom training job
  9. Train model
  10. Delete storage bucket

💡 Key concepts in the project

Carbon emission formula

  • Amount of carbon used in machine learning workload = Carbon intensity * Amount of Energy used in machine learning workload

Energy used in machine learning lifecycle

  • Hardware
    • CPU, GPU, data center
  • Training
    • Pre-training, fine-tuning
  • Inference
    • Serve and interact with users in real time

Carbon aware solutions

  • Compute in low carbon regions which have renewable energy sources (refer to notebook)
    • Factors to be considered when selecting low carbon training locations
      • Cost
      • Security
      • Performance latency
  • Compute in the time with most renewable energy generated
  • Choose cloud provider with low power usage effectiveness (PUE)/ internal energy consumption of data center
    • e.g. Google has multiple data centers around the world showing Carbon Free Energy Percentage (CFE%) for user references
  • Choose efficient hardware such as GPU and TPU
  • Compute with special purposes through model pretraining/ model resizing

API call of Electricity Map

  • Carbon intensity and power breakdown request of a training location in one step

📚 References

🔎 Research papers

🛠️ This project is supported by DeepLearning.AI and Google Cloud.