Skip to main content

SpeculativeEpisodeScenario

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.

Speculative decoding on a serial episode’s model time, at two draft acceptance levels.

Notes

Equation: The result property delegates to the named solver documented below; it converts declared scenario units before passing the inputs.

Assumptions: The nested serial episode supplies model fraction; draft length, cost ratio, and acceptance are fixed.

Excludes: A prediction of acceptance quality, variable sequence length, and non-model speedup.

References

Derivation: the scenario composes mlsysim.solvers.SpeculativeEpisodeModel. Their contracts supply the underlying equations; property equations show the remaining unit conversions and accounting.

Examples

>>> from mlsysim import Scenarios
>>> scenario = Scenarios.SerialRepairEpisodeSpeculation
>>> value = scenario.result
>>> type(value).__name__
'SpeculativeEpisodeResult'

Attributes

Name Description
accepted_high
accepted_low
draft_cost_ratio
draft_length
episode
result Return the typed accounting result from SpeculativeEpisodeModel using this

episode

Type: SerialEpisodeScenario.

Declared default: required.

draft_length

Type: int.

Declared default: required.

draft_cost_ratio

Type: float.

Declared default: required.

accepted_high

Type: float.

Declared default: required.

accepted_low

Type: float.

Declared default: required.

result

engine.scenario_types.SpeculativeEpisodeScenario.result

Return the typed accounting result from SpeculativeEpisodeModel using this scenario’s declared inputs; units and exclusions follow that solver contract.

Equation: SpeculativeEpisodeModel().solve(float(e.total_time.to('second').magnitude), e.model_fraction, draft_length, draft_cost_ratio, accepted_high, accepted_low).

Back to top