Modeling · Language · Systems
Hi, I’m Leon Liu.
I bring over a decade of experience in NLP, machine learning, and AI systems.
I build ML systems from 0 to 1 and scale them from 1 to 100—from an initial idea and working prototype to production systems that grow with the workload. My work spans model development, data and training pipelines, and infrastructure for training and serving large-scale AI models, including LLMs and multimodal models.
This blog brings that perspective to technical explanations. I work through the math, read the source, and trace concrete examples so readers can understand both how a model works and how it runs.
What I bring
- Modeling and evaluation. A foundation in machine learning, deep learning, and NLP, with attention to the objective, data, optimization, and how to evaluate whether a model solves the problem.
- Large-scale AI systems. Building systems for model training and inference, including data pipelines, training infrastructure, and production serving for LLMs and multimodal models.
- Depth across models and systems. My technical focus includes LLM and multimodal architectures, post-training, inference engines, and the tradeoffs between model quality, latency, memory, and compute.
- Making complex ideas understandable. Source-grounded walkthroughs with code, worked examples, and diagrams that connect mathematical ideas to implementation.
Explore my writing
The articles are organized around a connected set of questions: how do we build models, train and improve them, and serve them efficiently? Start with a topic below, then follow its series from foundations to implementation.
Featured · Two four-part series
LLM inference: read the engine, follow the request
Walk through nano-vLLM and Mini-SGLang from a request to GPU execution: scheduling, prefill and decode, KV-cache allocation, prefix reuse, tensor parallelism, and CUDA graphs.
- nano-vLLM, Parts 1–4 — begin with the scheduler, then follow cache addresses, Qwen3 execution, and the whole engine. Continue: Part 2 · Part 3 · Part 4
- Mini-SGLang, Parts 1–4 — trace the serving architecture, overlap scheduling, radix-prefix reuse, and the Engine forward pass. Continue: Part 2 · Part 3 · Part 4
- Modern LLM inference — the broader picture of workloads, bottlenecks, and optimization.
Build an LLM from scratch
My notes on Stanford’s language-modeling course connect tokenization and Transformer design with resource accounting, distributed training, scaling, data, evaluation, and alignment.
PyTorch & deep learning foundations
Understand what a deep learning framework does under the hood. These CMU Deep Learning Systems notes build a small framework and explain autograd, modules, optimization, and neural-network implementations in NumPy and PyTorch.
DeepSeek: architecture & reasoning
Read the ideas behind DeepSeek’s base and reasoning models, with paper walkthroughs and implementation examples connecting model architecture to training choices.
Reinforcement learning & LLM post-training
Follow the connection from value functions and policy gradients to actor–critic methods, PPO, GRPO, and aligning language models.
GPU programming & efficient ML systems
Connect model computation to hardware: GPU memory and execution, coalescing, tiling, Triton kernels, quantization, and deployment constraints.
AI agents & harness engineering
Look beyond the model call to the software that supports an agent: execution environments, tool interfaces, orchestration, context, and memory.
A broader modeling perspective
I also write about NLP evaluation, recommender systems, distributed systems, and robot learning. The common thread is understanding the model, the evidence behind it, and the engineering needed to put it to work.
Some articles are original code walkthroughs; others are study notes built around courses and papers. I aim to make each one useful to engineers moving from a high-level idea to the details that determine its behavior.
Beyond work
Outside AI, I enjoy sports, music, photography, and travel. The photos on this blog come from my Unsplash and Pexels pages.