ML 八股速查

一题一页的 ML 面试速查:先用中文讲清概念,再给 30 秒英文答案、推导、必答点和追问。每个知识点标出哪家公司的面经考过,可以按来源和分类筛选。

Training Infra 速成课11 课,从单卡训练一路讲到 Megatron 的 TP × PP × CP × EP × DP

写给 infra 零基础、要面训练框架岗的人。例子是一次 Qwen3-VL-8B 全参 SFT(32 张 H100,DeepSpeed),从单卡开始,每一版只修上一版的一个问题。

主线:一条 version chain

例子用你在 TikTok 做的 Qwen3-VL-8B 全参 SFT。为了好算取 \(\Psi \approx 8\)B。它的 LLM 部分 h = 4096、36 层。从单卡开始,每一版只修上一版的一个问题。v3 大致就是你当时的 setup,v4 以后是 Megatron 为 70B 以上的模型做的事。

版本做了什么解决了新问题课
v0单卡、fp32小模型能跑8B 的 model state 要 128 GB,超过 80 GB;就算放得下也跑得慢1
v1BF16 + activation checkpointing + FlashAttention更快,activation 小一到两个数量级128 GB 的 model state 一点没少2
v2DDP:32 卡各放一份,切 batch,all-reduce gradient快约 32 倍每卡还是 128 GB3、4
v3ZeRO / FSDP:model state 切到 32 卡每卡最少 4 GBactivation 不切;DP 卡数受 global batch 限制4
v4TP(机内)+ SP每层的矩阵和 activation 都切成 t 份每层都要同步 all-reduce,出不了机器5
v5PP(跨机)按层切,跨机只传段边界的 activationpipeline bubble6
v6CP(长序列)、EP(MoE)视频长序列、MoE 的 expert 放得下KV 传递、all-to-all7
v7拼成 TP × PP × CP × EP × DP,再加 overlap、FP8万卡规模,MFU 40% 左右怎么选配置,出问题怎么查8

第 0 课是所有课的地基(算和搬),第 9 课把前面的内容对到 Megatron Core 源码和你的 RL 经历,第 10 课是手写题和项目故事。

课程

CPSC 4880 Frontier LLMs 期中复习Yale 课程期中的问答复习,59 题:架构、预训练、后训练和论文复述

Yale CPSC 4880(Frontier LLMs,2026 秋)期中的问答式复习。点开题目看英文答案;带链接的题在速查页里讲全了。

标签重点 大方向的概念题,32 题 · Quiz 课上 quiz 原题 · Review:paper review 题 · Guide:study guide 原文 · Lec:lecture 内容 · 讨论:课堂讨论题

架构

A1Attention 的代价

论文Attention Is All You Need, FlashAttention

A1.2为什么 prefill 是 compute-bound、decode 是 memory-bandwidth-bound?这对优化方向意味着什么?GuideTransformer
  • Prefill is compute-bound: each forward pass processes many tokens, so weights read once are reused many times, and cost follows compute.
  • Decode is memory-bound: each pass produces one token, so at small batches most cost is reading weights and the KV cache.
  • Optimizing decode: read fewer bytes per step (GQA/MLA, fixed-size state, sparse reads, quantization).
  • Optimizing prefill: cut compute or, like FlashAttention, slow-memory traffic.

A2缩小 KV cache

论文GQA, DeepSeek-V2 (MLA)

A3用固定大小状态替代 KV cache

论文Mamba, Mamba-2, MiniMax-01, Kimi K3

A3.1SSM(如 Mamba)处理长文本相对 Transformer 的主要优势是什么?代价是什么?QuizTransformer
  • Advantage: history is compressed into a fixed-size state updated once per token, so each generated token costs constant time and memory, with no growing KV cache. Training stays linear and parallelizable.
  • Cost: a finite state has limited capacity, so arbitrary lookup over long context gets worse. It recalls exactly only what fits.
  • Caveat: constant is not small. At short context the state can exceed a KV cache.
A3.2序列变长时,KV cache 和 SSM state 的显存分别怎么增长?ReviewTransformer
  • KV cache: grows linearly with length, because every token adds K and V at every attention layer. Memory and per-step reads are O(n).
  • SSM state: fixed size set by model dimensions, so memory is O(1) in length.
  • Hybrids: their few attention layers still keep KV caches, so memory grows, just more slowly.
A3.3Mamba 的 selection 是什么?为什么需要?LecTransformer
  • What: SSM parameters depend on the current input: what to write into the state, what to read out, and how much old state to keep.
  • Why: earlier SSMs updated the same way for every token, so filler wore away important information.
  • Effect: Mamba can ignore irrelevant tokens and keep relevant ones regardless of distance.
A3.4Mamba-2 的核心想法(SSD)是什么?相比 Mamba-1 牺牲了什么、换来了什么?ReviewTransformer
  • SSD: with one scalar decay per head, an SSM computes the same function as masked linear attention (no softmax).
  • How training uses it: attention-style matmuls inside chunks, which GPUs run fast, plus a state passed between chunks, so cost stays linear.
  • Gives up: the expressiveness of Mamba-1's per-dimension decay.
  • Gains: much faster training kernels and cheap larger states.
A3.5Lightning Attention(MiniMax-01)的主要想法和取舍?ReviewTransformer
  • Problem: causal linear attention (no softmax) is a token-by-token recurrence that can't use GPU matrix-multiply units, so it is slow in practice.
  • Main idea: work in blocks: ordinary matrix multiplication with a causal mask inside a block, and a fixed-size recurrent KV state across blocks.
  • Tradeoff: pure lightning falls short on retrieval, so MiniMax-01 keeps some softmax layers, and those still need per-token K/V.
A3.6KDA(Kimi K3)怎么更新记忆?forget gate 和 delta rule 各做什么?ReviewTransformer
  • State: KDA keeps a fixed-size recurrent state per head instead of a growing KV cache.
  • Forget gate: first decays each key channel of the state, by a factor that depends on the token.
  • Delta rule: then compares the token's value with what the decayed state predicts for its key, and writes the difference, scaled by a learned write strength.
  • Read: the query reads the updated state.

A4只读一部分 KV cache

论文Native Sparse Attention, DeepSeek-V3.2

A4.1NSA 的主要想法是什么?为什么要在训练时就用稀疏,而不是只在推理时?ReviewTransformer
  • Main idea: combine three branches with learned gates.
  • Compression: each block is summarized, giving a global view.
  • Selection: scores pick the top blocks, then attention runs on the tokens inside them.
  • Sliding window: covers recent tokens.
  • Why train sparse: pruning only at inference forces a dense-trained model off what it learned, so retrieval heads lose tokens they need. Sparse training also cuts long-sequence training cost.
A4.2DSA(DeepSeek-V3.2)的主要想法是什么?ReviewTransformer
  • Main idea: keep MLA but attend only to selected history.
  • Indexer: a small, cheap lightning indexer scores every earlier token. It still scans everything, just far more cheaply.
  • Selector: keeps the top-k for attention, so core attention scales with k, not full length.
  • Retrofit: added to trained V3.1. First train the indexer to match dense attention via KL, then turn selection on and keep training.
A4.3"只读一部分历史"(NSA / DSA)和"压缩成固定状态"(SSM / linear attention)各放弃了什么?重点Review / 讨论Transformer
  • Both: cut what a decode step reads, in opposite ways.
  • Sparse attention (NSA, DSA): keeps token-level K/V, so selected old tokens come back in detail. Gives up: the cache keeps every token, reads still grow with length, and bad selection can miss information.
  • Fixed state (SSM, linear attention): memory and per-step cost stay constant. Gives up: a finite state can't keep every token as context grows.

A5Hybrid 架构

论文Nemotron 3 Ultra, Mamba-2, MiniMax-01, Kimi K3

A5.1前沿模型为什么混合不同的 sequence-mixing 层?用 Kimi K3 或 Nemotron 3 Ultra 说明各层的分工。重点Guide / 讨论Transformer
  • Why mix: no single layer gives both cheap long context and direct lookup.
  • Recurrent layers: a fixed-size state keeps decode cheap, but history gets compressed.
  • Attention layers: retrieve earlier tokens directly, but need a growing KV cache.
  • Kimi K3: mostly KDA layers (efficient, position-aware mixing), with occasional Gated MLA layers (global content attention).
  • Nemotron 3 Ultra: mostly Mamba-2, with a few global attention layers as anchors.

A6Mixture-of-Experts

论文Switch Transformers, Mixtral, Kimi K3, Nemotron 3 Ultra, MiniMax-01

A6.3MoE 带来哪些额外成本?重点GuideTransformer
  • Memory: all experts must be held, so total memory follows total parameters.
  • Communication: under expert parallelism, tokens are exchanged all-to-all between GPUs holding different experts.
  • Weight traffic: large-batch decode touches nearly all experts.
  • Load imbalance: with static tensor shapes, buffers waste compute or overflowing tokens are dropped.
  • Training: hard routing adds instability, and balancing needs extra machinery.

中文讲解、推导和追问见 速查页

A7位置信息

论文RoFormer, Kimi K3, Qwen2.5-VL

A7.3Kimi K3 为什么在 MLA 层不用位置编码(NoPE)?token 顺序信息从哪来?ReviewTransformer
  • Why NoPE: K3 separates roles. MLA layers do global content interaction with no positional encoding.
  • Where order comes from: the KDA layers between them, whose recurrent gating and decay are position-sensitive and favor recent tokens.
  • Benefit: extending context needs no RoPE retuning or YaRN.
  • Limit: it still needs progressive long-context training; NoPE only removes the positional step.
A7.4MRoPE 怎么工作?重点QuizTransformer
  • MRoPE: splits position into temporal, height and width IDs.
  • Text: uses identical IDs, so it reduces to 1D RoPE.
  • Image: one temporal ID; height and width IDs come from spatial position.
  • Video: the temporal ID increases across frames.

A8Multi-token prediction

论文Nemotron 3 Ultra, Kimi K3

A8.1MTP 是什么?训练和推理时各有什么用?重点GuideLLM inference
  • What: extra heads predict tokens beyond the next one.
  • Training: predicting tokens further ahead gives a richer training signal.
  • Inference: heads draft tokens for speculative decoding. The backbone verifies the drafts in one pass, and several can be accepted.
  • Limit: helps mainly at small batches; at large batches verification overhead can erase the gain.

A9多模态

论文Qwen2.5-VL, Chameleon, Kimi K3

A9.1把图像接入 LLM 的 late fusion(Qwen2.5-VL)和 early fusion(Chameleon)各有什么取舍?重点Guide / 讨论Transformer
  • Late fusion (Qwen2.5-VL): a separate ViT feeds an LLM initialized from a text model, then they train jointly.
  • Its tradeoff: gains native resolution, fine detail and retained text strength, but covers understanding, not image generation.
  • Early fusion (Chameleon): images become discrete tokens in one Transformer trained from scratch, so reasoning and generation can happen in any order.
  • Its tradeoff: training is hard to stabilize, and the tokenizer limits detail.
A9.2多模态 LLM 是否需要每种模态各自的 encoder / decoder?Review / 讨论Transformer
  • Short answer: not strictly required. It is a tradeoff.
  • Evidence: Chameleon runs images and text through one shared Transformer, keeping only an image tokenizer and de-tokenizer.
  • Why separate parts help: a dedicated encoder (Qwen2.5-VL, K3) keeps fine visual detail that a discrete tokenizer can lose.
  • Cost of separation: it is harder to integrate modalities and to generate mixed image and text freely.
A9.3Kimi K3 怎么处理视觉输入?GuideTransformer
  • One backbone: text, images and video share one backbone and one context, with no post-hoc modality alignment.
  • Vision pathway: a vision encoder (MoonViT-V2) encodes visual input, and a small MLP projector maps it into the LLM.
  • Training: the encoder is trained from scratch with next-token prediction, because attaching a pre-trained encoder like SigLIP made joint training unstable.
  • Benefit: the model can write code, inspect screenshots of the result and refine it, with no cross-model hand-off.

预训练

B1Scaling laws

论文Kaplan et al., Chinchilla, Llama 3, GPT-4 Technical Report

B1.1Kaplan 和 Chinchilla 对"怎么分配计算"的结论有什么不同?为什么现在的模型又常被训练到超过 compute-optimal?重点GuideLLM 训练
  • Kaplan: as compute grows, spend mostly on model size.
  • Chinchilla: scale model and data about equally, so existing models were undertrained. It blames Kaplan's fixed token horizon and schedule.
  • Why train past compute-optimal: that point counts only training compute. Llama 3 trains smaller models far beyond it, spending more training compute for cheaper inference.

B2数据

论文FineWeb, Llama 3, DataComp-LM, MiniMax-01

B2.1过滤、去重、质量分类器各做什么?GuideLLM 训练
  • Heuristic filters: cheap rules (length, symbols, repetition, language) remove low-quality pages.
  • Deduplication: removes exact and near copies, which reduces memorization and adds diversity.
  • Quality classifiers: learned scorers, trained on reference data or LLM labels, keep the most useful text. DCLM finds model-based filtering especially effective.
  • Tradeoff: filtering too hard leaves too few tokens, so thresholds balance quality against quantity.
B2.2怎么公平地评测一个数据集(DCLM)?小模型的结果能预测大模型吗?重点ReviewLLM 训练
  • Fair evaluation (DCLM): fix everything except data: same raw data pool, model, training recipe, compute and evaluation tasks. Only curation changes.
  • Small vs. large: small models largely predict large ones, so iterate cheaply small, then scale up.
  • Limit: small runs separate large differences but don't settle close calls.
B2.3Mid-training / annealing 的主要目标有哪些?重点QuizLLM 训练
  • Purpose: mid-training (older name: annealing) prepares the base model for better post-training.
  • Goal 1: raise reasoning capability by switching to higher-quality math, code and science data.
  • Goal 2: extend long-context ability by raising context length with longer documents.
  • Learning rate: ends near zero, which the lecture explains as avoiding disrupting what was learned.
B2.4MiniMax-01 怎么判断重复高质量数据是有用还是会过拟合?ReviewLLM 训练
  • Problem: earlier repetition experiments mislead, because data efficiency changes during training.
  • Method: globally deduplicate, then down-sample documents so a small experiment has the same repetition frequency as the full run. Compare models with hypothesis tests on downstream metrics.
  • Finding: high-quality data stays useful for more repeats than low-quality data.
B2.5Data mix 怎么定(RegMix、Llama 3)?为什么不能全用"高质量"数据?GuideLLM 训练
  • Why not all "high quality": domains interact. Code helps reasoning and web adds breadth, so the best mix is usually a blend, and it shifts with scale.
  • RegMix: train tiny models on many random mixtures, fit a regressor from mixture to loss, then train the big model on the best mix.
  • Llama 3: downsample over-represented web categories and compare mixes with small-model scaling-law experiments.

B3训练稳定性与精度

论文Switch, Nemotron 3 Ultra, Chameleon, MiniMax-01, Muon

B3.1大规模训练不稳定有哪些来源?normalization、precision、optimizer 三类修法分别针对什么?重点Guide训练与优化
  • Sources: softmax logits and activations drifting upward, low precision losing small values, hard MoE routing, and weights growing over long runs.
  • Normalization: bounds values (QK-Norm, reordering); z-loss penalizes drift in the final softmax.
  • Precision: selective high precision protects sensitive parts.
  • Optimizer: weight decay limits growth, and update scaling evens update size.
B3.2Chameleon:QK-Norm、norm reordering、z-loss 各解决什么?重点Review训练与优化
  • QK-Norm: layer norm on queries and keys, which controls norm growth going into the attention softmax.
  • Norm reordering (Swin-style): normalizes each sublayer's output, which bounds feed-forward growth that SwiGLU can amplify.
  • Z-loss: a small penalty on the softmax normalizer, which restrains logit drift in the final softmax, where QK-Norm doesn't reach.
B3.3Switch:selective precision、小 init、expert dropout 各解决什么?重点Lec训练与优化
  • Selective precision: only the router runs in float32, giving float32's stability at bfloat16's speed.
  • Smaller initialization: improved quality and cut variance across runs.
  • Expert dropout: higher inside experts during fine-tuning, which counters overfitting from many more parameters on small tasks.
B3.4MiniMax-01:PostNorm 和 PreNorm 有什么区别?为什么选 PostNorm?重点Review训练与优化
  • PreNorm: normalize before each sublayer: x + F(Norm(x)). Stable, because gradients bypass sublayers through residuals, but this reduces effective depth.
  • PostNorm: normalize after adding the residual: Norm(x + F(x)). Keeps depth, but risks vanishing and exploding gradients, so MiniMax adds DeepNorm.
  • Why PostNorm: its hybrid architecture depends on effective depth, and PostNorm scored higher on most benchmarks.
B3.6Muon:weight decay 和 update RMS 匹配为什么能稳定扩展?重点Review训练与优化
  • Weight decay: without it, weights and layer outputs keep growing past bf16's high-precision range, limiting long runs. So AdamW-style decay was added.
  • Update RMS: Muon's update size depends on matrix shape, so large matrices update too little and small per-head ones too much, causing instability.
  • Fix: scale updates by matrix shape. Updates become consistent and match AdamW's size, so hyperparameters transfer without tuning.

B4优化器与训练目标

论文Muon, RLP

B4.1Muon 的核心想法是什么?解决什么问题?重点Review训练与优化
  • Problem: AdamW is the default. Muon beat it on small models, but its gains diminished when scaled up.
  • Main idea: compute gradient momentum, then approximately orthogonalize that matrix, so weights don't learn along only a few dominant directions.
  • Scaling fixes: weight decay and shape-aware update scaling make it work without tuning.
  • Result: scaling laws show about 2× compute efficiency over AdamW.
B4.2RLP 的核心想法是什么?和普通的 post-training 有什么区别?重点Review / 讨论训练与优化
  • Main idea: treat chain-of-thought as an action sampled before predicting the next token.
  • Reward: information gain, meaning how much the thought raises the observed token's log-likelihood over a no-think EMA baseline.
  • Difference from RLVR: no verifier or curated problems, runs on ordinary pretraining text in pretraining's last phase, and rewards predictive usefulness rather than correct answers.
  • Afterwards: SFT and RLVR still follow.

后训练

C1从 RLHF 到推理模型

论文InstructGPT, DPO, DeepSeek-R1

C1.1后训练 pipeline 有哪些阶段,各做什么?GuideLLM 训练
  • SFT: teaches instruction following, format, tool use and reasoning style by imitating demonstrations.
  • Preference optimization: tunes style, safety and helpfulness from comparisons or judges.
  • RL with verifiers: builds capability on checkable tasks like math and code.
  • On-policy distillation: recent pipelines use it to merge specialist teachers.
  • Note: order and roles vary across labs.

中文讲解、推导和追问见 速查页

C1.2偏好优化(InstructGPT、DPO)和 RLVR(DeepSeek-R1)在"需要什么"和"优化什么"上有什么不同?重点GuideLLM 训练
  • Preference optimization needs: comparisons from humans or AI judges. InstructGPT also trains a reward model and samples during RL; DPO uses a static pair dataset.
  • It optimizes: a learned proxy for preference under a KL constraint, so it handles non-verifiable tasks.
  • RLVR needs: hard questions, a reliable verifier, RL compute and a capable base, but no human reasoning traces (R1-Zero).
  • It optimizes: final-answer correctness.

中文讲解、推导和追问见 速查页

C2Reward 信号

论文InstructGPT, DeepSeek-R1, Chasing the Tail, RLP

C2.1Preference RM、verifier、rubric、teacher:哪个 dense、哪个 sparse?各自怎么被 policy 钻空子?重点GuideLLM 训练
  • Preference RM: sparse, one learned score per response. Over-optimized, so scores rise while true quality falls.
  • Verifier: sparse, outcome only. Hard to hack where rules are reliable, yet agents may cheat.
  • Rubric: one weighted score per response. Harder to game, but still over-optimizes and can reward verbosity.
  • Teacher: dense, per token. Stylistic tokens can dominate KL, and off-support prefixes give unreliable guidance.

C3On-policy vs off-policy

论文DPO, DeepSeek-V3.2, GKD, OPSD

C3.1哪些方法 on-policy、哪些 off-policy?off-policy 数据带来什么问题?重点GuideLLM 训练
  • Off-policy (fixed data): SFT, word- and sequence-level KD, offline DPO.
  • On-policy (model's own samples): PPO, GRPO, GKD at λ=1, OPSD.
  • Problem 1, exposure bias: prefixes at inference differ from prefixes in training, so errors compound.
  • Problem 2, staleness: samples from old policies weaken the signal, and performance falls as they get staler.

C4KL 散度的角色

论文InstructGPT, DPO, GKD, OPSD, Chasing the Tail

C4.1KL 在 RLHF、DPO、蒸馏里分别控制什么?重点GuideLLM 训练
  • RLHF: a KL penalty to the SFT model limits drift away from where the reward model is accurate, reducing over-optimization.
  • DPO: solves that same KL-constrained objective implicitly, with no KL term in the loss; β sets its strength.
  • Distillation: KL to the teacher is the objective itself, pulling the student's next-token distribution toward the teacher's.
  • Summary: a leash in the first two, the training target in the third.
C4.2forward 和 reverse KL 有什么区别?重点ReviewLLM 训练
  • Forward KL(T‖S): weighted by the teacher. Wherever the teacher puts mass, the student must too. It covers modes, but a weak student may spread across them and hallucinate.
  • Reverse KL(S‖T): weighted by the student. It heavily penalizes tokens the teacher rejects, but the student can drop teacher modes, so it seeks one mode.
  • Which is better: GKD finds it depends on the task.

C5蒸馏

论文GKD, OPSD, Nemotron 3 Ultra, Kimi K3, DeepSeek-R1

C5.1为什么用 on-policy 蒸馏?和 SFT、RL 相比各有什么优劣?重点GuideLLM 训练
  • SFT and off-policy KD: train on fixed prefixes, so errors compound at inference (exposure bias).
  • RL: uses the model's own rollouts, but spreads one score across all tokens, and gives zero gradient when a group ties.
  • On-policy distillation: dense teacher feedback on the student's own rollouts (token-level DAgger).
  • Costs: needs a teacher, adds generation and teacher passes to the loop, and weakens when rollouts leave the teacher's support.

C6RL 效率(含 Hamish Ivison guest lecture)

论文Async RLHF, Olmo 3, NGU, RLVE

C6.1LLM RL 的计算花在哪?为什么要让它更快?重点GuideLLM 训练
  • Where compute goes: mostly rollout generation. Inference uses several times more compute than training, the learner sits idle much of the time, and a few slow generations dominate rollout time.
  • Why speed matters: RL is a large and growing share of frontier compute, and more RL steps still help, so wasted generation limits how far training can go.
C6.2Async RL 怎么做?代价是什么?Async RLHF 的主要发现?重点LecLLM 训练
  • How: generation and learning run in parallel on separate GPUs, using fast inference engines. Training uses samples from slightly older policies.
  • Cost: off-policy data gives a worse signal, and performance falls as staleness grows.
  • Findings: Online DPO is most robust; robustness rises with policy size, not reward-model size; one-step async matches sync while running faster.
C6.3Olmo 3 用了哪些效率技巧?重点LecLLM 训练
  • Cut idle compute: fully asynchronous actors and learner; continuous batching (a finished slot immediately takes a new prompt); inflight weight updates that keep the KV cache (the largest measured gain).
  • Cut wasted rollouts: filter zero-gradient groups and easy problems; active sampling, which stabilizes batches.
  • Result: training time fell substantially with similar performance.
C6.4全对或全错的组(zero-std)为什么浪费?怎么处理?重点LecLLM 训练
  • Why wasteful: GRPO advantage is a response's reward minus the group mean. If all answers are right or all wrong, every advantage is zero, so the expensive generation yields no gradient.
  • Fix 1: drop such groups from training.
  • Fix 2: filter offline, mainly removing easy problems.
  • Fix 3: active sampling keeps collecting nonzero groups until the batch fills, instead of oversampling in advance.
C6.5RL 里的 Matthew effect 是什么?NGU 怎么解决?重点LecLLM 训练
  • Matthew effect: RL improves problems roughly in proportion to initial ability, so easy problems gain most and hard ones barely improve.
  • Why: fixed samples per prompt spend compute on easy prompts, and raising that number doesn't fix it.
  • NGU: sample a few completions per prompt, skip all-correct prompts, train on mixed groups and retry all-wrong prompts. Async training shifts compute toward hard problems.
C6.6RLVE 怎么从数据角度提升效率?重点LecLLM 训练
  • Problem: RL needs just-right problems. Easy ones give no signal, and overly hard ones give consistently poor rewards.
  • Environments: verifiable environments generate unlimited problems with programmatic verifiers.
  • Difficulty: each keeps a sliding difficulty window, raised once the model is accurate enough.
  • Effect: many environments keep problems appropriately hard, speed learning and transfer to unseen tasks.
  • Limits: expert engineering, verifiable tasks only.

Guest lecture

D1Rex Ying:A Geometric Perspective on Foundation Models

D1.1为什么要在基础模型里用双曲几何?重点GuideDeep Learning
  • Observation: token relationships look hierarchical: low hyperbolicity means tree-like structure, and very few tokens are very frequent.
  • Problem: trees grow exponentially, but Euclidean space grows only polynomially, so leaves on different branches crowd together.
  • Solution: hyperbolic space has constant negative curvature and exponentially growing room, so trees fit with low distortion.
  • Cost: basic operations like addition must be redesigned, so models are harder to build.

论文复述

P每篇论文的问题、主要想法、主要结果和局限

补漏

G1guide 点名、还没讲的点

G1.1Kimi K3 的 Attention Residuals 是什么?解决什么问题?Guide:主要想法 / K3 review summaryTransformer
  • Problem: standard residuals squeeze all earlier layers into one running state, a bottleneck like an RNN over depth.
  • Main idea: apply attention across depth. Each layer uses a learned query to softmax-weight the embedding and earlier layer outputs, so it retrieves what it needs.
  • Cost and fix: keeping every layer output costs memory and communication, so K3 groups layers into blocks and attends over block-level summaries.