solvers.FailureTriageModel
solvers.FailureTriageModel()Failures that counterfactual probes remove below the weights, and the price of training on all of them.
runs x failure_rate failures; each probe removes its share (rounded to whole failures), and the rest survive every probe. Training on every failure for epochs epochs of sequence_tokens costs 6PD FLOPs, run on devices at peak_rate x utilization and billed per device-hour.
Methods
| Name | Description |
|---|---|
| solve | Account for training work on all failures versus probe-surviving failures. |
solve
solvers.FailureTriageModel.solve(
runs,
failure_rate,
probe_shares,
parameters,
sequence_tokens,
epochs,
devices,
peak_rate,
utilization,
hourly_price,
)Account for training work on all failures versus probe-surviving failures.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| runs | int | Positive number of observed runs. | required |
| failure_rate | float | Failure fraction in (0, 1], yielding a positive rounded failure count. | required |
| probe_shares | Mapping[str, float] | Disjoint attributed fractions of all failures, nonnegative and summing to at most one. | required |
| parameters | Quantity | Model parameter count, convertible to param. | required |
| sequence_tokens | int | Positive training tokens per failed run. | required |
| epochs | int | Positive number of passes over the failure corpus. | required |
| devices | int | Positive number of identical training devices. | required |
| peak_rate | Quantity | Positive compute rate per device in flop/s. | required |
| utilization | float | Supplied sustained-compute fraction in (0, 1]. | required |
| hourly_price | Quantity | Nonnegative price per device-hour, convertible to USD/hour. | required |
Returns
| Name | Type | Description |
|---|---|---|
| FailureTriageResult | Rounded failure counts; tokens and FLOPs; wall time in hours, device-hours, and costs in USD. |
See Also
mlsysim.physics.transformer.calc_transformer_training_flops : Parameter-dominated training work per processed token.
Notes
Equation: F = round(runs*failure_rate); residual = F - round(F*sum(probe_shares)); training work = 6*parameters*F*sequence_tokens*epochs; time = work/(devices*peak_rate*utilization).
Assumptions: Probe categories are mutually exclusive. Each removed category and the sum are rounded separately, so their integer counts need not add exactly. The training FLOP convention excludes recomputation.
Excludes: Overlapping attribution, causal identification of probe effects, communication, memory feasibility, and optimizer overhead.
References
Derivation: corpus token counts feed the parameter-dominated training accounting in calc_transformer_training_flops; divide work by aggregate sustained rate and multiply device-hours by the caller-supplied price.
Examples
>>> from mlsysim import Q_
>>> result = FailureTriageModel().solve(100, 0.2, {"runtime": 0.5}, Q_("1000 param"), 10, 1, 1, Q_("1e9 flop/s"), 0.5, Q_("1 USD/hour"))
>>> result.residual_cost < result.cost
True