Skip to main content
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

  1. Core principle of FlashAttention and its mathematical derivation
  2. What optimization strategies does FusedAttention use?
  3. Why is RMSNorm faster than LayerNorm?
  4. How many fully connected layers does a Llama model contain?
  5. Describe Llama2’s inference flow; which operators does each layer include?
  6. Design a more flexible and efficient GPU-memory allocator than cudaMalloc (cudaAllocator)

C++ basics

  1. What important new features did C++11 introduce?
  2. Categories of smart pointers and their characteristics
  3. How does unique_ptr guarantee unique ownership?
  4. After shared_ptr’s reference count hits zero, when does destruction run?
  5. Can a class member function be defined as a template function?
  6. Definitions and differences of lvalues and rvalues

CUDA programming

  1. What programming models or styles does CUDA provide?
  2. Functional differences between Tensor Core and CUDA Core

Coding

  1. Longest Consecutive Sequence (LeetCode 128)
  2. Longest Substring with At Most K Distinct Characters (LeetCode 340)