Lesson deck

Distributed serving, engines and hardware flashcards

Reviewing needs JavaScript. You can read every card in the list below.

Loading your cards...

Back to the lesson13 cards in this deck

Read all 13 cards as a list
  1. Front
    What is the layout rule of thumb?
    Back
    Use the smallest parallelism that fits and meets the target, then scale out with replicas. Fewer GPUs means less communication, so consider quantization before adding GPUs.
  2. Front
    TP, PP, DP, EP: what is split and what is communicated?
    Back
    TP: matrices in each layer, all-reduces inside layers. PP: groups of layers, activations between stages. DP: nothing split, no per-request traffic. EP: experts, all-to-all token routing.
  3. Front
    Where should TP and PP live?
    Back
    TP inside a node on fast links (NVLink). PP across nodes. Without NVLink, vLLM's guidance prefers pipeline parallelism. A token still crosses every pipeline stage.
  4. Front
    How much does TP communication add?
    Back
    Two all-reduces per layer per token in the standard split (252 for a 126-layer model). They are small messages, so latency dominates; at an assumed 10 µs each, about 2.5 ms per step.
  5. Front
    Do the layout arithmetic for a 405B model.
    Back
    Cache 504 KiB per token. 8-bit weights 405 GB on 8 H100: about 139 GB of cache, about 32 sequences of 8,192 tokens, step floor about 15 ms. BF16 (810 GB) needs larger-memory GPUs such as H200.
  6. Front
    Active versus total parameters in MoE?
    Back
    Compute per token follows active parameters; memory and, at larger batches, bandwidth follow total. Mixtral 8x7B: 47B total, 13B active. DeepSeek-V3: 671B total, 37B active.
  7. Front
    How much of an MoE layer does a batch touch?
    Back
    With top-2 of 8 uniform routing, 1 − (3/4)^B: 25 percent at batch 1, 90 percent at 8, 99 percent at 16. A step then reads nearly all expert weights.
  8. Front
    Why do MoE deployments show p99 spikes?
    Back
    Expert parallelism waits for the slowest GPU, and hot experts (imbalanced routing) create stragglers. Mitigate with expert replication, balanced routing and routing-aware batching.
  9. Front
    How do you serve many fine-tunes on one GPU?
    Back
    Keep one base model resident and load small LoRA adapters on demand, batching across adapters. A rank-16 adapter on four projections of an 8B model is about 27 MB, 0.17 percent of the base.
  10. Front
    What are the costs of multi-LoRA serving?
    Back
    Adapter load latency, cache pressure, separate prefix caches per adapter (the adapter changes keys and values), and wasted memory from an oversized maximum rank setting.
  11. Front
    How do you choose an engine?
    Back
    Support for your model, quantization, adapters and structured output; performance on your own length distribution at your target latency; operational maturity; hardware lock-in. Check status: TGI was archived 2026-03-21.
  12. Front
    Which four hardware numbers matter?
    Back
    Memory capacity (what fits), bandwidth (decode speed), low-precision compute (prefill and large batch), interconnect (TP and EP scaling). Compare numbers on the same basis; datasheet peaks are often "with sparsity".
  13. Front
    Why is self-host cost at full load misleading?
    Back
    Cost per token scales with 1 / utilization. $2.50 per hour at 2,500 tokens per second is about $0.28 per million at full load and about $0.93 at 30 percent (illustrative).