Maps to: UC Berkeley EE 290/194 Scalable AI, Fall 2026 Lectures 26–28, Greenfields in Performance & Accelerators, Greenfields in Pre-Training and Post-Training and Greenfields in Inference (scheduled Dec 2–9; no public slides when these notes were written).
Sources: the course’s own project guide, A Note on Fruitful Research Directions (Spring 2026, 6 pages), which lists seven directions with starting papers; the “Research directions” sections of Lectures 1–28; the project rubric (Lecture 1 §9, SYLLABUS §3). Papers named below are the ones that guide names as starting points.
Code: none (notes only, as planned). The worked compute estimates in §5 use Lecture 1’s accounting (6ND, peak FLOP/s, MFU) and can be redone with
code/lecture01/model_math.py.Reading time: ~1.5 hours.
0. How to read this lecture
0.1 Learning goals
- Map the open problems of the course’s three areas (performance and accelerators; pre- and post-training; inference and applications) to the lectures where their tools were built.
- Turn a direction into a testable hypothesis with a measurable quantity, a baseline, a compute budget for one 8×H100 node, and criteria that make a negative result informative.
- Plan a project with a checklist that covers framing, evidence, engineering and reproducibility (the rubric’s four parts) and a path to impact.
- Review the course through its two maps (the lifecycle and the stack) and its scaling walls, with one measured number per lecture.
0.2 How this lecture differs
The Fall greenfield lectures had not happened when these notes were written. Instead of guessing their content, §2–§4 follow the course’s published project guide and each lecture’s research directions, and add what this set of notes’ experiments showed about each direction. §5–§6 are the practical core: how to get from a direction to an experiment you can run, defend and finish.
1. The project is the course
1.1 What is being asked
The project is 50% of the grade (technical quality: framing 35%, evidence and rigour 30%, engineering sophistication 20%, communication and reproducibility 15%; plus impact outside the classroom: a merged PR, a released benchmark, a preprint). Each group of four gets one full 8×H100 node for the semester. The project guide’s stated purposes:
- bring yourselves to the cutting edge;
- gain experience using and modifying modern tools for pretraining, post-training and evaluation (you must modify or develop at least one);
- intelligently leverage the scale of compute provided, and justify it;
- create concrete artifacts for your portfolio.
1.2 Two lenses
The guide views projects through a systems lens (how we train, serve and evaluate models efficiently and reliably) and a model quality / validation lens (how we design objectives, environments and evaluation signals that actually move capabilities). Many of the most interesting projects sit at the boundary: a faster RL pipeline is only interesting if its training signal is trustworthy; a new benchmark is only useful if it can be run at the scale where it matters.
2. Greenfields in performance and accelerators
2.1 End-to-end efficiency: kernels, scheduling, toolchains
The guide frames efficiency “not as a grab-bag of micro-optimizations, but as an end-to-end effort to move real service and training metrics: throughput, cost to reach a target quality, and tail latency under realistic workloads”, ideally connecting at least two layers.
- Kernels: DSLs such as ThunderKittens and CuTe DSL make it realistic to write kernels for new architectures instead of being locked into existing ones. Targets: the whole transformer block where it is memory-bound (attention and KV cache, normalization, activations, common linear patterns). Strategy: pick one stack (PyTorch + Triton, or CUDA/CUTLASS) and land small wins repeatedly so they compound.
- Serving as co-design: batching policy, KV-cache memory policy and decoding algorithm (vanilla vs speculative / multi-token), optimized for p99 TTFT and p99 tokens/s/request under realistic traces. “Optimize the system you actually run, not the system you wish you ran.”
- Course tools: the roofline and knee (Lecture 2), kernel simulation and MFU (Lecture 3), FlashAttention’s tiling (Lecture 7), the step model and serving simulator (Lecture 22), engine overheads and CUDA graphs (Lecture 23).
2.2 Architectures and optimizers that win in wall-clock
“Keep architecture/optimizer work tightly tied to measurable wall-clock metrics (time/cost to reach a target score) and deployability”, and show that quality is retained: faster only matters if it is not secretly worse. Starting points named in the guide: long-context hybrids (Mamba, Gated DeltaNet), new attention and residual variants (Differential and Gated Attention, MHLA, Deep Delta Learning, mHC, DeepSeek’s conditional-memory lookup), and optimizers (Sophia, Lion, Muon, SOAP). Open questions it highlights: hyperparameter transfer differs per optimizer, μP-style scaling is not exactly right for state-space models, mixed precision is part of the challenge, and do these conclusions change for RL vs pretraining? The guide notes “a very easy path for impact” here.
Course tools: architecture accounting (Lecture 4), hybrid-model math and ablation planning (Lecture 15), optimizer labs (Lectures 12–13). This course’s own measurement: Newton–Schulz orthogonalization is 0.58% of a 124M model’s training FLOPs (Lecture 13), so Muon’s cost is communication and memory layout, not arithmetic.
2.3 Decode hardware and heterogeneous systems
From Lecture 24: compilers for deterministic multichip systems; partitioning layers between HBM and SRAM devices; KV strategies for SRAM machines; honest tokens-per-watt benchmarks. Lecture 24’s model showed why measurement methodology matters: bandwidth-only ceilings (564,000 tokens/s per user) collapse to ~1,200 once per-layer synchronization latency is counted.
3. Greenfields in pre-training and post-training
3.1 Model composition and merging
Combining capabilities without full retraining: merging task-specialized checkpoints, composing skill vectors (starting papers: Model Soups, Task Arithmetic, TIES-Merging, and a 2024 survey). The guide’s challenge is to make merge quality measurable, reproducible and iterable rather than one magic recipe: where (pretraining, mid-training, post-training) should merging be supported; what checkpoint management, evaluation integration and sweep automation does it need; and at inference, what is the serving abstraction when “the model” is a family of composed artifacts used by concurrent users with different mixtures, and how does speculative decoding work then?
3.2 RL post-training: scaling laws, reliability, breadth
- Scaling laws for RL: how much RL data for a given model size; the optimal model size for a fixed data budget; the right balance of SFT and RL under cost and reliability constraints.
- Reliability: closing inference-engine vs training-backend logit divergence without losing much speed (Lecture 19 measured why it matters: the engine and trainer disagree, and importance corrections are needed); defeating nondeterminism in inference.
- On-policy distillation as a first-class primitive, including when the teacher is an ensemble (best-of-N, debate).
- Off-policy RL for LLMs (DDPG/SAC-style methods reuse stale data and lead in robotics; what breaks for LLMs: credit assignment, reward noise, exploration, replay bias, distribution drift, infrastructure?).
- RL with emerging optimizers: do optimizers that beat Adam in pretraining also help RL, whose objective is fundamentally different? “Even a careful negative result here can be very informative.”
Course tools: the exact RL toy (Lecture 18: e.g., at P(correct) = 0.001, 99.2% of GRPO groups of 8 carry no signal), the RL systems simulator (Lecture 19: synchronous slots 9.4% full; asynchrony and staleness), Nano’s pipeline (Lecture 20).
3.3 “Phantoms”: training proxies and distilled mini-models
Medical imaging uses phantoms, standard synthetic objects that stand in for the body during experiments. The guide asks whether an ensemble of toy problems (separately trained toys, combined toys, or tiny language models) can reliably answer hyperparameter, optimizer and training-strategy questions far more cheaply than training an LLM, beyond μP’s single-proxy learning-rate transfer. A promising variant: layer-wise distillation from a partially trained larger model (intermediate activations are much richer supervision than logits) to produce a proxy cheap enough to re-tune hyperparameters during a long run. The guide calls this higher-risk, higher-reward, with a path to impact even if results are negative.
This set of notes is, in effect, a study in phantoms (§8): Atlas World (Lecture 9) with exactly known entropy, Context World (Lecture 25) with known answers, exact RL toys (Lecture 18). Section 8 lists where they transferred and where they did not.
3.4 RL environments and evaluation you can trust
- Environments: long-horizon, hard tasks that produce a high-quality learning signal and a validation story; training and validation reward should both improve, and connect to external benchmarks or robust downstream transfer. Economic value is a forcing function for realism: long horizons, hard constraints, tool use, partial observability, outcomes hard to game. Systems integration (throughput, parallel rollouts, logging, scalable evaluation) matters.
- Evaluation: end-to-end benchmarks (multi-step, tool use, long-context retrieval, latency and cost constraints) that are hard to game; judging methodology as part of the signal. A meta-point: “evaluation often doesn’t consume enough GPUs relative to training”, and scaling eval ablations and better-curated eval data can be the main contribution.
Course tools: verifiers and environment design (Lecture 17), evaluation statistics (Lecture 16), the agent harness and its failure classes (Lecture 26), rail evaluation at realistic base rates (Lecture 27).
4. Greenfields in inference and applications
Drawn from Lectures 21–28’s research directions:
- Serving composed and adapted models: many LoRAs or merged variants under one engine; speculative decoding with drafts that match the variant (Lectures 21, 23).
- Scheduling for tails: p99 TTFT under realistic prompt-length and concurrency traces; admission, chunking and preemption policies (Lecture 22 measured a livelock and its fix); KV-aware routing with load (Lecture 23: a hot tenant pushed pure-affinity routing to a 16 s p99).
- Disaggregation and heterogeneity: when prefill/decode or attention/FFN splits pay, as a function of model, batch, context and link (Lectures 23–24).
- Context and caching economics: measuring each model’s effective context; packing policies learned from end-to-end accuracy and cost; cache-aware harnesses (Lecture 25: one timestamp in the wrong place turned a 10.92).
- Harnesses: observability of what compaction removed, evaluator quality, horizon scaling, train/eval drift for Harness RL (Lecture 26: harness choices moved success from 0.04 to 0.84 with the model fixed).
- Guardrails and open weights: rails that generalize to shifted traffic, multi-stage rails for rare events, tamper-resistant safeguards evaluated after fine-tuning (Lecture 27).
- Diffusion decoding: planners for which tokens to commit, block caches, fair NFE vs wall-clock comparisons (Lecture 28: block diffusion 7.9× AR per user at batch 1, behind AR per GPU at batch 256).
5. From a direction to a testable hypothesis
5.1 The template
- Question: one sentence a practitioner would care about (“Does optimizer X reach a target loss sooner than AdamW in wall-clock on our stack?”).
- Hypothesis with a quantity: falsifiable, with an effect size (“X reaches loss L* at least 15% sooner at 124M and 350M parameters, with the same final quality”).
- Baseline: the strongest reasonable alternative, tuned with the same budget (an untuned baseline makes any result meaningless).
- Minimal experiment: the smallest setting that can falsify the hypothesis, then one scale-up to check the trend.
- Compute budget: FLOPs → node-hours, including sweeps and seeds (§5.2).
- Success and failure criteria, written in advance, and what each outcome would teach. A negative result is informative when the baseline was strong, the measurement was sensitive enough to see the hypothesized effect, and the conditions are stated.
- Artifacts and impact: code, data, configs, and where they go (a PR to the framework you modified, a released benchmark, a preprint).
5.2 Worked compute estimates for one 8×H100 node
Peak dense BF16 is 8 × 989 TFLOP/s = 7.9 PFLOP/s; at 40% MFU (Lecture 3), 3.2 PFLOP/s sustained.
A. An optimizer or architecture comparison in pretraining. N = 124M parameters, D = 20N ≈ 2.5B tokens (Chinchilla-style, Lecture 1): C = 6ND = 6 × 1.24e8 × 2.48e9 = 1.85e18 FLOPs → 1.85e18 / 3.2e15 ≈ 580 s ≈ 10 minutes per run. A sweep of 3 optimizers × 4 learning rates × 2 seeds = 24 runs ≈ 4 hours. One scale-up to 350M at 20N (7B tokens): C = 6 × 3.5e8 × 7e9 = 1.47e19 → ~1.3 hours per run; 3 optimizers × 2 seeds at the best learning rates ≈ 8 hours. The whole study fits in about two days of the node, which leaves room for the ablations reviewers will ask for.
B. An RL post-training study. Generation dominates (Lectures 18–19). One step with 512 prompts × 8 samples × 4K response tokens generates 16.8M tokens. If generation sustains 20K tokens/s per GPU for a 1.5B model (an assumption to measure on your stack), the node generates 160K tokens/s → ~105 s per step, more with the long tail (Lecture 19: the last 10% of responses can take most of the step). The policy update costs about 6 × 1.5e9 × 16.8e6 ≈ 1.5e17 FLOPs → ~50 s. So ~150–250 s per step: 100 steps ≈ 4–7 hours per run. A scaling-law study over 3 model sizes × 3 data budgets is a week of the node, which is why the guide asks for careful planning and why asynchronous pipelines (Lecture 19) matter.
C. A serving study. Compute is cheap (one model on one GPU, traces of a few thousand requests), engineering is not: realistic traces, a strong baseline configuration of the engine, and tail metrics with confidence intervals. Most of the budget is your time; plan the measurement harness first.
5.3 Make the result legible
- Report wall-clock and cost to a target, not only final scores (the guide’s repeated point).
- Report variance: seeds, confidence intervals, sensitivity to hyperparameters.
- Report the full system: for agents, model + harness + tools + environment (Lecture 26); for serving, batch, context and caching (Lectures 22–25); for RL, the engine/trainer pair and staleness (Lecture 19).
- Keep plan vs reality notes, as every lecture’s README here does. They are where reviewers learn how much to trust the rest.
6. A project-planning checklist
Framing (35%)
- One-sentence question that a practitioner would care about; why now.
- Hypothesis with a quantity and an effect size you can detect.
- Related work read: the starting papers, plus the practitioner blogs and code where the folk knowledge lives.
- Which lens (systems, quality/validation, both) and which lifecycle stage and stack layer (§7).
Evidence and rigour (30%)
- Strong, equally tuned baseline; ablations that isolate the claimed cause.
- Metrics written down before running, including wall-clock/cost to a target and tail metrics where relevant.
- Seeds and confidence intervals; sensitivity sweeps for the hyperparameters that matter.
- Evaluation that cannot be gamed by the method (held-out data, shifted traffic, exact checkers where possible).
- Success, failure and “inconclusive” criteria written in advance.
Engineering (20%)
- Compute budget in node-hours (§5.2) with 30% slack; what gets cut if it runs over.
- At least one modern tool modified or developed (the guide’s requirement), on a stack you can profile.
- Profiling before optimizing (Lecture 3); a correctness test for every optimization (outputs identical, or bounded error).
- Checkpoints, resumability and failure handling for anything longer than a few hours (Lectures 8, 14).
Communication and reproducibility (15%)
- One command per figure; configs and seeds in the repository; environment pinned.
- Plan-vs-reality notes kept as you go.
- A short write-up a classmate could follow; figures with units.
Impact
- Where the artifact goes: a PR to which project, a benchmark release, a preprint venue; who will use it.
- Early contact with the maintainers or users of that project.
7. Course review
7.1 The two maps and the walls
The lifecycle (time): Stage 0 targets → 1 architecture → 2 pre-training → 3 post-training → 4 efficient inference → 5 applications → 6 research. Each stage emits artifacts you can name, measure and version. The stack (layers): compute substrate (GPUs, network, storage) → orchestration → distributed engines → frameworks and inference engines → workloads. When something is slow, expensive or unreliable, locate the bottleneck on both maps and choose the minimal intervention at the right layer.
The recurring scaling walls: compute, memory capacity, memory bandwidth, communication and data, with reliability as the hidden sixth. Every lecture can be read as a wall met at a stage and a layer.
7.2 One number per lecture
Every number below was measured or computed by that lecture’s code (see its README).
| # | lecture | wall / layer | a number to remember |
|---|---|---|---|
| 1 | the AI stack | memory capacity / serving | 70B with full multi-head attention at 8K context on 8×H100: 20 GiB of KV per request, batch ≤ 19 |
| 2 | roofline | bandwidth vs compute / kernel | H100 BF16 knee at ~325 tokens per step; per token, decode costs 295× more time than training for a layer |
| 3 | kernels, MFU | compute / kernel | branch divergence at p = 0.5 halves issue efficiency (50%) |
| 4 | architectures | compute and memory / model | DeepSeek-V3 activates 37.6B of 671B parameters per token |
| 5 | DP, EP, ZeRO | memory capacity / framework | 70B on 64 GPUs: 1.13 TB of training state per GPU with DDP, 17.6 GB with ZeRO-3 |
| 6 | TP, SP, PP | communication / framework | measured strong scaling of a small block: 10.5 ms on 1 rank, 15.2 ms on 4 |
| 7 | FlashAttention, CP | bandwidth / kernel | online softmax state 520 B vs 524 kB per row at 128K context |
| 8 | a training framework | reliability / framework | stop at step 12 and resume = uninterrupted, bit for bit |
| 9 | pre-training | data / workload | excess over the true entropy: story +0.011, math +0.406 bits per byte |
| 10 | data | data / pipeline | a bad-words filter removed 79.7% of benign market-topic pages |
| 11 | synthetic data | data / pipeline | rephrasing in 8 styles: fact QA 7.0% → 57.8% |
| 12 | optimizers | compute / training | gradient descent diverges at step size 2.05/λ_max (theory: 2/λ_max) |
| 13 | matrix optimizers | compute / training | Newton–Schulz is 0.58% of a 124M model’s training FLOPs |
| 14 | running a fleet | reliability / orchestration | 405B training state = 6.49 TB = 10.1 nodes; Amdahl S(1024) = 91 at p = 0.99 |
| 15 | Nemotron 3 Nano | memory / model | 256K-token cache: 1.66 GB vs 25.8 GB for a same-size MoE transformer |
| 16 | post-training | data / workload | a chat-template bug put 16% of the training signal on “write tool outputs” |
| 17 | post-training data | data / pipeline | LLM judge 85.6% vs exact checking 100% |
| 18 | RL algorithms | data (signal) / algorithm | at P(correct) = 0.001, 99.2% of GRPO groups of 8 carry no signal |
| 19 | RL at scale | compute utilization / systems | synchronous generation: slots only 9.4% full |
| 20 | post-training Nano | data / pipeline | a curriculum cut zero-signal groups from 44.7% to 29.6% |
| 21 | deployment preparation | bandwidth / model | speculative decoding 2.57× at batch 1 (α 0.8, k 3); NVFP4’s KL is half of MXFP4’s |
| 22 | serving fundamentals | memory capacity / engine | paged KV: 293 concurrent requests vs 125 with reservations |
| 23 | engines in practice | communication, scheduling / engine | KV-aware routing p99 19 ms vs 66 ms round-robin; a hot tenant: 16 s |
| 24 | decode hardware | latency / hardware | 70B per-user ceiling falls from 564,000 to ~1,200 tokens/s once sync latency counts |
| 25 | context engineering | memory, cost / application | retrieving 300 pages: accuracy 0.993 → 0.545; a misplaced timestamp: 10.92 per task |
| 26 | agents and harnesses | reliability / application | same model, seven harnesses: success 0.04 → 0.84 |
| 27 | safety and security | reliability / application | at 0.2% prevalence, 2% of a high-recall rail’s flags are right; 25 steps restore 97.5% of refused facts |
| 28 | diffusion LMs | bandwidth vs compute / decoding | block diffusion 7.9× AR per user at batch 1, behind AR per GPU at batch 256 |
7.3 Five habits that recur
- Count before you optimize: parameters, FLOPs, bytes, tokens, dollars (Lectures 1–4). Most surprises disappear once the accounting is written down.
- Know which ceiling binds: compute, bandwidth, capacity, communication or latency (Lectures 2, 22, 24, 28). The same technique wins or loses depending on which wall you are against (speculative and diffusion decoding at batch 1 vs 256).
- Measure against truth when you can: known entropies, exact checkers, exact RL optima (Lectures 9, 18, 25). Proxies (judges, likelihoods, token-level metrics) drift from what you care about.
- Treat the system as the object: data pipelines, schedulers, harnesses and rails move outcomes as much as models do (Lectures 10, 22, 26, 27).
- Report what went wrong: every README here has plan-vs-reality notes; they are evidence too.
8. What the toy worlds taught (a note on phantoms)
These notes ran every experiment on a laptop, with small models on worlds whose answers are known. Measured against the guide’s “phantom” idea (§3.3), the record is mixed and informative:
Where toys transferred: accounting and rooflines (exact by construction); the shapes of curves (excess loss by domain, knees, tails, cost growth with context); systems mechanisms (paged KV and admission livelock, prefix caching, harness failure classes, rail base rates); and exact RL quantities (zero-signal groups, length bias).
Where they did not, or only partly:
- Capabilities that need scale did not appear: no tiny transformer learned in-context lookup (an induction circuit) within a laptop budget (Lecture 25), so the reader became a memory network; the small masked-diffusion model never learned arithmetic constraints (Lecture 28).
- Effect sizes differed: the toy draft model was unusually good (acceptance 0.96, Lecture 21); the toy reader was nearly immune to distractors inside its trained length and collapsed faster outside it than LLMs do (Lecture 25).
- Numerics leaked into results: thread counts changed trained weights enough to move a speculative-decoding result (Lecture 21) and a safeguard measurement (Lecture 27); fixed threads were required for reproducibility.
The lesson for a phantom project: decide in advance which properties the proxy must share with the target (scale-free mechanisms, the shape of a curve, a ranking of methods), validate that on at least one real point, and expect capabilities with emergent thresholds to need the real scale.
9. Summary
- The project is the course’s center: one node, a falsifiable question, a strong baseline, a budget, and an artifact that leaves the classroom.
- The guide’s directions (merging, wall-clock architectures and optimizers, RL scaling and reliability, end-to-end efficiency, phantoms, RL environments, evaluation) each map onto tools built in this course.
- A hypothesis needs a quantity, a baseline, criteria written in advance, and a compute plan: a 124M-parameter comparison is ~10 minutes per run on the node; an RL scaling study is a week.
- The two maps and the walls are how to locate any problem; the five habits are how to work on it.
10. Further reading
- A Note on Fruitful Research Directions (EE 290/194 Spring 2026) and the papers it lists: Model Soups, Task Arithmetic, TIES-Merging; Mamba; Sophia, Lion; compute-optimal RL scaling; Thinking Machines’ posts on nondeterminism and on-policy distillation; DeepSeek’s conditional memory and mHC.
- Every lecture’s “Research directions” section in these notes.
- Sutton, The Bitter Lesson; Hooker, The Hardware Lottery; Hoffmann et al., Chinchilla (Lecture 1’s readings, worth rereading at the end).
术语表 (Glossary, English → 中文)
| English | 中文 |
|---|---|
| research greenfield | 研究空白领域 |
| systems lens / validation lens | 系统视角 / 验证视角 |
| testable hypothesis / effect size | 可检验假设 / 效应量 |
| baseline / ablation | 基线 / 消融实验 |
| negative result | 负面结果 |
| compute budget / node-hours | 算力预算 / 节点小时 |
| wall-clock to target | 达到目标所需的实际时间 |
| model merging / task arithmetic | 模型合并 / 任务算术 |
| on-policy distillation / off-policy RL | 同策略蒸馏 / 异策略强化学习 |
| training proxy (“phantom”) | 训练代理(“体模”) |
| layer-wise distillation | 逐层蒸馏 |
| RL environment / validation reward | 强化学习环境 / 验证奖励 |
| benchmark construction / gaming | 基准构建 / 刷分 |
| lifecycle / stack | 生命周期 / 技术栈 |
| scaling wall | 扩展瓶颈(墙) |
| minimal intervention at the right layer | 在正确层级做最小干预 |
| reproducibility / artifact | 可复现性 / 产出物 |