T0 Big tech Baidu Internship Round 1
Baidu AI Infra internship first round (3)
Real Baidu AI Infra internship first-round interview questions covering inference and operator optimization
Inference optimization Operator optimization
Distributed training
- Explain what TP, PP, and DP mean and how each runs
- How do you choose a parallel strategy based on TP vs PP communication cost?
Quantization
- Explain differences among per-tensor, per-channel, and group-wise quantization granularities
- Accuracy differences across quantization methods, and why group-wise can further cut quantization error
- Compute-cost comparison across quantization methods and optimization techniques
- How do you handle outliers during quantization?
- Introduce the core ideas of GPTQ, AWQ, and SmoothQuant
- Principle and implementation of KV Cache quantization
Attention and inference optimization
- What is FlashAttention’s acceleration principle?
- Main differences between FlashAttention v1 and v2
- Bc-block tiling strategy in FlashAttention, and how 1-loop FlashAttention is implemented
- Design idea of PagedAttention
- Differences between large-model prefill and decoding stages, and why they differ
- What problems does FlashAttention have in decoding? How does FlashDecoding improve it?
Operator implementation
- Concrete implementation of RMSNorm
- General approach and methodology for CUDA Kernel optimization
- Given Conv2D input [C=64, W=64, H=128], 3x3 kernel, output [C=128, W=64, H=128], compute parameter count and FLOPs
- What methods exist for operator optimization on CPU (e.g. AVX-512)?
C++ basics
- Categories of smart pointers and their use cases
Coding
- Implement a CUDA LayerNorm Kernel