FederatedUplinkScenario
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.
A week of raw captures against compressed model updates sent at named round cadences.
Notes
Equation: Update bytes=update_params*update_bits_per_param/bits_per_byte; weekly traffic=rounds*update_bytes.
Assumptions: Each round sends a full quantized update of the same size.
Excludes: Protocol overhead, retries, secure aggregation, and convergence effects of cadence.
References
Derivation: Raw weekly volume counts items times item bytes. An update counts parameters times bits per parameter, converted to bytes. Multiplying update size by cadence gives weekly traffic; equality of the two volumes gives the break-even round count.
Examples
The named registry scenario supplies the stated inputs; this is a modeled calculation, not a new measurement.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.PhoneImagesVersusQuantizedUpdates
>>> round(scenario.break_even_rounds, 6)
80.0Attributes
| Name | Description |
|---|---|
| break_even_rounds | Unrounded updates per week at which update traffic equals raw capture traffic; alias of reduction. |
| item_size | |
| items_per_week | |
| raw_volume | Weekly raw capture bytes: item count times bytes per item. |
| reduction | Raw weekly bytes divided by bytes in one update; also the unrounded break-even number of updates. |
| rounds_per_week | |
| update_bits_per_param | |
| update_params | |
| update_size | One quantized model update in decimal MB: parameter count times bits per parameter converted to bytes; excludes protocol overhead. |
Methods
| Name | Description |
|---|---|
| weekly_upload | Weekly MB at the named round cadence: rounds per week times update size. |
weekly_upload
engine.scenario_types.FederatedUplinkScenario.weekly_upload(cadence)Weekly MB at the named round cadence: rounds per week times update size.
Equation: (self.rounds_per_week[cadence] * self.update_size).to(‘MB’)
items_per_week
Type: int.
Declared default: required.
item_size
Type: Quantity.
Declared default: required.
update_params
Type: float.
Declared default: required.
update_bits_per_param
Type: int.
Declared default: required.
rounds_per_week
Type: Dict[str, int].
Declared default: required.
raw_volume
engine.scenario_types.FederatedUplinkScenario.raw_volume
Weekly raw capture bytes: item count times bytes per item.
Equation: self.items_per_week * self.item_size
update_size
engine.scenario_types.FederatedUplinkScenario.update_size
One quantized model update in decimal MB: parameter count times bits per parameter converted to bytes; excludes protocol overhead.
Equation: The calculation follows the stated accounting rule; the method body shows each intermediate term.
reduction
engine.scenario_types.FederatedUplinkScenario.reduction
Raw weekly bytes divided by bytes in one update; also the unrounded break-even number of updates.
Equation: (self.raw_volume / self.update_size).to_base_units().magnitude
break_even_rounds
engine.scenario_types.FederatedUplinkScenario.break_even_rounds
Unrounded updates per week at which update traffic equals raw capture traffic; alias of reduction.
Equation: self.reduction