SkyPilot
Cloud orchestration as an optimization problem: resources, regions, spot instances, Kubernetes, jobs, and the control loops that make them practical.
The Library · 文库
一个分门别类的索引, 收齐了我写过的东西。 代码精读和论文精读是 /sources 下自成一体的 HTML 深读; 教程和博客是中英双语的 blog 长文; 实验是可复现的 kernel 与系统性能记录, 连原始数据一起存档。 五个栏目, 一张地图。
Cloud orchestration as an optimization problem: resources, regions, spot instances, Kubernetes, jobs, and the control loops that make them practical.
A serving-system read focused on runtime structure, request scheduling, cache management, routing, and the boundary between Python control and fast inference paths.
The wrap-up of the initial serving trilogy: scheduler pressure, PagedAttention, KV memory, batching, and how design choices compare against SGLang.
A smaller codebase read as a teaching artifact: what a minimal implementation makes explicit, what it hides, and how to learn from that compression.
A descent into hand-written AMD GPU assembly: CDNA3 idioms, occupancy, memory movement, instruction selection, and the optimization patterns behind fast kernels.
A Python DSL with typed MLIR underneath: layout algebra, copy and MMA atoms, compiler boundaries, and what it takes to express production GEMM from Python.
A tuner-first reading of MoE GEMM search: config space, benchmarking discipline, hardware assumptions, and why tuning code is often kernel knowledge in disguise.
A field guide to AMD instruction-level profiling: rocprofv3 capture, Advanced Thread Trace, source mapping, and how to read the viewer panels without fooling yourself.
A source-level reading of goal mode as a thread-scoped state machine: persisted goals, model tools, runtime continuation, token budget accounting, and authority boundaries.
A source-level map of AITER's active CI: workflow routing, kernel families, shape pressure points, and the downstream gates that turn kernel tests into system tests.
A Claude Code plugin that wraps an agent in a shell-hook control loop with an independent Codex reviewer: the phase is a filename, a dozen cheap gates guard one expensive review, and a feedback controller trips circuit breakers when progress stalls.
A speculative-decoding draft model trained by plain SFT plateaus — it never sees its own mistakes. Draft-OPD teaches it from its rejected guesses: target-assisted rollout, error-position replay, and an acceptance-aware forward/reverse-KL objective. +23% over EAGLE-3, +13% over DFlash, with every number checked against the source.
How SGLang serves million-token prompts with pipeline parallelism: the communication-volume math, the bubble ratio, async P2P, and the dynamic chunking that equalizes per-stage time. A first-principles rebuild of the LMSYS post.
Agentic RL without rewriting the harness: proxying LLM API calls, asynchronous staging, prefix merging, and what SWE-Bench tells us about scalable agent training.
A close read of agentic GPU kernel development: plan-execute-verify loops, KernelWiki, ncu-guided debugging, autotuning, and reward-hacking failure modes.
One binary matrix over GF(2) as the organizing principle for tensor layouts: conversion, broadcast, swizzling, slicing, and robust code generation.
How kernel autotuning is designed in Triton, used in aiter / quack / CuteDSL, and consumed by engines like SGLang — and from all of it, how to design FlyDSL's autotune, with a concrete implementation guide.
A systems primer for the path from Python to GPU execution: compiler layers, kernel boundaries, IR, runtime dispatch, and what each layer is responsible for.
Full, Sparse, and Linear attention from first principles — up through DeepSeek NSA and Gated Linear Attention, with the tradeoffs that decide each one.
The first thing to understand before optimizing inference: what KV cache is, how it differs from model weights, and how each scales with sequence and batch.
How to actually compute LLM memory on a GPU — the components, worked 7B/70B examples, and how DP / TP / PP / EP and ZeRO change the arithmetic.
A first-principles guide to SFT and RL post-training: loss and label masking, dataset construction, hyperparameters, RLHF, and the common pitfalls.
The Transformer rebuilt from three angles at once — the math, runnable PyTorch, and the design rationale behind self-attention, LayerNorm, and the MLP.
A 450-minute launch-parameter search plus an 18-point characterisation of the winning recipe — why every throughput decision reduces to accepted tokens over step latency.
A measured benchmark of EAGLE3 speculative decoding on Qwen3-Coder-30B-A3B — where the 1.87× speedup comes from and why code generation benefits most.
A working comparison of two RL post-training frameworks — algorithms, engineering quality, MoE support, and ROCm fit — with a reasoned pick for MI300X / MI355X.
Building a server-based, multi-turn RL system that generates Triton kernels across NVIDIA and AMD — architecture, SFT+RL methodology, results, and roadmap.
A follow-up note beneath the FlyDSL layout algebra: what BasisAttr and Fly_Basis are, why layouts need them, and where to start completing the surface.
A first-principles read of Yan Bai's 128K-context MoE RL recipe — Path B recompute, linear cross-entropy, FSDP2, chunked EP overlap — re-derived, fact-checked, and mapped onto MI300X / MI355X.
TokenSpeed uses 17.6% less non-collective device time in graph-off traces, yet is 1.14x slower in graph-on batch-1 serving and about 3.7x slower at concurrency 8/32. Pinned code links and three follow-up experiments separate what the data proves from the leading host, scheduler and FlatKV hypotheses.
Attributing decode and prefill GPU time to KDA, full attention and MoE across 1K–1M context on 8x MI355X — 74% of the layers turn out to cost 9–24% of the time, and a KDA layer is only the cheaper of the two above ~4K decode / ~8K prefill.
A tuned and un-tuned sweep of Quack's CuTe DSL RMSNorm forward and backward kernels across 90 cells on two idle Hopper GPUs — and why the analytical config ladder gives up 17% on the widest backward row.
Code, Paper & Experiments open as self-contained HTML deep dives (each carries its own EN / ZH toggle). Tutorial & Blog open as bilingual blog pages. Search across everything, or filter by shelf. Try: MLIR, ATT, MoE, PagedAttention, agent RL, GF(2), RLHF, Codex, RMSNorm.