Skip to main content

LengthNormalizationScenario

Training scenarios · Implementation: mlsysim/engine/scenario_definitions/training.py.

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

Two rollouts with one group coefficient and different lengths, averaged per rollout.

Notes

Equation: Composition of mlsysim.solvers.LengthNormalizationModel.solve.

Assumptions: Inputs are routed to LengthNormalizationModel.solve; their documented regimes and units apply to this configuration.

Excludes: Additional mechanisms beyond the linked solver contracts; the scenario does not collect measurements.

References

Derivation: This scenario binds named inputs to LengthNormalizationModel. The linked solver contracts own equations, sources, and result-unit definitions.

Examples

Evaluate the named configuration and display a modeled result.

>>> from mlsysim import Scenarios
>>> case = Scenarios.ShortAndLongFailureLengths
>>> value = case.result.per_token_ratio
>>> print(f"{value:.3g}")
32

Attributes

Name Description
long_tokens
result Evaluate the stated length normalization case through LengthNormalizationModel.solve; returns its typed result and quantity units.
short_tokens

short_tokens

Type: int.

Declared default: required.

long_tokens

Type: int.

Declared default: required.

result

engine.scenario_types.LengthNormalizationScenario.result

Evaluate the stated length normalization case through LengthNormalizationModel.solve; returns its typed result and quantity units.

Calculation: mlsysim.solvers.LengthNormalizationModel.solve.

Back to top