- Domain: Energy Systems / Smart Grids / LLM training
- Tools: TypeScript, Python
LLM training can involve thousands of GPUs running over the period of a couple of months. During this time, energy consumption and thereby CO2 consumption is immense, which is one of the arguments against LLMs in general. The CO2 consumption could possibly be reduced, if the model training stops during times, where the CO2 intensity of the energy grid is high, and resumes when the CO2 Intensity is lower. This change of CO2 intensity mostly depends on the usage of renewable energy during this period in the specified area.
This project builds a simulation of CO2-aware LLM training to evaluate the effect of stopping and starting the training process on the CO2 consumption of the overall process.
The main project is a SolidJS single-page application with:
- Live simulation: interactive scenario runner with configurable thresholds, regions, and training durations
- Optimization: parameter sweep to find optimal CO2 threshold configurations
- Results viewer: charts and statistics for completed simulation runs
- CLI: command-line tools for simulation, optimization, and data fetching
pnpm dev # start dev server on :3000
pnpm build # production build
pnpm test # run tests
pnpm cli # CLI entry point
The legacy/ directory contains the original Python simulation engine (moved here when the project migrated to the web).
- How do different CO2 intensity thresholds (gCO2 eq/kWh) influence training duration?
- What is the best starting time, season, or region for training?
- How much CO2 can be saved during LLM training?
- What is the best region for CO2-aware model training?
- Electricity Maps API for CO2 intensity data
- LLM provider specifications for training duration and energy consumption
The ICREC paper figures are generated by dedicated, self-contained scripts that read the DeepSeek-V3 result CSVs under publication/output/ and write both the source SVG and the EPS used by the latexmk -pdfps build into ../TheGreenEpochPaper/assets/:
| Paper figure | Script | Output |
|---|---|---|
Fig. 1 (\label{fig:pareto}) |
scripts/fig_1_savings_vs_overhead.py |
savings_vs_overhead_all.{svg,eps} |
Fig. 2 (\label{fig:threshold}) |
scripts/fig_2_threshold_space.py |
threshold_space_DeepSeek_V3_DE_0101.{svg,eps} |
Fig. 3 (\label{fig:margin}) |
scripts/fig_3_margin_analysis.py |
margin_analysis.{svg,eps} |
Regenerate them from the repo root:
uv run scripts/fig_1_savings_vs_overhead.py # Fig. 1
uv run scripts/fig_2_threshold_space.py # Fig. 2
uv run scripts/fig_3_margin_analysis.py # Fig. 3All three use DeepSeek V3 only (alpha == 1.0); Kimi K2 was dropped in the revision and is filtered out at load time. scripts/visualize_results.py and scripts/analyze_margins.py are the broader exploration/analysis toolkits. The fig_* scripts above are the only canonical sources for the paper figures.
Fig. 4 (\label{fig:ckpt-margin}) is generated by scripts/fig_4_checkpoint_margin.py from the checkpoint sweep.
The grid carbon-intensity table (\label{tab:grid}) is generated from the 2025 series by:
uv run scripts/table_grid_stats.pyIt writes a LaTeX tabular body to publication/output/tables/grid_stats.tex and to ../TheGreenEpochPaper/assets/tables/grid_stats.tex, which the paper imports with \input{assets/tables/grid_stats.tex}. Rows are ordered by coefficient of variation (descending).
The start-date sensitivity numbers in the paper are reproduced by:
uv run scripts/analyze_start_dates.pyIt prints the best start date per region and overhead budget, the January-vs-July fixed-start savings, and the monthly mean intensities, and writes publication/output/start_date_analysis.csv.