ecologits.impacts
¶
Impacts
¶
Bases: BaseModel
Impacts data model.
Attributes:
| Name | Type | Description |
|---|---|---|
energy |
Energy
|
Total energy consumption |
gwp |
GWP
|
Total Global Warming Potential (GWP) impact |
adpe |
ADPe
|
Total Abiotic Depletion Potential for Elements (ADPe) impact |
pe |
PE
|
Total Primary Energy (PE) impact |
wcf |
WCF
|
Usage-only Water Consumption Footprint (WCF) impact |
usage |
Usage
|
Impacts for the usage phase |
embodied |
Embodied
|
Impacts for the embodied phase |
compute_llm_impacts(model_active_parameter_count, model_total_parameter_count, output_token_count, if_electricity_mix_adpe, if_electricity_mix_pe, if_electricity_mix_gwp, if_electricity_mix_wue, datacenter_pue, datacenter_wue, request_latency=None, tps=None, ttft=None, **kwargs)
¶
Compute the impacts of an LLM generation request.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model_active_parameter_count
|
ValueOrRange
|
Number of active parameters of the model (in billion). |
required |
model_total_parameter_count
|
ValueOrRange
|
Number of total parameters of the model (in billion). |
required |
output_token_count
|
float
|
Number of generated tokens. |
required |
if_electricity_mix_adpe
|
float
|
ADPe impact factor of electricity consumption of kgSbeq / kWh (Antimony). |
required |
if_electricity_mix_pe
|
float
|
PE impact factor of electricity consumption in MJ / kWh. |
required |
if_electricity_mix_gwp
|
float
|
GWP impact factor of electricity consumption in kgCO2eq / kWh. |
required |
if_electricity_mix_wue
|
float
|
WCF impact factor of electricity consumption in L / kWh. |
required |
datacenter_wue
|
ValueOrRange
|
Water Usage Effectiveness of the data center in L/kWh. |
required |
datacenter_pue
|
ValueOrRange
|
Power Usage Effectiveness of the data center. |
required |
request_latency
|
Optional[float]
|
Measured request latency in seconds. |
None
|
tps
|
Optional[float]
|
Number of tokens generated per second by the model. |
None
|
ttft
|
Optional[float]
|
Time-to-first-token latency in seconds. |
None
|
**kwargs
|
Any
|
Any other optional parameter. |
{}
|
Returns: The impacts of an LLM generation request.
Source code in ecologits/impacts/llm.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 | |