ShardedUnlearningScenario
Statistics scenarios · Implementation: mlsysim/engine/scenario_definitions/statistics.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
Exact unlearning by sharded retraining (SISA) against a full retrain of workload.
The full retrain runs on n_accelerators of accelerator at mfu and costs full_cost. Planning rounds it to whole days; one request retrains one of shards equal shards, at a proportional share of time and cost. requests_per_day arrive uniformly at random over the shards.
Notes
Equation: Uniform occupancy gives the expected touched-shard count; multiply by one-shard retraining cost.
Assumptions: Equal-sized shards, linear retraining cost, uniform independent deletion-to-shard assignment, and fixed MFU.
Excludes: SISA slice mechanics, imbalance, optimizer startup, and exact unlearning verification.
References
Derivation: Uniform occupancy gives the expected touched-shard count; multiply by one-shard retraining cost. Individual property contracts identify the exact accounting expression or reusable calculation. Registry entries supply the scenario inputs; this class does not turn them into measured outcomes.
Examples
Evaluate a named scenario using its declared inputs.
>>> from mlsysim import Scenarios
>>> scenario = Scenarios.Gpt3ShardedUnlearning
>>> round(float(scenario.full_retrain_time.magnitude), 4)
35.5477Attributes
| Name | Description |
|---|---|
| accelerator | |
| accuracy_drop_high | |
| accuracy_drop_low | |
| daily_batch_cost | Expected USD to retrain each touched shard once in a daily deletion batch. |
| full_cost | |
| full_retrain_time | Days to perform the stated training FLOPs at aggregate peak FLOP/s times the declared |
| mfu | |
| n_accelerators | |
| p_shard_untouched | Probability one shard receives no deletion requests when requests independently choose |
| planning_days | Full-retrain time rounded to integer days for the scenario’s planning convention. |
| requests_per_day | |
| shard_cost | USD for one shard retrain under linear equal-shard cost scaling. |
| shard_share | Fraction of equal-sized training work assigned to one shard. |
| shard_time | Hours per shard retrain using rounded planning days rather than exact full-retrain time. |
| shards | |
| shards_touched_per_day | Expected daily count of distinct shards hit by deletion requests. |
| workload |
workload
Type: Workload.
Declared default: required.
accelerator
Type: HardwareNode.
Declared default: required.
n_accelerators
Type: int.
Declared default: required.
mfu
Type: float.
Declared default: required.
full_cost
Type: Quantity.
Declared default: required.
shards
Type: int.
Declared default: required.
requests_per_day
Type: int.
Declared default: required.
accuracy_drop_low
Type: Optional[float].
Declared default: None.
accuracy_drop_high
Type: Optional[float].
Declared default: None.
full_retrain_time
engine.scenario_types.ShardedUnlearningScenario.full_retrain_time
Days to perform the stated training FLOPs at aggregate peak FLOP/s times the declared MFU.
Equation: rate = n_accelerators * accelerator.compute.peak_flops * mfu; result = (workload.training_ops / rate).to('day').
planning_days
engine.scenario_types.ShardedUnlearningScenario.planning_days
Full-retrain time rounded to integer days for the scenario’s planning convention.
The full retrain rounded to whole days, the figure planning quotes.
Equation: round(full_retrain_time.to('day').magnitude).
shard_cost
engine.scenario_types.ShardedUnlearningScenario.shard_cost
USD for one shard retrain under linear equal-shard cost scaling.
Equation: (full_cost * shard_share).to('USD').
shard_time
engine.scenario_types.ShardedUnlearningScenario.shard_time
Hours per shard retrain using rounded planning days rather than exact full-retrain time.
Equation: (Q_(planning_days, 'day') * shard_share).to('hour').
p_shard_untouched
engine.scenario_types.ShardedUnlearningScenario.p_shard_untouched
Probability one shard receives no deletion requests when requests independently choose shards uniformly.
Chance a given shard receives none of a day’s requests.
Equation: (1 - shard_share) ** requests_per_day.
shards_touched_per_day
engine.scenario_types.ShardedUnlearningScenario.shards_touched_per_day
Expected daily count of distinct shards hit by deletion requests.
Equation: shards * (1 - p_shard_untouched).
daily_batch_cost
engine.scenario_types.ShardedUnlearningScenario.daily_batch_cost
Expected USD to retrain each touched shard once in a daily deletion batch.
Cost if every touched shard retrains once a day.
Equation: (shards_touched_per_day * shard_cost).to('USD').