Skip to main content

ServingCostScenario

Economics scenarios · Implementation: mlsysim/engine/scenario_definitions/economics.py.

Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.

One model version’s training spend against its first year of serving.

Notes

Equation: annual serving bill = users * daily requests per user * days * price per request.

Assumptions: User demand and unit price remain constant; the efficiency gain is a stipulated cost reduction.

Excludes: Discounted cash flow, traffic growth, retraining, and proving that efficiency can improve by the specified share.

References

Derivation: annual serving bill = users * daily requests per user * days * price per request. The individual properties state units and intermediate accounting; this class introduces no fitted coefficient.

Examples

The named scenario supplies illustrative inputs; the output is calculated.

>>> from mlsysim import Scenarios
>>> case = Scenarios.LlmServingFirstYear
>>> round(float(case.daily_requests), 3)
50000000.0

Attributes

Name Description
annual_requests Requests per modeled year using the scenario’s declared number of days.
annual_serving_cost First-year serving bill in USD at constant cost per request.
cost_per_request
crossover_months Months of average serving spend equal to the one-time training bill.
crossover_weeks Equivalent serving-spend crossover in weeks, using the scenario’s days per year.
daily_requests Requests per day from user count times requests per user.
daily_users
days_per_year
efficiency_gain
efficiency_savings Annual USD saved by the stipulated fractional cut in serving cost.
monthly_serving_cost Average serving bill in USD per month, annual bill divided into twelve equal
requests_per_user_per_day
serving_to_training Annual serving spend divided by one-time training spend, a dimensionless ratio.
training_cost

training_cost

Type: float.

Declared default: required.

daily_users

Type: int.

Declared default: required.

requests_per_user_per_day

Type: int.

Declared default: required.

cost_per_request

Type: float.

Declared default: required.

efficiency_gain

Type: float.

Declared default: required.

days_per_year

Type: int.

Declared default: required.

daily_requests

engine.scenario_types.ServingCostScenario.daily_requests

Requests per day from user count times requests per user.

Equation: return daily_users * requests_per_user_per_day.

annual_requests

engine.scenario_types.ServingCostScenario.annual_requests

Requests per modeled year using the scenario’s declared number of days.

Equation: return daily_requests * days_per_year.

annual_serving_cost

engine.scenario_types.ServingCostScenario.annual_serving_cost

First-year serving bill in USD at constant cost per request.

Equation: return annual_requests * cost_per_request.

serving_to_training

engine.scenario_types.ServingCostScenario.serving_to_training

Annual serving spend divided by one-time training spend, a dimensionless ratio.

Equation: return annual_serving_cost / training_cost.

efficiency_savings

engine.scenario_types.ServingCostScenario.efficiency_savings

Annual USD saved by the stipulated fractional cut in serving cost.

Equation: return annual_serving_cost * efficiency_gain.

monthly_serving_cost

engine.scenario_types.ServingCostScenario.monthly_serving_cost

Average serving bill in USD per month, annual bill divided into twelve equal periods.

Equation: return annual_serving_cost / 12.

crossover_months

engine.scenario_types.ServingCostScenario.crossover_months

Months of average serving spend equal to the one-time training bill.

Equation: return training_cost / monthly_serving_cost.

crossover_weeks

engine.scenario_types.ServingCostScenario.crossover_weeks

Equivalent serving-spend crossover in weeks, using the scenario’s days per year.

Equation: return crossover_months * days_per_year / 12 / 7.

Back to top