You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/quarto/contents/vol1/benchmarking/benchmarking.qmd
+17-8Lines changed: 17 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -2264,6 +2264,11 @@ With perfect scaling, `{python} ScalingEfficiencyCalc.n_gpus_str` would complete
2264
2264
2265
2265
**Step 3**: Account for the efficiency loss. @Tbl-benchmarking-scaling-efficiency-loss decomposes the "missing" `{python} ScalingEfficiencyCalc.loss_str` into measurable overhead categories—gradient synchronization, memory copy, load imbalance, and batch-size effects—each measurable through a distinct profiling signal.
|**Gradient synchronization**| 10-15% | AllReduce time per step |
@@ -2273,6 +2278,10 @@ With perfect scaling, `{python} ScalingEfficiencyCalc.n_gpus_str` would complete
2273
2278
2274
2279
: **Scaling Efficiency Loss Sources**: Illustrative decomposition of the missing efficiency budget into measurable overhead categories and the corresponding measurement signal used to attribute each loss. Actual percentages depend on model, interconnect, storage, batch schedule, and framework implementation. {#tbl-benchmarking-scaling-efficiency-loss}
2275
2280
2281
+
```{=latex}
2282
+
\endgroup
2283
+
```
2284
+
2276
2285
**Step 4**: The systems insight.
2277
2286
<!-- lego-ok-block: typical strong-scaling efficiency ranges at different GPU counts -->
2278
2287
Scaling efficiency decreases as $N_{\text{GPU}}$ grows because communication overhead scales with GPU count while per-GPU compute shrinks. In this worked example, eight GPUs reach 75 percent efficiency; at larger scales, the same arithmetic makes clear why sophisticated communication and input-pipeline optimization become necessary.
@@ -2699,15 +2708,15 @@ These metrics interact through unavoidable trade-offs. Optimizing for high throu
2699
2708
2700
2709
Deployment scenario determines the priority order among those metrics. The operational constraints and success criteria vary dramatically across contexts, so metric priorities help engineers focus benchmarking effort and interpret results within the right decision framework. @Tbl-metric-priorities illustrates how performance priorities shift across five major deployment contexts, revealing the systematic relationship between operational constraints and optimization targets.
|**Cloud-Scale Services**| Throughput (QPS) | Cost Efficiency | Average Latency | Business viability requires massive scale |
2715
+
|**Edge/Mobile Devices**| Power Consumption | Memory Footprint | Latency | Battery life and resource limits dominate |
2716
+
|**Training Workloads**| Training Time | GPU Utilization | Memory Efficiency | Research velocity enables faster experimentation |
2717
+
|**Scientific/Medical**| Accuracy | Reliability | Explainability | Correctness cannot be compromised for performance |
2709
2718
2710
-
: **Performance Metric Priorities by Deployment Context**: Different operational environments demand distinct optimization focuses, reflecting varying constraints and success criteria. These priorities guide both benchmark selection and result interpretation. {#tbl-metric-priorities tbl-colwidths="[18,16,20,18,28]"}
2719
+
: **Performance Metric Priorities by Deployment Context**: Different operational environments demand distinct optimization focuses, reflecting varying constraints and success criteria. These priorities guide both benchmark selection and result interpretation. {#tbl-metric-priorities tbl-colwidths="[18,19,18,17,28]"}
2711
2720
2712
2721
The key insight from @tbl-metric-priorities is that the same metric can be primary in one context and irrelevant in another. Latency ranks first for real-time applications (autonomous vehicles must process sensor data within strict timing deadlines) but tertiary for cloud services (which accept higher latency in exchange for cost efficiency per query). A smartphone AI assistant that improves throughput by 50 percent but increases power consumption by 30 percent represents a net regression since battery life directly impacts user satisfaction. Medical diagnostic systems prioritize accuracy as nonnegotiable—achieving 99.2 percent accuracy at 10 ms latency provides superior value compared to 98.8 percent at 5 ms. This context-dependence means that a 2$\times$ throughput improvement represents substantial value for cloud deployments but minimal benefit for battery-powered edge devices, where 20 percent power reduction delivers superior operational impact.
Copy file name to clipboardExpand all lines: book/quarto/contents/vol1/conclusion/conclusion.qmd
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,9 @@ The Lighthouse Models now become a constraint map for reasoning about ML systems
95
95
96
96
The five Lighthouse Models\index{Lighthouse Model!bottleneck probe} introduced in @sec-introduction-iron-law-ml-systems-c32a made this constraint propagation concrete, serving as systems detectives throughout the book. Each revealed how different workloads expose different bottlenecks.
97
97
98
+
```{=latex}
99
+
\newpage
100
+
```
98
101
The five Lighthouse workloads expose distinct constraint regimes:
99
102
100
103
-**ResNet-50**: Batch size can turn image inference from a memory-bound path into compute-bound throughput.
|**Feature store lookup**| 1–10 ms | Network + cache |
1606
-
1607
-
: **Data Engineering Time Constants**: Characteristic durations for labeling, training, and serving operations span about `{python} DataEngineeringTimeConstants.span_orders_str` orders of magnitude. Human labeling sets the wall-clock floor for new datasets, making it the dominant scheduling constraint in production ML systems. {#tbl-data-engineering-time-constants tbl-colwidths="[40,34,36]"}
1608
1565
1609
1566
```{python}
1610
1567
#| echo: false
@@ -1660,6 +1617,51 @@ class LabelingComputeRatio:
1660
1617
1661
1618
The contrast matters: weeks for human labeling, hours for GPU training, milliseconds for serving. Labeling is the bottleneck. It often costs hundreds to more than a thousand times more than a single optimized training run: a `{python} LabelingComputeRatio.labeling_budget_str` labeling budget compares with `{python} LabelingComputeRatio.train_cost_low_str`--`{python} LabelingComputeRatio.train_cost_high_str` for one 8$\times$ A100 ResNet-50 run, a `{python} LabelingComputeRatio.ratio_low_mult_str`--`{python} LabelingComputeRatio.ratio_high_mult_str` ratio. Within that labeling spend, the effort distribution itself is skewed: `{python} LabelingComputeRatio.effort_majority_pct_str` of the work goes to `{python} LabelingComputeRatio.effort_minority_pct_str` of features—the long tail of edge cases, rare categories, and quality exceptions.
|**Feature store lookup**| 1–10 ms | Network + cache |
1661
+
1662
+
: **Data Engineering Time Constants**: Characteristic durations for labeling, training, and serving operations span about `{python} DataEngineeringTimeConstants.span_orders_str` orders of magnitude. Human labeling sets the wall-clock floor for new datasets, making it the dominant scheduling constraint in production ML systems. {#tbl-data-engineering-time-constants tbl-colwidths="[40,34,36]"}
1663
+
1664
+
1663
1665
All cost figures reflect approximate 2024 cloud provider rates and are intended to convey relative magnitudes rather than exact pricing.[^fn-pricing-cost-ratios] The consistent pattern across these numbers is that human labor (labeling, annotation, expert review) dominates hardware and storage costs by one to three orders of magnitude. A team that optimizes its labeling pipeline before scaling compute or storage addresses the largest cost term first.
0 commit comments