Energy Estimation Model

The Energy Estimation Model uses token counts and model parameters to estimate energy consumption CO2 emissions for agent calls.

jamanota.energy_estimation_model.estimate_energy_and_emissions(input_tokens: int, output_tokens: int, model: str) tuple[float, float][source]

Estimate energy consumption and CO2 emissions for a model inference.

The estimation is based on: - FLOPs per token approximation for transformer models - Assumed hardware efficiency (FLOPs per Joule) - Global average carbon intensity

Parameters:
  • input_tokens (int) – Number of input tokens.

  • output_tokens (int) – Number of output tokens.

  • model (str) – Model identifier used to determine parameter count.

Returns:

  • Total energy consumption in Joules

  • Estimated CO2 emissions in kilograms

Return type:

tuple[float, float]