utils
llm_impacts(provider, model_name, output_token_count, request_latency, electricity_mix_zone='WOR')
High-level function to compute the impacts of an LLM generation request.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
provider |
str
|
Name of the provider. |
required |
model_name |
str
|
Name of the LLM used. |
required |
output_token_count |
int
|
Number of generated tokens. |
required |
request_latency |
float
|
Measured request latency in seconds. |
required |
electricity_mix_zone |
Optional[str]
|
ISO 3166-1 alpha-3 code of the electricity mix zone (WOR by default). |
'WOR'
|
Returns:
Type | Description |
---|---|
Optional[Impacts]
|
The impacts of an LLM generation request. |