Skip to content

Commit 89b506e

Browse files
committed
fix(quarto vol2): chapter title blocks, hero CSS, and table hygiene
- Set html title-block-style to none for vol2 book chapters so the first ## is not promoted over the chapter # title; keep default title blocks on vol2 landing pages (index-vol2.qmd and contents/vol2/index.qmd). - Hide duplicate Quarto title-block hero h1 and collapse the empty duplicate header on full-width chapter layouts (style-vol1.scss and style-vol2.scss). - Add YAML title for Network Fabrics; simplify the Framework Rosetta Stone pipe table in the vol2 introduction (slashes tightened for house punctuation). - Drop redundant bold markup from liquid-cooling comparison cells in compute infrastructure.
1 parent 6e5cdcc commit 89b506e

8 files changed

Lines changed: 68 additions & 20 deletions

File tree

book/quarto/assets/styles/style-vol1.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,22 @@ $font-family-monospace: 'JetBrains Mono', 'Fira Code', monospace;
1616
/*-- scss:rules --*/
1717
@import 'themes/theme-harvard';
1818
@import 'base-styles';
19+
20+
// Same spacing + duplicate-empty-header handling as vol2 (see style-vol2.scss).
21+
main#quarto-document-content.page-columns.page-full {
22+
> header#title-block-header.quarto-title-block {
23+
h1.title,
24+
.quarto-title h1.title {
25+
display: none !important;
26+
}
27+
margin-block-end: 0.35rem;
28+
padding-bottom: 0;
29+
}
30+
> header#title-block-header.quarto-title-block + header#title-block-header {
31+
display: none !important;
32+
margin: 0 !important;
33+
padding: 0 !important;
34+
height: 0 !important;
35+
overflow: hidden !important;
36+
}
37+
}

book/quarto/assets/styles/style-vol2.scss

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,29 @@ $font-family-monospace: 'JetBrains Mono', 'Fira Code', monospace;
1616
/*-- scss:rules --*/
1717
@import 'themes/theme-eth';
1818
@import 'base-styles';
19+
20+
// Chapter HTML: Quarto emits a title-block hero <h1> plus the body `# Chapter`
21+
// <h1>, and (currently) a second empty <header id="title-block-header">. YAML
22+
// `title:` fixes wrong inferred titles; CSS hides the redundant hero and
23+
// tightens spacing the layout assumed a visible hero (see quarto-cli issues on
24+
// website title blocks). Homepage unchanged (no .page-columns.page-full).
25+
main#quarto-document-content.page-columns.page-full {
26+
// Hide duplicate hero line; keep breadcrumbs
27+
> header#title-block-header.quarto-title-block {
28+
h1.title,
29+
.quarto-title h1.title {
30+
display: none !important;
31+
}
32+
// Less gap before body `# Chapter` now that the hero line is hidden
33+
margin-block-end: 0.35rem;
34+
padding-bottom: 0;
35+
}
36+
// Second blank title-block header adds a large vertical hole (duplicate id)
37+
> header#title-block-header.quarto-title-block + header#title-block-header {
38+
display: none !important;
39+
margin: 0 !important;
40+
padding: 0 !important;
41+
height: 0 !important;
42+
overflow: hidden !important;
43+
}
44+
}

book/quarto/config/_quarto-html-vol2.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ bibliography:
169169

170170
format:
171171
html:
172+
# Avoid Quarto promoting the first section ## (e.g. “The Synchronization
173+
# Backbone”) into the page hero instead of the chapter # title. Chapter
174+
# pages rely on the leading “# Chapter Name” line for the visible title.
175+
title-block-style: none
172176
lightbox: true
173177
mermaid:
174178
theme: default

book/quarto/contents/vol2/compute_infrastructure/compute_infrastructure.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2216,11 +2216,11 @@ The operational procedures for immersion-cooled facilities differ sharply from a
22162216

22172217
| **Metric** | **Air Cooling (Legacy)** | **Liquid Cooling (Modern)** |
22182218
|:-----------------------|:--------------------------|:----------------------------|
2219-
| **Max Power Density** | ~20--30 kW/Rack | **>120 kW/Rack** |
2220-
| **Cooling Efficiency** | PUE ~1.5--2.0 | **PUE ~1.05--1.10** |
2221-
| **Mechanism** | Forced-Air Fans | **Direct-to-Chip Coolant** |
2222-
| **Heat Carrier** | Air (1.0 kJ/kg/K) | **Water (4.18 kJ/kg/K)** |
2223-
| **Fan Power** | 30--40 percent of IT load | **<5 percent of IT load** |
2219+
| **Max Power Density** | ~20--30 kW/Rack | >120 kW/Rack |
2220+
| **Cooling Efficiency** | PUE ~1.5--2.0 | PUE ~1.05--1.10 |
2221+
| **Mechanism** | Forced-Air Fans | Direct-to-Chip Coolant |
2222+
| **Heat Carrier** | Air (1.0 kJ/kg/K) | Water (4.18 kJ/kg/K) |
2223+
| **Fan Power** | 30--40 percent of IT load | <5 percent of IT load |
22242224

22252225
: **The Shift to Liquid Cooling**: At rack power densities above 30 kW, air cooling requires fan power that approaches the power consumed by the GPUs themselves. Liquid cooling is not a premium option; it is a thermodynamic requirement for modern ML racks. {#tbl-cooling-limits}
22262226

book/quarto/contents/vol2/index.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
format:
33
html:
4+
title-block-style: default
45
title: "Machine Learning Systems at Scale"
56
date: today
67
date-format: long

book/quarto/contents/vol2/introduction/introduction.qmd

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1880,21 +1880,17 @@ The **Five-Pillar Framework**\index{Five-Pillar Framework} structures the engine
18801880

18811881
Translating these pillars into production code requires navigating a fragmented ecosystem of distributed frameworks. @tbl-framework-rosetta-stone provides a cross-framework mapping of the core primitives discussed in this volume, serving as a "Rosetta Stone" for engineers moving between research and production environments.
18821882

1883-
\footnotesize
1884-
1885-
: **The Framework Rosetta Stone**: A mapping of abstract distributed ML primitives to their implementations across major frameworks. Primitives are covered in depth in the Distributed ML and Deployment at Scale parts. {#tbl-framework-rosetta-stone tbl-colwidths="[14,14,17,22,17,16]"}
1886-
1887-
| **Abstract Primitive** | **PyTorch (Native)** | **DeepSpeed** | **Megatron-LM** | **JAX/XLA** | **Ray** |
1888-
|:-----------------------|:-----------------------|:-------------------|:---------------------------|:------------------------|:-------------------|
1889-
| **Data Parallel** | `DDP` | `DeepSpeedEngine` | `DistributedDataParallel` | `pmap` / `jit(sharded)` | `Ray Train` |
1890-
| **Sharded DP** | `FSDP` | `ZeRO-1/2/3` | `FullyShardedDataParallel` | `sharding.Mesh` | `FSDP Strategy` |
1891-
| **Tensor Parallel** | `DTensor` | `InferenceTP` | `Column/RowParallel` | `xmap` / `spmd` | `Ray Train TP` |
1892-
| **Pipeline Parallel** | `PiPPy` | `PipelineModule` | `PipelineParallel` | `GSPMD` | `Ray Train PP` |
1893-
| **Grad Accumulation** | `backward(accumulate)` | `grad_accum_steps` | `grad_acc_steps` | `lax.scan` | `Ray Train Config` |
1894-
| **Checkpointing** | `torch.save` / `DCP` | `save_checkpoint` | `save_checkpoint` | `orbax` | `ray.checkpoint` |
1895-
| **Orchestration** | `torchrun` | `deepspeed` CLI | `megatron_main.py` | `jax.distributed` | `Ray Core` |
1896-
1897-
\normalsize
1883+
: **The Framework Rosetta Stone**: A mapping of abstract distributed ML primitives to their implementations across major frameworks. Primitives are covered in depth in the Distributed ML and Deployment at Scale parts. {#tbl-framework-rosetta-stone}
1884+
1885+
| **Abstract Primitive** | **PyTorch (Native)** | **DeepSpeed** | **Megatron-LM** | **JAX/XLA** | **Ray** |
1886+
|:-----------------------|:---------------------|:-----------------|:-------------------------|:------------------|:-----------------|
1887+
| **Data Parallel** | DDP | DeepSpeedEngine | DistributedDataParallel | pmap/jit(sharded) | Ray Train |
1888+
| **Sharded DP** | FSDP | ZeRO-1/2/3 | FullyShardedDataParallel | sharding.Mesh | FSDP Strategy |
1889+
| **Tensor Parallel** | DTensor | InferenceTP | Column/RowParallel | xmap/spmd | Ray Train TP |
1890+
| **Pipeline Parallel** | PiPPy | PipelineModule | PipelineParallel | GSPMD | Ray Train PP |
1891+
| **Grad Accumulation** | backward(accumulate) | grad_accum_steps | grad_acc_steps | lax.scan | Ray Train Config |
1892+
| **Checkpointing** | torch.save/DCP | save_checkpoint | save_checkpoint | orbax | ray.checkpoint |
1893+
| **Orchestration** | torchrun | deepspeed CLI | megatron_main.py | jax.distributed | Ray Core |
18981894

18991895
The **Six Systems Engineering Principles**\index{Six Systems Engineering Principles} provide the "Gold Standard" for individual design decisions:
19001896

book/quarto/contents/vol2/network_fabrics/network_fabrics.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
title: "Network Fabrics"
23
quiz: network_fabrics_quizzes.json
34
engine: jupyter
45
---

book/quarto/index-vol2.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ output-file: index.html
33
sidebar: vol2-content
44
format:
55
html:
6+
title-block-style: default
67
title: "Machine Learning Systems at Scale"
78
date: today
89
date-format: long

0 commit comments

Comments
 (0)