AI & Algorithms

Attention Is All You Need:Transformer 架構完整拆解

拆解原始 Transformer 論文的 scaled dot-product attention、multi-head attention、encoder/decoder 區塊、殘差與 Layer Normalization、位置編碼與訓練方式,並區分 2017 年原始論文與現代 decoder-only LLM 在架構細節上的實際差異。

AI & Algorithms

PPO 完整解析:從策略梯度到 LLM RLHF 訓練全流程

從 REINFORCE 的高變異數問題講起,推導 PPO 的 clipped surrogate objective 和 GAE,再落到 LLM RLHF 裡 Policy/Reference/Reward/Critic 四個模型如何協同工作,以及 KL 懲罰、reward hacking 等實踐問題。