LLM推理系统问答

题集来源:阿东玩 AI(Adong)收录项目:AgentGuide查看原题集

题目目录

70 道原题
  1. What is the difference between prefill and decode in LLM inference, and why does it matter for system design?

    原题
  2. Explain the iron triangle of inference. How would you make a decision when optimizing for a latency-sensitive chatbot application?

    原题
  3. Why is memory bandwidth, rather than raw compute (FLOP/s), typically the bottleneck in LLM decoding?

    原题
  4. How do you measure and report inference performance? What metrics would you instrument in a production serving system?

    原题
  5. A colleague argues that since FLOP/s keeps growing faster than memory bandwidth, inference will soon be compute-bound. How do you respond?

    原题
  6. Explain the difference between HBM bandwidth and NVLink bandwidth. When does each become the bottleneck?

    原题
  7. Why does Apple Silicon perform competitively for LLM inference despite lower peak FLOP/s than discrete GPUs?

    原题
  8. What is the significance of Tensor Core formats (FP16 vs INT8 vs FP8) for inference? When would you choose each?

    原题
  9. How would you profile an LLM inference workload to identify whether it is compute-bound or memory-bandwidth-bound?

    原题
  10. Describe the trade-offs between deploying inference on a Groq LPU versus an NVIDIA H100.

    原题
  11. Explain Multi-Query Attention vs. Grouped Query Attention. Why are they important for inference?

    原题
  12. Walk me through what happens to the KV cache during a 1000-token generation on a 7B model.

    原题
  13. What is the attention complexity bottleneck and how do modern systems address it?

    原题
  14. How does RoPE enable context length extrapolation? What goes wrong if you naively extend context beyond training length?

    原题
  15. Why is the decode phase memory-bandwidth-bound while prefill is compute-bound? What are the implications for serving system design?

    原题
  16. You need to deploy a 70B LLM on 2 A100 80GB GPUs. What quantization strategy would you choose and why?

    原题
  17. Explain the difference between weight-only quantization and weight-and-activation quantization. When does each apply?

    原题
  18. What is the Straight-Through Estimator and why is it needed for QAT?

    原题
  19. How does SmoothQuant address the activation outlier problem? What are its limitations?

    原题
  20. Compare GPTQ and AWQ. Which would you use in production and under what conditions?

    原题
  21. Prove that speculative decoding produces outputs from the same distribution as the target model.

    原题
  22. What is the acceptance rate α in speculative decoding, and what factors influence it?

    原题
  23. How does Medusa differ from a separate draft model approach? What are the trade-offs?

    原题
  24. In what scenario would you not recommend speculative decoding?

    原题
  25. Describe the EAGLE architecture and explain why it achieves higher acceptance rates than basic Medusa.

    原题
  26. Explain PagedAttention. How does it differ from pre-allocated contiguous KV cache management?

    原题
  27. How does prefix caching work, and what kind of application benefits most from it?

    原题
  28. What is the attention sink phenomenon? Why does naïve sliding window attention fail for StreamingLLM?

    原题
  29. How would you design a KV cache eviction policy for a system serving requests with highly variable lengths?

    原题
  30. Explain KV cache quantization. Can you quantize the KV cache more aggressively than model weights? Why or why not?

    原题
  31. Explain why FlashAttention is faster than standard attention. What is the key bottleneck it addresses?

    原题
  32. What is kernel fusion and why does it improve inference performance?

    原题
  33. How does the online softmax trick enable tiled attention computation?

    原题
  34. What improvements did FlashAttention-3 introduce for the H100, and how does it exploit H100-specific features?

    原题
  35. When would you use Triton instead of writing raw CUDA? What are the trade-offs?

    原题
  36. Explain continuous batching. Why is it superior to static batching for LLM serving?

    原题
  37. What is “prefill piracy” and how does chunked prefill address it?

    原题
  38. Describe the architecture of vLLM. What are its key innovations and where are its limitations?

    原题
  39. How does disaggregated prefill/decode serving work? What are the engineering challenges?

    原题
  40. What metrics would you use to evaluate and compare two LLM serving systems?

    原题
  41. Explain tensor parallelism for a transformer’s MLP block. What communication collectives are required and when?

    原题
  42. When would you choose tensor parallelism over pipeline parallelism for inference?

    原题
  43. Explain the expert routing mechanism in an MoE model. What challenges does it create for inference serving?

    原题
  44. How does pipeline bubble fraction affect pipeline parallelism efficiency? How is it mitigated?

    原题
  45. What is expert offloading for large MoE models, and what are its performance implications?

    原题
  46. How does Ring Attention achieve distributed long-context inference? What is its communication cost?

    原题
  47. Compare Mamba (SSM) and Transformer attention for long-context inference. When would you use each?

    原题
  48. How does LLMLingua compress prompts? What are the risks of prompt compression?

    原题
  49. Explain the difference between YaRN and NTK-aware scaling for RoPE context extension.

    原题
  50. What is RAG, and how does it relate to long-context inference? When would you choose one over the other?

    原题
  51. You are asked to deploy a competitive language model on a smartphone with 6 GB RAM. What is your approach?

    原题
  52. Explain Apple MLX and why it is well-suited for LLM inference on Apple Silicon.

    原题
  53. What is the k-quant system in llama.cpp? How does it differ from standard uniform quantization?

    原题
  54. Compare llama.cpp CPU inference vs GPU inference. When would you prefer CPU inference?

    原题
  55. What is Hardware-Aware NAS? How does OFA (Once-For-All) enable efficient edge deployment?

    原题
  56. What is inference-time compute scaling? How does it differ from training-time compute scaling?

    原题
  57. Explain Process Reward Models (PRMs). How do they differ from Outcome Reward Models (ORMs)?

    原题
  58. What is Best-of-N sampling? When is it efficient and when is it not?

    原题
  59. Describe the GRPO training objective used in DeepSeek-R1. How does it differ from PPO?

    原题
  60. For a math tutoring application, would you use a larger base model or a smaller model with extended inference compute? Justify your answer.

    原题
  61. How would you debug a sudden TTFT p99 spike in a production LLM serving system?

    原题
  62. What is goodput and why is it more meaningful than raw throughput or individual metric SLO compliance?

    原题
  63. How would you design an A/B testing framework for comparing two LLM versions in production?

    原题
  64. Explain how you would capacity plan for an LLM serving system expecting 10× user growth in 6 months.

    原题
  65. How would you measure and improve Model FLOP Utilization (MFU)?

    原题
  66. How do diffusion language models generate text differently from autoregressive models? What are the inference implications?

    原题
  67. What is Mixture of Depths? How does it enable adaptive inference compute?

    原题
  68. Why might photonic computing change LLM inference fundamentally? What are the current limitations?

    原题
  69. How does multi-token prediction improve both training and inference efficiency?

    原题
  70. Describe an “inference-first” model design philosophy. What architectural choices reflect this approach?

    原题