好文集ChatGPT Plus¥119

AI 工程师面试:大厂反复考的 25 道通用题

文章目录

面 AI 岗有个好消息:各家公司考的题高度重合。OpenAI、Meta、DeepSeek、NVIDIA、Anthropic……翻来覆去就是同一批题。先刷这部分,性价比最高。

LLM 内部原理

  • scaled dot-product attention:1/√d_k 缩放因子到底在干什么

  • KV cache:是什么,大规模 serving 时内存怎么算,公式推一遍(OpenAI、xAI、Mistral、Amazon、Apple、NVIDIA、Together、Character.AI 都在考)

  • MQA / GQA:是什么,牺牲了什么换来了什么(Meta、Mistral)

  • MLA:是什么,DeepSeek 为什么要搞它(DeepSeek、Moonshot)

  • FlashAttention:FLOPs 一点没少,为什么就是更快(Together)

  • BPE:原理,以及它在数字、代码、非拉丁文字上的翻车现场

  • 位置编码演进史:sinusoidal → learned → RoPE → ALiBi;RoPE 配 position interpolation / YaRN 怎么把 context 拉长(Meta、Moonshot、Alibaba)

  • Chinchilla scaling laws:说了什么,跟之前的直觉哪里不一样(Anthropic)

  • MoE:架构长什么样,怎么做到"容量涨、FLOPs 不涨"(Mistral、Cohere、DeepSeek、Moonshot、Zhipu、Alibaba)

  • pre-training、SFT、preference optimisation 三者的区别(Meta、Scale AI)

  • 解码策略大乱斗:greedy / beam search / top-k / top-p / temperature,各自在什么时候翻车(DeepMind、Apple、Perplexity)

  • lost-in-the-middle:长 context 中间的信息为什么会丢,怎么治(Moonshot)

  • LayerNorm 为什么现在都放 pre-block,RMSNorm 又是什么

  • SwiGLU:gated activation 怎么把 ReLU/GELU 拍在沙滩上的(Meta)

  • 终极大题:tensor by tensor 手推一遍 decoder-only transformer 的 forward pass(Anthropic)

推理、部署与 GPU 性能

  • prefill vs decode:为什么 prefill 吃算力、decode 吃显存带宽

  • continuous (in-flight) batching:是什么,凭什么取代 static batching(Anthropic、xAI、Mistral、NVIDIA、Together)

  • PagedAttention:解决 KV cache 碎片化的什么问题(NVIDIA、Together)

  • speculative decoding:为什么输出质量不变,什么时候白给(NVIDIA、Together)

  • prefix / prompt caching:什么时候用,什么情况下缓存失效(Moonshot、Character.AI)

  • 量化鄙视链:FP16 / BF16 / FP8 / INT8 / INT4 / FP4,每往下一档会坏什么

  • 并行策略全家桶:tensor / pipeline / data / sequence / expert parallelism,什么时候混着用(DeepMind、Meta、Amazon、NVIDIA)

  • 算数题:70B 模型 serving 要多少显存——weights、KV cache、activations、fragmentation 一项项算(NVIDIA)

  • 延迟指标:TTFT / TPOT / ITL / throughput 各是什么,互相怎么 trade-off(Microsoft、Apple、Perplexity)

清单还没完

同一份题库里还有:RAG and Retrieval、Agents and Tool Use、Fine-Tuning / Post-Training / Alignment、Evaluation and Observability、Safety & Security、Multimodal / Speech、AI System Design、Coding and Data Structures。按上面的刷法,一个个过。

全文完
查看原文

沿着这个主题继续读

从一篇文章,找到相关的教程、经验和阅读路径。

AI 岗位与求职AI 时代的新岗位与求职:FDE、Agent 工程师、AI 产品经理的能力要求和面试准备。