2025¶
Implementing LLM Speculative Sampling in Under 100 Lines of Code
Introduction
Today we'll explore and implement DeepMind's paper: Accelerating large language model decoding with speculative sampling 1. I'll demonstrate how to reproduce this technique in less than 100 lines of code while achieving more than 2x speedup in inference time.
LLM Speculative Sampling
前言
今天我们将介绍并复现 Deepmind 的一篇关于 LLM Speculative Sampling 的论文:Accelerating large language model decoding with speculative sampling1. 我们将用不到 100 行代码来复现这篇论文,并得到 2 倍以上的速度提升。
Presentia: 简单而优雅的 Presentation 模板
Why
我真的用不好 PowerPoint,Keynote 也不行,这些工具对我来说都太复杂了。 这些基于拖拽的工具有很多小的问题让我很难受,比如两段文字到底有没有对齐…… 我想要的是一个简单的工具,让我可以专注于内容,且可以自动生成美观大方的排版。 同时这些内容的源文件是 文本,这样我就可以用 Git 来做版本控制了。
对于这个问题,我的第一个解法 LaTeX 的 Beamer,第二个解法是 Typst 的 Touying。
Deepseek GRPO 中的 KL Divergence
起
在 Deepseek R1 发布之后,看到了论文中 RL 的算法用的是 GRPO,而 GRPO 是在之前 Deepseek Math 的论文中被提出来的。GRPO 的目标函数如下:
大语言模型与深度学习书籍推荐
前言
之前在朋友圈/推特上推荐的几本 NLP/LLM 的书大家都比较喜欢,这里为了方便大家查阅,统一整理了一下 (另外加上了一些深度学习基础知识学习的书籍), 同时也发在公众号上方便大家收藏查阅。