Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A practical field guide to running large language models in production: it connects Transformer internals to the engineering decisions—batching, KV cache, serving frameworks, and deployment architecture—that determine whether an LLM service is fast, affordable, and reliable. Best for engineers and architects who already know some ML and now need to operate LLMs at scale.
【Book Arc】
- **Opening (~0%–10%)**: Frames the book’s narrow scope—serving and optimization, not ML fundamentals—and situates serving within the model lifecycle (training → deployment → serving → optimization). It explicitly tells readers new to transformers to pair it with a general LLM introduction.
- **Early (~10%–30%)**: Establishes serving fundamentals: what model serving is, on-device vs. on-premises vs. cloud trade-offs, and classic paradigms such as single-model and multi-model services. A first vLLM command previews later optimization topics.
- **Early–Middle (~30%–45%)**: Opens the model itself from a serving perspective—tokenization, decoder-only Transformer blocks, attention, and autoregressive generation—then walks through manual inference, KV caching, prefill/decode phases, and the jump to vLLM with measured batching gains.
- **Middle (~45%–60%)**: Moves into system design: wrapping inference in a real web service, tracking prompts as sequence objects, batching logic, and token streaming workflows that decouple client requests from backend execution.
- **Late (beyond ~60%; excerpts thin)**: The table of contents points to enterprise serving layers, build-vs-buy strategies, latency/throughput measurement, and optimization challenges around customer experience and cost—but the excerpts do not cover this material in depth.
- **Ending (not covered in excerpts)**: Later chapters on frameworks, practical guidance, and future directions are referenced in the preface but absent from the sampled text.
【Key Takeaways】
- **Serving is a distinct engineering discipline from training** (Early): training minimizes loss; serving maximizes efficient, reliable inference on new input, with different frameworks, constraints, and goals.
- **Deployment location is a trade-off, not a default** (Early): on-device serving wins on latency and privacy but loses on compute, power, update cadence, and hardware consistency; when those constraints dominate, serving shifts to on-premises or cloud.
- **Serving frameworks earn their place through systems features** (Middle): KV-cache reuse, request scheduling, concurrency, streaming, and cancellation—not just raw inference—are what vLLM and similar tools abstract away.
- **Batching is the first big throughput lever** (Middle): the book’s vLLM experiment shows roughly 2.2× throughput from batching four prompts versus running them one by one, with continuous batching cited as a far larger gain.
- **Prefill and decode are different workloads** (Middle): understanding the two phases and KV caching is the conceptual key to reasoning about latency and memory later in the book.
- **Decouple user requests from model execution** (Middle): representing each prompt as a sequence object lets the backend reorganize work for dynamic batching and prioritization—an architectural pattern, not just an optimization.
- **Measure before optimizing** (Early): the book treats latency and throughput metrics and measurement best practices as prerequisites, tying optimization to customer experience and cost efficiency.
- **Build vs. buy is a spectrum** (Early): the contents outline options from fully managed foundation-model serving to bringing your own model, code, or serving image—knowing how to build informs the choice even when you won’t build.
【Reading Tips】
- **Skim Chapter 1’s paradigm survey if you already run services**; deep-read the Transformer-from-a-serving-perspective section, since later optimization chapters depend on KV cache and prefill/decode intuition.
- **Run the code**: the manual inference and vLLM batching examples are short and make the throughput claims concrete; the timing comparisons are the book’s most tangible payoff.
- **Treat the table of contents as a map**: enterprise layering, build-vs-buy, and measurement chapters are where architecture decisions live—budget real time there rather than rushing the early fundamentals.
- **Pair with a general LLM text** if attention or transformers are new; the book deliberately explains only enough to connect to serving decisions.
【Coverage Limits】
This guide is based on stratified excerpts covering roughly the first half of the book; the later optimization, enterprise architecture, and framework chapters are visible only through the table of contents and are not summarized here.
Page 7
odel Deployment 136 Option 3: Bring Your Own Model 138 Option 4: Bring Your Own Code 141 Option 5: Bring Your Own Serving Image 144 Option 6: Build Your Own...
on the training data. (inference) on new input efficiently. Computation Extremely compute-intensive, involving iterative model Focused on efficient forward p...
the LLM token generation is handled by the tokenizer, which takes raw input text (prompt) and does the following: • Breaks it into discrete tokens based on a...
rity: cost and latency. A Cost-Optimized Multi-Model Design Let’s first look at a cost-efficient multi-model architecture (Figure 3-11) that derives from the...
and FP8 (8 bit) are lower-precision numerical formats used in deep learning models. Because FP8 is half the size of FP16, computation can be almost twice as...
complex process. Recall what you learned in Chapter 2: when an LLM processes input and then generates output, it goes through two distinct pha‐ ses: prefill...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Hands-On LLM Serving and Optimization Hosting LLMs at Scale (Chi Wang, Peiheng Hu)(Z-Library) (1)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
Hands-On LLM Serving and Optimization Hosting LLMs at Scale (Chi Wang, Peiheng Hu)(Z-Library) (1)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Hands-On LLM Serving and Optimization Hosting LLMs at Scale (Chi Wang, Peiheng Hu)(Z-Library) (1)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment