The motivation for Green Love originated from a Crusoe Energy workshop, where we got deep insight into the company's mission and how its cloud infrastructure operates using 100% renewable energy sources.
As AI developers, we all know the pain of starting a model training loop, waiting 8 hours overnight, and having no idea how much it will ultimately cost—both in dollars and in carbon emissions. We found Crusoe's concept inspiring and highly practical. Our goal was to make this idea accessible to a wider audience by building a tool that helps developers save time and resources while making environmentally conscious decisions. We wanted to prove that you don't have to choose between training AI fast and saving the planet.
How we built it
Green Love is built as a lightweight, plug-and-play Python library for PyTorch.
Instead of waiting for an entire training process to finish, we engineered a "smart data" sampling approach. The user wraps their PyTorch DataLoader with our library, which samples only a tiny fraction of the dataset (e.g., 10%) and runs for just a few benchmark epochs.
Under the hood, we built a background thread using nvidia-ml-py (NVML) to continuously poll the GPU's microarchitecture for real-time power draw. Once the benchmark finishes, we use Jinja2 to dynamically generate a polished, interactive HTML dashboard using pure CSS visualizations (no heavy JavaScript charting libraries) to compare local metrics against Crusoe Cloud GPUs.
The Mathematical Foundation
To make accurate predictions from a tiny data sample, we relied heavily on statistical inference and linear scaling laws. We model the total training time as a random variable $T(n, B_e)$, where $n$ is the sample size and $B_e$ is the number of epochs.
Through empirical testing across CNNs, RNNs, and SVMs, we proved that training time scales linearly. However, the first few epochs are always slower due to JIT compilation and data loader initialization. Therefore, we isolate the steady-state execution:
$$T(n, B_e) \approx e_1(n) + e_2(n) + e_3(n) + (B_e - 3) \cdot \bar{A}_e(n)$$
Because per-epoch time is proportional to the number of samples processed, we can scale our tiny benchmark $n$ to the full dataset $N$:
$$e_i(N) \approx e_i(n) \cdot \frac{N}{n}$$
To guarantee accuracy, we calculate 95% confidence intervals using Student's t-distribution (which is much more accurate than a normal distribution for small sample sizes):
$$
\text{Total Time} =
\bar{A}e(n) \cdot B_e
\;\pm\;
\sqrt{B_e} \cdot \sigma(n) \cdot z{\alpha} $$
Challenges we faced
The "Warmup Lag": Initially, our time estimates were wildly inaccurate because PyTorch takes significantly longer to execute the first 1–2 epochs (CUDA context setup, memory allocation). We had to implement a
warmup_epochsparameter to explicitly discard these outliers from our statistical math.RAM Saturation Spikes: During benchmarking, we noticed occasional massive spikes in epoch times. We realized this was caused by RAM saturation triggering disk swaps. To fix this, we switched our core metric from mean epoch time to median epoch time, making the estimator highly robust to system outliers.
Mapping Consumer GPUs to Cloud GPUs: Comparing an enterprise H100 to another enterprise A100 is easy using published Lambda Labs benchmarks. But how do we estimate the speedup if a user is training locally on an RTX 3060? We had to engineer a custom fallback formula weighting Compute (TFLOPS) and Memory Bandwidth (BW):
$$\text{speedup} = 0.7 \times \frac{\text{TFLOPS}{\text{cloud}}}{\text{TFLOPS}{\text{local}}} + 0.3 \times \frac{\text{BW}{\text{cloud}}}{\text{BW}{\text{local}}}$$
What we learned
Building Green Love was an incredible deep dive into the intersection of AI hardware, statistics, and climate tech.
We learned how to interact directly with NVIDIA GPU telemetry via Python.
We deepened our understanding of PyTorch's internal execution graph and data loading bottlenecks.
Most importantly, we learned just how massive the carbon footprint of local AI training can be, and how seamlessly cloud providers like Crusoe can eliminate that footprint using renewable energy.
Every opportunity we have to reduce our footprint is an opportunity we must take to protect our planet—and we learned how to translate that philosophy into functional, elegant code.
these are the rules : LaTeX math tips (learn more)
\( ... \) for in-line math
$$ ... $$ for displayed equations
Log in or sign up for Devpost to join the conversation.