T0 Big tech Baidu Internship Round 1
Baidu AI Infra internship first round (1)
Real Baidu AI Infra internship first-round interview questions covering inference, operator optimization, and HPC
Inference optimization Operator optimization High-performance computing
Large-model inference
- Core principle of FlashAttention and its mathematical derivation
- What optimization strategies does FusedAttention use?
- Why is RMSNorm faster than LayerNorm?
- How many fully connected layers does a Llama model contain?
- Describe Llama2’s inference flow; which operators does each layer include?
- Design a more flexible and efficient GPU-memory allocator than cudaMalloc (cudaAllocator)
C++ basics
- What important new features did C++11 introduce?
- Categories of smart pointers and their characteristics
- How does unique_ptr guarantee unique ownership?
- After shared_ptr’s reference count hits zero, when does destruction run?
- Can a class member function be defined as a template function?
- Definitions and differences of lvalues and rvalues
CUDA programming
- What programming models or styles does CUDA provide?
- Functional differences between Tensor Core and CUDA Core
Coding
- Longest Consecutive Sequence (LeetCode 128)
- Longest Substring with At Most K Distinct Characters (LeetCode 340)