Track VI · Frontier Tech Reports · 09/20

Kimi k1.5 — 긴 문맥 RL과 online mirror descentKimi k1.5 — long-context RL and online mirror descent

Kimi 계열 RL의 뿌리인 k1.5 보고서를 읽는다. KL 정규화 문제의 닫힌 해에서 제곱 surrogate 손실을 유도하고, 길이 보상·long2short·partial rollout이 K2.5와 K3의 예산 제어·off-policy 제어로 어떻게 이어지는지 직접 돌려 본다.The root of Kimi's RL line. Derive the squared surrogate loss from the closed-form solution of a KL-regularised problem, and run how the length reward, long2short and partial rollout carry over into K2.5 and K3's budget control and off-policy control.

On 22 January 2025, DeepSeek-R1 and Moonshot AI’s Kimi k1.5 report appeared on arXiv on the same day. Both solved the same goal — eliciting long chains of thought (long-CoT) with RL — and reached the same conclusion: no MCTS, no value function, no process reward model. But they took different roads. R1 used GRPO, which inherits PPO’s clip; k1.5 used a squared loss derived from the closed-form solution of a KL-regularised problem.

This lesson opens the Kimi series because that loss is still alive. K2 (2025-07) adopts the k1.5 objective as its “foundation”, K2.5 (2026-02) adds token-level log-ratio masking to it, and K3 (2026-07) follows the K2.5 algorithm unchanged. The length reward evolves into K2’s budget control, K2.5’s Toggle and K3’s reasoning-effort RL. Partial rollout is a basic building block of K3’s million-token agentic-RL infrastructure. The report concentrates on RL and does not disclose model size or architecture, so this lesson goes deep on the RL side.

At a glance

ItemDetails
LabMoonshot AI (Kimi Team)
Released2025-01-22 (arXiv 2501.12599)
Model sizeNot disclosed (neither total nor active parameters)
ArchitectureA Transformer-decoder variant taking interleaved image–text input, multimodal (App. B.3; details “beyond the scope”)
Context131,072-token long-context activation in pre-training, 128k RL rollouts (§2.6, App. B.4)
Pre-training tokensNot disclosed
WeightsClosed (“we are not open-sourcing our proprietary model at this time”, App. B)
Modelsk1.5 long-CoT, k1.5 short-CoT (a short-reasoning model obtained via long2short)
LinksarXiv

What is new

  • Long context is a scaling axis for RL. Performance keeps improving as the RL rollout context grows to 128k, and partial rollout is the systems technique that makes it affordable.
  • A variant of online mirror descent. Each iteration solves a KL-regularised problem anchored at the current model and learns the consistency condition its closed-form solution satisfies, with a squared loss. No value network.
  • Length reward and long2short. A length reward suppresses the “overthinking” in which RL keeps lengthening responses, and four ways of moving long-CoT ability into a short model are compared (weight-averaged merging, shortest rejection sampling, DPO, long2short RL).
  • RL data curation. Difficulty is the SFT model’s pass rate over 10 samples, and “easy-to-hack” prompts that the model answers within 8 guesses without CoT are removed. Maths is graded by a generative reward model that writes a CoT.
  • Joint text–vision RL. Reasoning problems with images are trained in the same RL loop.

Architecture

The report reveals almost nothing about the model structure. Appendix B.3 says only that it is “a variant of the Transformer decoder that integrates multimodal capabilities alongside improvements in architecture and optimization”, and adds that most of the base model’s performance comes from pre-training data quality. The disclosed structural facts are that the RoPE frequency is set to 1,000,000 and the maximum length is grown 4,096 → 32,768 → 131,072 (App. B.4), and that the vision tower is first trained alone before the language model is unfrozen.

What the report does describe in detail is the RL system. For understanding its contribution, that matters more.

The rollout–training system and partial rollout

k1.5 is a synchronous RL system that alternates a rollout phase and a training phase each iteration (§2.6.1). A central master manages the data flow between rollout workers, trainer workers, reward models and a replay buffer. Training runs on Megatron and inference on vLLM; the two live in one pod as sidecar containers sharing the same GPUs. After training, Megatron releases GPU memory and hands the weights to vLLM. The report quotes under one minute to switch from training to inference and about ten seconds the other way (§2.6.3).

The weakness of a synchronous design in long-CoT RL is obvious. When response lengths in a batch differ several-fold, the iteration waits until the longest response finishes. Partial rollout (§2.6.2) fixes an output-token budget per iteration; trajectories that do not finish within it are saved to the replay buffer and continued in the next iteration. Meanwhile workers that finish short jobs start new trajectories. Repeat detection — cutting off repeated text early and penalising it — lives in the same place.

→ Go deeper: Inference for RL — colocated engines, weight sync and partial rollouts today; Asynchronous RL and staleness — what happens once rollout and training stop taking turns.

2025년 1월 22일, DeepSeek-R1과 Moonshot AI의 Kimi k1.5 보고서가 같은 날 arXiv에 올라왔다. 둘 다 “긴 사고 과정(long chain-of-thought, long-CoT)을 RL로 끌어낸다”는 같은 목표를 같은 결론으로 풀었다. MCTS도, value function도, process reward model도 필요 없다. 다만 길은 달랐다. R1이 PPO의 clip을 물려받은 GRPO를 썼다면, k1.5는 KL 정규화 문제의 닫힌 해에서 출발한 제곱 손실을 썼다.

이 레슨을 Kimi 시리즈의 첫 장으로 두는 이유는 그 손실이 지금도 살아 있기 때문이다. K2(2025.7)는 k1.5의 목적함수를 “foundation”이라 부르며 그대로 쓰고, K2.5(2026.2)는 여기에 토큰 단위 log-ratio 마스킹을 더했으며, K3(2026.7)는 K2.5 알고리즘을 그대로 따른다. 길이 보상은 K2의 budget control, K2.5의 Toggle, K3의 reasoning-effort RL로 이어진다. partial rollout은 K3의 100만 토큰 agent RL 인프라의 기본 부품이다. 보고서 본문은 RL에 집중되어 있고 모델 크기·아키텍처는 공개하지 않았으므로, 이 레슨도 RL 쪽을 깊게 본다.

한눈에

항목내용
연구소Moonshot AI (Kimi Team)
공개2025-01-22 (arXiv 2501.12599)
모델 크기미공개 (총/활성 파라미터 모두 보고서에 없음)
아키텍처Transformer decoder 변형, 이미지-텍스트 interleaved 입력을 받는 멀티모달 (부록 B.3, 세부는 “범위 밖”)
문맥 길이사전학습 long-context activation 131,072 토큰, RL rollout 128k (§2.6, 부록 B.4)
사전학습 토큰미공개
가중치비공개 (“we are not open-sourcing our proprietary model at this time”, 부록 B)
대표 모델k1.5 long-CoT, k1.5 short-CoT (long2short로 얻은 짧은 추론 모델)
링크arXiv

무엇이 새로운가

  • 긴 문맥이 RL의 스케일링 축이다. RL rollout 문맥을 128k까지 늘리며 성능이 계속 오르는 것을 보이고, 이를 가능하게 한 시스템 기법으로 partial rollout을 제안했다.
  • online mirror descent 변형. 매 iteration 현재 모델을 기준점으로 KL 정규화 문제를 풀고, 그 닫힌 해가 만족해야 하는 일관성 조건을 제곱 손실로 학습한다. value network는 쓰지 않는다.
  • 길이 보상과 long2short. RL이 응답을 계속 늘리는 “overthinking”을 길이 보상으로 누르고, long-CoT 모델의 능력을 짧은 모델로 옮기는 네 가지 방법(가중치 평균 병합, 최단 rejection sampling, DPO, long2short RL)을 비교했다.
  • RL 데이터 큐레이션. SFT 모델의 10회 pass rate로 난이도를 매기고, CoT 없이 8번 안에 답을 맞히는 “찍기 쉬운” 문제를 제거한다. 수학 채점에는 CoT를 쓰는 생성형 보상모델을 쓴다.
  • 텍스트·비전 공동 RL. 이미지가 들어간 추론 문제도 같은 RL 루프에서 학습한다.

아키텍처

보고서는 모델 구조를 거의 밝히지 않는다. 부록 B.3은 “Transformer decoder의 변형으로 멀티모달 기능과 구조·최적화 개선을 통합했다”고만 쓰고, 기본 성능의 대부분은 사전학습 데이터 품질에서 온다고 덧붙인다. 공개된 구조적 사실은 RoPE 주파수를 1,000,000으로 두고 최대 길이를 4,096 → 32,768 → 131,072로 늘렸다는 것(부록 B.4)과, 비전 타워를 먼저 따로 학습한 뒤 언어 모델을 풀었다는 것 정도다.

대신 보고서가 자세히 공개한 “아키텍처”는 RL 시스템이다. 이 보고서의 기여를 이해하려면 이쪽이 더 중요하다.

Rollout–학습 시스템과 partial rollout

k1.5는 iteration마다 rollout 단계와 학습 단계를 번갈아 도는 동기식(synchronous) RL이다(§2.6.1). 중앙 master가 rollout worker, trainer worker, 보상모델, replay buffer 사이의 데이터 흐름을 관리한다. 학습은 Megatron, 추론은 vLLM이 맡고, 둘은 같은 GPU를 나눠 쓰는 sidecar 컨테이너로 한 pod 안에 들어 있다. 학습이 끝나면 Megatron이 GPU 메모리를 내려놓고 가중치를 vLLM으로 넘긴다. 보고서는 학습→추론 전환에 1분 미만, 반대 방향에 약 10초가 걸린다고 쓴다(§2.6.3).

긴 CoT RL에서 동기식 구조의 약점은 명확하다. 한 배치에서 응답 길이가 몇 배씩 차이 나면 iteration은 가장 긴 응답이 끝날 때까지 기다린다. partial rollout(§2.6.2)은 iteration마다 고정된 출력 토큰 예산을 두고, 예산 안에 끝나지 않은 궤적은 replay buffer에 저장했다가 다음 iteration에 이어서 생성한다. 그동안 짧은 일을 끝낸 worker는 새 궤적을 시작한다. 반복되는 문장을 감지해 일찍 끊고 벌점을 주는 기능도 같은 곳에 들어 있다.

→ 더 깊이: RL을 위한 추론 — 오늘날의 colocated 엔진, 가중치 동기화, partial rollout. 비동기 RL과 staleness — rollout과 학습이 번갈아 돌지 않게 되면 생기는 일.

GPU 사용률GPU utilisation – 완료 궤적 / 1M 토큰-시간finished trajectories / 1M token-time – 평균 stalenessmean staleness – 최대max –
The x-axis is time (decoded tokens) and each row is a rollout slot. Bars of one colour are one trajectory; vertical dotted lines are iteration boundaries (= policy updates). Lengths are drawn from a log-normal with median 4k tokens and tail σ, truncated at 128k. Increase σ and the synchronous scheme leaves more grey (idle) time while it waits for the single longest trajectory. Partial rollout carries unfinished trajectories into the next iteration once the budget runs out, so idle time disappears — but trajectories that span several policy versions appear (staleness ≥ 1). The smaller the budget, the larger the staleness. This is why K2.5–K3 tame off-policyness with a token-level log-ratio constraint. 가로축은 시간(디코딩 토큰 수), 각 행은 rollout 슬롯이다. 같은 색 막대는 하나의 궤적이고 세로 점선은 iteration 경계(= 정책 갱신)다. 길이는 중앙값 4k 토큰, 꼬리 σ의 로그정규 분포(128k에서 자름)에서 뽑았다. σ를 키우면 동기식은 가장 긴 궤적 하나를 기다리느라 회색(유휴)이 늘어난다. partial rollout은 예산이 끝나면 미완성 궤적을 다음 iteration으로 넘기므로 유휴가 사라지지만, 여러 정책 버전에 걸친 궤적(staleness ≥ 1)이 생긴다. 예산을 줄일수록 staleness가 커진다. 이것이 K2.5–K3가 토큰 단위 log-ratio 제한으로 off-policy를 다스리는 이유다.

As the figure shows, partial rollout removes idle time at the cost of trajectories that span several policy versions. A response stitched together from iteration n−mn-m to nn has its early parts sampled from an old policy. k1.5 only says that “certain segments can be excluded from loss computation” and gives no concrete rule. This off-policy problem returns in K2.5 as token-level log-ratio masking and in K3 together with the “pause once a fraction λ has finished” variant (training section below and the K3 lesson).

Data

Pre-training data (Appendix B)

The report gives no token count but describes the pipeline in some detail.

DomainProcessing
English & Chinese textRule-based filters, a FastText quality classifier, embedding-based near-dedup and an LLM quality score (the FineWeb approach of Penedo et al. 2024), combined into one score used for up/down-sampling
CodeBigCode-style preprocessing; markup such as JSON and YAML down-sampled, 32 major languages up-sampled; text–code interleaved data recalled by embeddings
Maths & reasoningDedicated maths text extraction and OCR models, then two-stage cleaning: FastText → a fine-tuned LM
KnowledgeOCR’d textbooks, papers and exercises; filtering and sampling rates set from OCR-quality, educational-value and document-type labels
MultimodalFive categories: captions, image–text interleaving, OCR, knowledge, general QA. The share of synthetic captions is strictly limited to avoid hallucination

There are three stages (App. B.4): (1) pre-training that starts with language only, gradually adds interleaved vision–language data and raises the vision–text share to a final 30%; (2) a cooldown with high-quality data and synthetic QA; (3) long-context activation, using 40% full-attention data and 60% partial-attention data.

Post-training data

Vanilla SFT (§2.5.2): about 1M text examples (500k general QA, 200k coding, 200k maths & science, 5k creative writing, 20k long-context) and 1M text–vision examples. Non-reasoning tasks use human-written seeds and annotator-ranked, refined responses of a seed model; maths and coding are expanded by rejection sampling.

Long-CoT SFT (§2.2): a “small yet high-quality” warm-up set built with prompt engineering, containing verified reasoning paths that exhibit planning, evaluation, reflection and exploration. Its size is not given.

RL prompts (§2.1) are curated for three properties.

  • Difficulty: the SFT model answers each prompt 10 times at high temperature; the pass rate is the difficulty.
  • Verifiability: multiple-choice, true/false and proof questions are excluded because answers can be guessed. For general QA, the model is asked to guess the answer without CoT; if it is right within 8 attempts the prompt is “easy to hack” and removed.
  • Diversity: domain/discipline tags keep the mix balanced.

A lot of data also goes into the rewards. Many web coding problems lack tests, so the base model writes test generators with the CYaRon library. For each problem it generates 50 tests, keeps those on which at least 7 of 10 ground-truth submissions agree, and admits the problem only if at least 9 of 10 submissions pass the whole selected set. From a sample of 1,000 contest problems, about 614 did not need a special judge, 463 generators produced at least 40 valid tests, and 323 problems entered training (§2.3.5). For maths grading, a value-head reward model (about 800k examples) was compared with a Chain-of-Thought RM of the same scale that writes reasoning and then a JSON verdict; manual spot checks gave about 84.4 and 98.5 accuracy, so RL used the latter.

Training

Pre-training and SFT

No detailed pre-training hyperparameters are given. Vanilla SFT runs one epoch at 32k length (learning rate 2×10−5→2×10−62\times10^{-5}\to2\times10^{-6}), then one epoch at 128k (re-warmed to 1×10−51\times10^{-5} and decayed to 1×10−61\times10^{-6}) (§2.5.2). A light long-CoT warm-up SFT follows.

The RL objective

For a problem xx with answer y⋆y^\star, a generated chain of thought zz and answer yy, the reward is r(x,y,y⋆)∈{0,1}r(x,y,y^\star)\in\{0,1\} and the goal is max⁡θE[r]\max_\theta \mathbb{E}[r]. k1.5 does not solve this in one go; at iteration ii it anchors at the current model πθi\pi_{\theta_i} and solves a KL-regularised problem (Eq. 2).

max⁡θ E(x,y⋆)[ E(y,z)∼πθ[r(x,y,y⋆)]−τ KL(πθ(⋅∣x) ∥ πθi(⋅∣x))]\max_\theta\ \mathbb{E}_{(x,y^\star)}\Big[\ \mathbb{E}_{(y,z)\sim\pi_\theta}\big[r(x,y,y^\star)\big]-\tau\,\mathrm{KL}\big(\pi_\theta(\cdot\mid x)\,\|\,\pi_{\theta_i}(\cdot\mid x)\big)\Big]

This has the same form as the KL-regularised objective of RLHF-PPO, except that the anchor is the previous policy rather than a fixed πref\pi_{\text{ref}}. Moving the anchor every iteration and advancing a little each time is mirror descent. The solution is known in closed form:

π⋆(y,z∣x)=πθi(y,z∣x) exp⁡ ⁣(r(x,y,y⋆)/τ)Z,Z=∑y′,z′πθi(y′,z′∣x)exp⁡ ⁣(r(x,y′,y⋆)/τ)\pi^\star(y,z\mid x)=\frac{\pi_{\theta_i}(y,z\mid x)\,\exp\!\big(r(x,y,y^\star)/\tau\big)}{Z},\qquad Z=\sum_{y',z'}\pi_{\theta_i}(y',z'\mid x)\exp\!\big(r(x,y',y^\star)/\tau\big)

(Derivation: add the normalisation constraint with a Lagrange multiplier and differentiate with respect to π\pi: r−τ(log⁡π−log⁡πθi+1)−μ=0r-\tau(\log\pi-\log\pi_{\theta_i}+1)-\mu=0, i.e. π∝πθier/τ\pi\propto\pi_{\theta_i}e^{r/\tau}.) Taking logs gives a consistency condition that holds for every (y,z)(y,z):

r(x,y,y⋆)−τlog⁡Z=τlog⁡π⋆(y,z∣x)πθi(y,z∣x)r(x,y,y^\star)-\tau\log Z=\tau\log\frac{\pi^\star(y,z\mid x)}{\pi_{\theta_i}(y,z\mid x)}

“For every (y,z)(y,z)” is the key point: the equality can be checked on responses drawn from any distribution, so off-policy data can be used. k1.5 takes the squared violation of this condition as its loss:

L(θ)=E(x,y⋆) E(y,z)∼πθi[(r(x,y,y⋆)−τlog⁡Z−τlog⁡πθ(y,z∣x)πθi(y,z∣x))2]L(\theta)=\mathbb{E}_{(x,y^\star)}\ \mathbb{E}_{(y,z)\sim\pi_{\theta_i}}\Big[\Big(r(x,y,y^\star)-\tau\log Z-\tau\log\frac{\pi_\theta(y,z\mid x)}{\pi_{\theta_i}(y,z\mid x)}\Big)^2\Big]

τlog⁡Z\tau\log Z can be estimated from kk samples of πθi\pi_{\theta_i} as τlog⁡1k∑jerj/τ\tau\log\frac1k\sum_j e^{r_j/\tau}, but the report says that the mean reward rˉ\bar r works well in practice, since τlog⁡Z→Eπθi[r]\tau\log Z\to\mathbb{E}_{\pi_{\theta_i}}[r] as τ→∞\tau\to\infty. The gradient over kk samples is then (Eq. 3)

1k∑j=1k(∇θlog⁡πθ(yj,zj∣x) (rj−rˉ)−τ2∇θ(log⁡πθ(yj,zj∣x)πθi(yj,zj∣x))2)\frac1k\sum_{j=1}^{k}\Big(\nabla_\theta\log\pi_\theta(y_j,z_j\mid x)\,\big(r_j-\bar r\big)-\frac{\tau}{2}\nabla_\theta\Big(\log\frac{\pi_\theta(y_j,z_j\mid x)}{\pi_{\theta_i}(y_j,z_j\mid x)}\Big)^2\Big)

(Differentiate the squared loss and divide by the constant −2τ-2\tau; note ∇θlog⁡πθ⋅τlog⁡πθπθi=τ2∇θ(log⁡πθπθi)2\nabla_\theta\log\pi_\theta\cdot\tau\log\frac{\pi_\theta}{\pi_{\theta_i}}=\frac{\tau}{2}\nabla_\theta\big(\log\frac{\pi_\theta}{\pi_{\theta_i}}\big)^2.) Reading it is easy. The first term is REINFORCE with the mean reward as baseline (the same family as RLOO), and the second term is an L2 regulariser on the log-ratio. Where PPO’s clip boxes the ratio in, here the squared log-ratio pulls it back smoothly. The only difference is that responses come from πθi\pi_{\theta_i} rather than being on-policy; the report calls it “the natural extension of an on-policy regularised policy gradient to the off-policy case”. Because the anchor changes every iteration and each iteration is a different optimisation problem, the optimiser state is reset at the start of every iteration.

Why no value network

The report’s argument (§2.3.2) is interesting. Suppose a partial CoT can continue with zt+1z_{t+1} (straight to the right answer) or zt+1′z'_{t+1} (contains an error). A perfect value function would give zt+1′z'_{t+1} a negative advantage. Yet in long CoT, a trajectory that goes to zt+1′z'_{t+1}, notices the error and recovers to the right answer is exactly the behaviour to learn. Rewarding only the final answer gives such trial-and-error trajectories a positive signal as a whole. The claim is that precise credit assignment can actually punish exploration.

Length reward (§2.3.3)

To curb overthinking — response length growing rapidly during RL — take the kk responses to a prompt with lengths len(i)\mathrm{len}(i), their min and max, and

λi=0.5−len(i)−min_lenmax_len−min_len,len_reward(i)={λiri=1min⁡(0,λi)ri=0\lambda_i=0.5-\frac{\mathrm{len}(i)-\mathrm{min\_len}}{\mathrm{max\_len}-\mathrm{min\_len}},\qquad \mathrm{len\_reward}(i)=\begin{cases}\lambda_i & r_i=1\\ \min(0,\lambda_i) & r_i=0\end{cases}

is added to the original reward with a weight. Among correct answers the shortest gets +0.5 and the longest −0.5; wrong answers are only penalised for being long and never rewarded for being short. If all lengths are equal it is 0. Turning it on early slows training, so RL first runs without it and then switches on a constant weight (warm-up).

→ Go deeper: Long-horizon RL — length budgets, context management and credit over long trajectories in current agent RL.

Sampling (§2.3.4)

  • Curriculum: from easy to hard problems; the data already carry grade and difficulty labels.
  • Prioritised: track each problem’s success rate sis_i and sample proportionally to 1−si1-s_i.

long2short (§2.4)

Four ways of moving the “thinking habits” of the long-CoT model into a short model.

MethodWhat it does
Model mergingSimple average of the weights of a long-CoT and a short-CoT model
Shortest rejection samplingAnswer each question n=8n=8 times and SFT on the shortest correct answer
DPOShortest correct answer as chosen; wrong answers and correct answers 1.5× longer or more as rejected
long2short RLFrom a checkpoint with a good performance/efficiency trade-off, re-run RL with the length reward on and the maximum rollout length cut sharply

A closer look at the key methods

1. Watching one mirror-descent step

The figure below steps k1.5’s update one iteration at a time on a toy problem where three of ten “solution strategies” are correct. It shows the exact solution π⋆\pi^\star (black outline) next to the policy obtained by minimising the loss built from kk samples, as the real algorithm does (coloured bars).

그림에서 보듯 partial rollout은 유휴 시간을 없애는 대신 여러 정책 버전에 걸친 궤적을 만든다. iteration n−mn-m부터 nn까지 이어 붙인 응답은 앞부분이 옛 정책에서 나왔다. k1.5는 “일부 segment는 손실 계산에서 제외할 수 있다”고만 쓰고 구체 규칙은 밝히지 않는다. 이 off-policy 문제는 K2.5에서 토큰 단위 log-ratio 마스킹으로, K3에서는 “λ 비율이 끝나면 멈추는” 변형과 함께 다시 등장한다(아래 학습 절과 K3 레슨).

데이터

사전학습 데이터 (부록 B)

보고서는 토큰 수를 밝히지 않지만 파이프라인은 비교적 자세히 쓴다.

도메인처리
영어·중국어 텍스트규칙 기반 필터, FastText 품질 분류기, 임베딩 기반 near-dedup, LLM 품질 점수(Penedo et al. 2024의 FineWeb 방식)를 합친 점수로 up/down-sampling
코드BigCode 방식 전처리, JSON·YAML 등 마크업은 down-sample, 주요 32개 언어 up-sample, 텍스트-코드 혼합 데이터는 임베딩 recall
수학·추론수학 전용 텍스트 추출·OCR 모델을 따로 만든 뒤 FastText → 미세조정 LM의 2단계 정제
지식교재·논문·연습문제를 OCR, OCR 품질·교육적 가치·문서 유형 라벨로 필터와 샘플링 비율 결정
멀티모달caption, image-text interleaving, OCR, 지식, 일반 QA의 5범주. 합성 caption 비율은 환각을 막기 위해 엄격히 제한

학습 단계는 셋이다(부록 B.4). (1) 언어만으로 시작해 interleaved 비전-언어 데이터를 점진적으로 넣고 비전-텍스트 비율을 최종 30%까지 올리는 사전학습, (2) 고품질 데이터와 합성 QA로 cooldown, (3) long-context activation. 마지막 단계는 full attention 데이터 40%, partial attention 데이터 60%를 쓴다.

사후학습 데이터

Vanilla SFT (§2.5.2): 텍스트 약 100만 개(일반 QA 50만, 코딩 20만, 수학·과학 20만, 창작 5천, 장문 2만)와 텍스트-비전 100만 개. 비추론 과제는 사람이 seed를 만들고 seed 모델 응답을 순위 매겨 다듬었고, 수학·코딩은 rejection sampling으로 늘렸다.

Long-CoT SFT (§2.2): 프롬프트 엔지니어링으로 만든 “작지만 질 높은” warmup 데이터. 계획(planning), 평가, 반성(reflection), 탐색(exploration)이 드러나는 검증된 추론 경로를 담는다. 크기는 밝히지 않았다.

RL 프롬프트 (§2.1)는 세 성질을 목표로 큐레이션한다.

  • 난이도: SFT 모델로 높은 temperature에서 10번 풀게 해 pass rate를 난이도로 쓴다.
  • 검증 가능성: 객관식·참/거짓·증명 문제는 답을 찍어 맞힐 수 있어 제외한다. 일반 QA는 모델에게 CoT 없이 답만 추측하게 해서 8번 안에 맞히면 “hack하기 쉬운” 문제로 보고 제거한다.
  • 다양성: 도메인·분야 태그로 균형을 맞춘다.

보상 쪽에도 데이터가 많이 들어간다. 코딩은 웹 문제에 테스트가 없는 경우가 많아 CYaRon 라이브러리로 테스트 생성기를 만들게 했다. 문제당 테스트 50개를 만들어 정답 제출 10개 중 7개 이상이 같은 결과를 내는 것만 남기고, 정답 제출 10개 중 9개 이상이 전부 통과하는 문제만 학습에 넣는다. 온라인 대회 문제 1,000개 표본에서 special judge가 필요 없는 문제는 약 614개, 유효 테스트 40개 이상을 만든 생성기가 463개, 최종 학습 문제는 323개였다(§2.3.5). 수학 채점기는 value-head 보상모델(약 80만 개 데이터)과 CoT를 생성한 뒤 JSON으로 판정하는 Chain-of-Thought RM(같은 규모)을 비교했고, 수동 점검 정확도가 각각 약 84.4와 98.5여서 RL에는 후자를 썼다.

학습

사전학습과 SFT

사전학습 세부 하이퍼파라미터는 없다. Vanilla SFT는 32k 길이로 1 epoch(학습률 2×10−5→2×10−62\times10^{-5}\to2\times10^{-6}), 이어서 128k 길이로 1 epoch(학습률을 1×10−51\times10^{-5}로 다시 warmup한 뒤 1×10−61\times10^{-6}까지 감소)를 돌린다(§2.5.2). 그 위에 long-CoT warmup SFT를 가볍게 한 번 한다.

RL 목적함수

문제 xx, 정답 y⋆y^\star, 모델이 생성한 사고 과정 zz와 답 yy에 대해 보상은 r(x,y,y⋆)∈{0,1}r(x,y,y^\star)\in\{0,1\}이다. 목표는 max⁡θE[r]\max_\theta \mathbb{E}[r]이다. k1.5는 이것을 한 번에 풀지 않고, ii번째 iteration의 모델 πθi\pi_{\theta_i}를 기준점으로 KL 정규화 문제를 푼다(식 2).

max⁡θ E(x,y⋆)[ E(y,z)∼πθ[r(x,y,y⋆)]−τ KL(πθ(⋅∣x) ∥ πθi(⋅∣x))]\max_\theta\ \mathbb{E}_{(x,y^\star)}\Big[\ \mathbb{E}_{(y,z)\sim\pi_\theta}\big[r(x,y,y^\star)\big]-\tau\,\mathrm{KL}\big(\pi_\theta(\cdot\mid x)\,\|\,\pi_{\theta_i}(\cdot\mid x)\big)\Big]

이것은 RLHF-PPO에서 본 KL 정규화 목적함수와 같은 꼴이지만 기준점이 고정된 πref\pi_{\text{ref}}가 아니라 직전 정책이다. 매 iteration 기준점을 옮기며 조금씩 나아가는 것이 mirror descent다. 해는 닫힌 꼴로 알려져 있다.

π⋆(y,z∣x)=πθi(y,z∣x) exp⁡ ⁣(r(x,y,y⋆)/τ)Z,Z=∑y′,z′πθi(y′,z′∣x)exp⁡ ⁣(r(x,y′,y⋆)/τ)\pi^\star(y,z\mid x)=\frac{\pi_{\theta_i}(y,z\mid x)\,\exp\!\big(r(x,y,y^\star)/\tau\big)}{Z},\qquad Z=\sum_{y',z'}\pi_{\theta_i}(y',z'\mid x)\exp\!\big(r(x,y',y^\star)/\tau\big)

(유도: 라그랑주 승수로 정규화 조건을 넣고 π\pi에 대해 미분하면 r−τ(log⁡π−log⁡πθi+1)−μ=0r-\tau(\log\pi-\log\pi_{\theta_i}+1)-\mu=0, 즉 π∝πθier/τ\pi\propto\pi_{\theta_i}e^{r/\tau}.) 양변에 로그를 취하면 모든 (y,z)(y,z)에 대해 성립하는 일관성 조건이 나온다.

r(x,y,y⋆)−τlog⁡Z=τlog⁡π⋆(y,z∣x)πθi(y,z∣x)r(x,y,y^\star)-\tau\log Z=\tau\log\frac{\pi^\star(y,z\mid x)}{\pi_{\theta_i}(y,z\mid x)}

“모든 (y,z)(y,z)에 대해”라는 점이 핵심이다. 이 등식은 어떤 분포에서 뽑은 응답으로도 확인할 수 있으니 off-policy 데이터를 쓸 수 있다. k1.5는 이 조건의 제곱 위반을 손실로 삼는다.

L(θ)=E(x,y⋆) E(y,z)∼πθi[(r(x,y,y⋆)−τlog⁡Z−τlog⁡πθ(y,z∣x)πθi(y,z∣x))2]L(\theta)=\mathbb{E}_{(x,y^\star)}\ \mathbb{E}_{(y,z)\sim\pi_{\theta_i}}\Big[\Big(r(x,y,y^\star)-\tau\log Z-\tau\log\frac{\pi_\theta(y,z\mid x)}{\pi_{\theta_i}(y,z\mid x)}\Big)^2\Big]

τlog⁡Z\tau\log Z는 πθi\pi_{\theta_i}에서 뽑은 kk개 표본으로 τlog⁡1k∑jerj/τ\tau\log\frac1k\sum_j e^{r_j/\tau}처럼 추정할 수 있지만, 보고서는 평균 보상 rˉ\bar r 을 써도 실전에서 잘 된다고 쓴다. τ→∞\tau\to\infty이면 τlog⁡Z→Eπθi[r]\tau\log Z\to\mathbb{E}_{\pi_{\theta_i}}[r]이기 때문이다. 이렇게 하면 kk개 표본에 대한 gradient는 다음과 같다(식 3).

1k∑j=1k(∇θlog⁡πθ(yj,zj∣x) (rj−rˉ)−τ2∇θ(log⁡πθ(yj,zj∣x)πθi(yj,zj∣x))2)\frac1k\sum_{j=1}^{k}\Big(\nabla_\theta\log\pi_\theta(y_j,z_j\mid x)\,\big(r_j-\bar r\big)-\frac{\tau}{2}\nabla_\theta\Big(\log\frac{\pi_\theta(y_j,z_j\mid x)}{\pi_{\theta_i}(y_j,z_j\mid x)}\Big)^2\Big)

(제곱 손실을 미분해 상수 −2τ-2\tau로 나누면 이 꼴이 된다. ∇θlog⁡πθ⋅τlog⁡πθπθi=τ2∇θ(log⁡πθπθi)2\nabla_\theta\log\pi_\theta\cdot\tau\log\frac{\pi_\theta}{\pi_{\theta_i}}=\frac{\tau}{2}\nabla_\theta\big(\log\frac{\pi_\theta}{\pi_{\theta_i}}\big)^2.) 읽는 법은 간단하다. 첫 항은 평균 보상을 baseline으로 쓰는 REINFORCE(RLOO와 같은 계열)이고, 둘째 항은 로그비의 L2 정규화다. PPO의 clip이 ratio를 상자에 가두는 대신 여기서는 로그비 제곱이 부드럽게 끌어당긴다. 응답이 on-policy가 아니라 πθi\pi_{\theta_i}에서 나왔다는 점만 다르다. 보고서는 이를 “on-policy 정규화 policy gradient를 off-policy로 확장한 것”이라 부른다. 기준 정책이 매 iteration 바뀌어 매번 다른 최적화 문제가 되므로 iteration마다 optimizer 상태를 초기화한다.

value network를 쓰지 않는 이유

보고서(§2.3.2)의 논거는 흥미롭다. 부분 CoT 뒤에 두 갈래 zt+1z_{t+1}(곧장 정답)과 zt+1′z'_{t+1}(오류 포함)이 있다고 하자. 완벽한 value function이라면 zt+1′z'_{t+1}에 음의 advantage를 준다. 그런데 긴 CoT에서는 zt+1′z'_{t+1}로 갔다가 오류를 발견하고 회복해 정답에 도달하는 궤적이야말로 배워야 할 행동이다. 최종 답만으로 보상을 주면 이런 시행착오 궤적이 통째로 양의 신호를 받는다. 정확한 credit assignment가 오히려 탐색을 벌할 수 있다는 주장이다.

길이 보상 (§2.3.3)

RL이 진행되며 응답 길이가 급격히 늘어나는 overthinking을 누르기 위해, 한 프롬프트의 kk개 응답 길이 len(i)\mathrm{len}(i)에서 최솟값·최댓값을 구해

λi=0.5−len(i)−min_lenmax_len−min_len,len_reward(i)={λiri=1min⁡(0,λi)ri=0\lambda_i=0.5-\frac{\mathrm{len}(i)-\mathrm{min\_len}}{\mathrm{max\_len}-\mathrm{min\_len}},\qquad \mathrm{len\_reward}(i)=\begin{cases}\lambda_i & r_i=1\\ \min(0,\lambda_i) & r_i=0\end{cases}

를 원래 보상에 가중치를 곱해 더한다. 정답 중에서는 짧을수록 +0.5, 길수록 −0.5를 받고, 오답은 길면 벌만 받고 짧다고 상을 받지는 않는다. 모든 길이가 같으면 0이다. 초반에 넣으면 학습이 느려져서 처음에는 길이 보상 없이 학습하다가 이후 일정한 가중치로 켠다(warmup).

→ 더 깊이: Long-horizon RL — 요즘 agent RL에서 긴 궤적의 길이 예산, context 관리, credit.

샘플링 (§2.3.4)

  • curriculum: 쉬운 문제에서 어려운 문제로. 데이터에 이미 학년·난이도 라벨이 있다.
  • prioritized: 문제 ii의 성공률 sis_i를 추적해 1−si1-s_i에 비례해 뽑는다.

long2short: 긴 추론을 짧은 모델로 (§2.4)

long-CoT 모델의 “생각 습관”을 짧은 모델로 옮기는 네 방법.

방법내용
model merginglong-CoT 모델과 short-CoT 모델의 가중치를 단순 평균
shortest rejection sampling같은 질문을 n=8n=8번 풀게 해 가장 짧은 정답으로 SFT
DPO가장 짧은 정답을 chosen, 오답과 1.5배 이상 긴 정답을 rejected로
long2short RL성능-효율 균형이 좋은 체크포인트에서 길이 보상을 켜고 최대 rollout 길이를 크게 줄여 다시 RL

핵심 method 깊게 보기

1. mirror descent 한 걸음을 눈으로 보기

아래 그림은 열 개의 “풀이 전략” 중 셋만 정답인 장난감 문제에서 k1.5 갱신을 한 iteration씩 밟는다. 정확한 해 π⋆\pi^\star(검은 테두리)와, 실제 알고리즘처럼 kk개 표본으로 만든 손실을 최소화해서 얻은 정책(색 막대)을 나란히 보여 준다.

iteration 0 E[r] 현재now – KL(πi+1‖πi) – τ log Z – r̄ –
Of ten "solution strategies", only the three green bars are correct (r=1). Grey is the current policy πi, the black outline is the exact solution of the KL-regularised problem π* ∝ πi·exp(r/τ), and the coloured bars are πi+1 obtained by actually minimising the squared surrogate built from k samples. Lower τ and each iteration takes a bigger step (the correct logits rise by 1/τ): faster, but with a larger KL. Drop k to 2–4 and correct strategies that were not sampled barely move, so the update drifts away from π*. Right: the E[r] trajectory — dashed is exact mirror descent, solid the sample-based update. 열 개의 "풀이 전략" 중 초록 막대 세 개만 정답(r=1)이다. 회색은 현재 정책 πi, 검은 테두리는 KL 정규화 문제의 정확한 해 π* ∝ πi·exp(r/τ), 색 막대는 k개 표본으로 만든 제곱 surrogate 손실을 실제로 최소화해서 얻은 πi+1이다. τ를 줄이면 한 iteration의 걸음이 커져(정답 logit이 1/τ씩 오른다) 빨리 수렴하지만 KL이 커진다. k를 2–4로 줄이면 표본에 안 뽑힌 정답 전략은 거의 움직이지 않아 π*와 어긋난다. 오른쪽은 E[r]의 궤적: 점선은 정확한 mirror descent, 실선은 표본 기반 갱신.
  1. With the defaults (τ=1\tau=1, k=8k=8), press “One iteration”: the coloured bars roughly follow the black outlines. The correct strategies’ probabilities grow by a factor e1/τe^{1/\tau}.
  2. Drop τ\tau to 0.1 and almost all mass moves to the correct strategies at once. Note the large KL: τ\tau is mirror descent’s inverse learning rate.
  3. Drop kk to 2: in iterations where no correct strategy is sampled nothing happens, and sampled strategies move too much. The minimiser of the sample loss satisfies the consistency condition only on the sampled responses.
  4. Switching the baseline to τlog⁡Z^\tau\log\hat Z makes little difference for large τ\tau. For small τ\tau, τlog⁡Z\tau\log Z exceeds the mean reward (it is pulled towards the maximum), so wrong samples are pushed down harder.

The code below checks that the closed-form solution actually maximises the objective, that the consistency condition holds exactly, and that the minimiser of the squared surrogate written with the exact expectation coincides with π⋆\pi^\star.

NumPy k1.5 mirror descent: closed form and squared surrogate
import numpy as np

# Toy policy over 6 responses (= CoT + answer). Responses 2 and 5 are correct.
r   = np.array([0., 0., 1., 0., 0., 1.])
pi_i = np.array([0.30, 0.25, 0.10, 0.20, 0.10, 0.05])   # current (anchor) policy π_θi
tau = 0.5

# 1) Closed form  π* = π_i exp(r/τ) / Z
w = pi_i * np.exp(r / tau)
Z = w.sum()
pi_star = w / Z
print("π*        =", np.round(pi_star, 4))

def objective(p):                       # E_p[r] − τ KL(p ‖ π_i)
    return p @ r - tau * np.sum(p * np.log(p / pi_i))

rng = np.random.default_rng(0)
worse = 0
for _ in range(2000):                   # randomly perturbed policies all score below π*
    q = pi_star * np.exp(0.3 * rng.normal(size=6)); q /= q.sum()
    worse += objective(q) <= objective(pi_star) + 1e-12
print(f"objective at π* {objective(pi_star):.4f}, lower among 2000 random policies: {worse}")

# 2) For every y:  r − τ log Z = τ log(π*/π_i)
lhs = r - tau * np.log(Z)
rhs = tau * np.log(pi_star / pi_i)
print("max identity error:", np.abs(lhs - rhs).max())

# 3) Minimise the squared surrogate L(θ) = E_{y~π_i}[(r − τ log Z − τ log π_θ/π_i)^2] by GD on logits
theta = np.log(pi_i).copy()
for step in range(3000):
    p = np.exp(theta - theta.max()); p /= p.sum()
    res = r - tau * np.log(Z) - tau * np.log(p / pi_i)        # residual for each y
    # dL/dθ = Σ_y π_i(y) · 2 res_y · (−τ) (e_y − p)
    g = -2 * tau * (pi_i * res - (pi_i * res).sum() * p)
    theta -= 1.0 * g
p = np.exp(theta - theta.max()); p /= p.sum()
print("surrogate minimiser =", np.round(p, 4), f" |p − π*|_max = {np.abs(p - pi_star).max():.1e}")

# 4) Baseline: τ log Z versus the mean reward (τ log Z → E_{π_i}[r] as τ → ∞)
print("\n   τ    τ·log Z   E_πi[r]")
for t in [0.1, 0.5, 1, 5, 50]:
    print(f"{t:>5}  {t*np.log((pi_i*np.exp(r/t)).sum()):8.4f}  {pi_i @ r:8.4f}")
 

Two things stand out in the output. The maximum of the objective is exactly τlog⁡Z\tau\log Z (0.3361 here). That is no coincidence but the Donsker–Varadhan identity max⁡πEπ[r]−τKL(π∥πi)=τlog⁡Eπi[er/τ]\max_\pi \mathbb{E}_\pi[r]-\tau\mathrm{KL}(\pi\|\pi_i)=\tau\log\mathbb{E}_{\pi_i}[e^{r/\tau}]. And at τ=0.1\tau=0.1, τlog⁡Z=0.81\tau\log Z=0.81 is far from the mean reward 0.15. k1.5 could swap in the mean reward only under the implicit assumption that the τ\tau it uses is large compared with reward differences. The report does not give τ\tau.

2. The length reward and its descendants

k1.5’s length reward changed shape with every later Kimi model. Apply the three rules to the same group.

  1. 기본값(τ=1\tau=1, k=8k=8)에서 “한 iteration”을 누르면 색 막대가 검은 테두리를 대체로 따라간다. 정답 전략의 확률이 e1/τe^{1/\tau}배 커진다.
  2. τ\tau를 0.1로 내리면 한 번에 거의 모든 질량이 정답으로 몰린다. KL이 커지는 것을 확인하자. τ\tau는 mirror descent의 역학습률이다.
  3. kk를 2로 내리면 정답 전략이 표본에 안 뽑힌 iteration에는 아무 일도 일어나지 않고, 뽑힌 전략만 과하게 움직인다. 표본 손실의 최소점은 뽑힌 응답들에서만 일관성 조건을 맞춘다.
  4. baseline을 τlog⁡Z^\tau\log\hat Z로 바꿔도 τ\tau가 크면 차이가 거의 없다. τ\tau가 작으면 τlog⁡Z\tau\log Z가 평균 보상보다 커서(최댓값 쪽으로 끌림) 오답 표본을 더 강하게 누른다.

아래 코드는 닫힌 해가 실제로 목적함수를 최대화하는지, 일관성 조건이 정확히 성립하는지, 그리고 정확한 기대값으로 쓴 제곱 surrogate의 최소점이 π⋆\pi^\star와 일치하는지를 확인한다.

NumPy k1.5 mirror descent: 닫힌 해와 제곱 surrogate
import numpy as np

# 6개의 응답(= CoT + 답)으로 이루어진 장난감 정책. 정답은 2, 5번.
r   = np.array([0., 0., 1., 0., 0., 1.])
pi_i = np.array([0.30, 0.25, 0.10, 0.20, 0.10, 0.05])   # 현재(참조) 정책 π_θi
tau = 0.5

# 1) 닫힌 해  π* = π_i exp(r/τ) / Z
w = pi_i * np.exp(r / tau)
Z = w.sum()
pi_star = w / Z
print("π*        =", np.round(pi_star, 4))

def objective(p):                       # E_p[r] − τ KL(p ‖ π_i)
    return p @ r - tau * np.sum(p * np.log(p / pi_i))

rng = np.random.default_rng(0)
worse = 0
for _ in range(2000):                   # 무작위로 흔든 정책들은 모두 π*보다 목적함수가 낮다
    q = pi_star * np.exp(0.3 * rng.normal(size=6)); q /= q.sum()
    worse += objective(q) <= objective(pi_star) + 1e-12
print(f"π*의 목적함수 {objective(pi_star):.4f}, 무작위 2000개 중 더 낮은 것 {worse}개")

# 2) 모든 y에 대해  r − τ log Z = τ log(π*/π_i)
lhs = r - tau * np.log(Z)
rhs = tau * np.log(pi_star / pi_i)
print("항등식 최대 오차:", np.abs(lhs - rhs).max())

# 3) 제곱 surrogate L(θ) = E_{y~π_i}[(r − τ log Z − τ log π_θ/π_i)^2] 를 logit GD로 최소화
theta = np.log(pi_i).copy()
for step in range(3000):
    p = np.exp(theta - theta.max()); p /= p.sum()
    res = r - tau * np.log(Z) - tau * np.log(p / pi_i)        # 각 y의 잔차
    # dL/dθ = Σ_y π_i(y) · 2 res_y · (−τ) (e_y − p)
    g = -2 * tau * (pi_i * res - (pi_i * res).sum() * p)
    theta -= 1.0 * g
p = np.exp(theta - theta.max()); p /= p.sum()
print("surrogate 최소점 =", np.round(p, 4), f" |p − π*|_max = {np.abs(p - pi_star).max():.1e}")

# 4) baseline: τ log Z 와 평균 보상의 관계 (τ → ∞ 이면 τ log Z → E_{π_i}[r])
print("\n   τ    τ·log Z   E_πi[r]")
for t in [0.1, 0.5, 1, 5, 50]:
    print(f"{t:>5}  {t*np.log((pi_i*np.exp(r/t)).sum()):8.4f}  {pi_i @ r:8.4f}")
 

출력에서 두 가지를 눈여겨보자. 목적함수의 최댓값이 정확히 τlog⁡Z\tau\log Z(여기서 0.3361)다. 이것은 우연이 아니라 max⁡πEπ[r]−τKL(π∥πi)=τlog⁡Eπi[er/τ]\max_\pi \mathbb{E}_\pi[r]-\tau\mathrm{KL}(\pi\|\pi_i)=\tau\log\mathbb{E}_{\pi_i}[e^{r/\tau}]라는 Donsker–Varadhan 항등식이다. 그리고 τ=0.1\tau=0.1에서는 τlog⁡Z=0.81\tau\log Z=0.81로 평균 보상 0.15와 크게 다르다. k1.5가 평균 보상으로 바꿀 수 있었던 것은 실제로 쓰는 τ\tau가 보상 차이에 비해 충분히 크다는 암묵적 가정 덕분이다. 보고서는 τ\tau 값을 밝히지 않는다.

2. 길이 보상과 그 후손들

k1.5의 길이 보상은 이후 Kimi 모델마다 모양을 바꾸며 이어졌다. 같은 그룹에 세 규칙을 적용해 보자.

정답률accuracy – Σ advantage –
Eight responses sampled for one prompt. Drag a bar's end to change its length; click the number on the left to flip correctness. Top right is the final reward after applying the rule to the correctness reward r; bottom right is the advantage after subtracting the group mean (k1.5's r − r̄). Under the k1.5 rule, among correct answers the shortest gets +0.5 and the longest −0.5; wrong answers only receive the negative side. Press "all correct, lengths differ": with the correctness reward alone every advantage is 0, but the length reward creates a signal towards shorter answers. K2.5 Toggle zeroes over-budget correct answers only on easy prompts (accuracy ≥ λ); K3 overwrites any over-budget answer with −1, even a correct one. 한 프롬프트에서 뽑은 응답 8개. 막대 끝을 좌우로 끌면 길이가, 왼쪽 번호를 클릭하면 정답 여부가 바뀐다. 오른쪽 위는 정답 보상 r에 규칙을 적용한 최종 보상, 아래는 그룹 평균을 뺀 advantage(k1.5의 r − r̄)다. k1.5 규칙에서 정답끼리는 짧을수록 +0.5, 길수록 −0.5를 받고 오답은 음수 쪽만 받는다. "모두 정답, 길이만 다름"을 누르면 정답 보상만으로는 advantage가 전부 0이지만 길이 보상이 짧은 쪽으로 신호를 만든다. K2.5 Toggle은 정답률이 λ 이상인 쉬운 문제에서만 예산을 넘은 정답을 0점 처리하고, K3는 예산을 넘으면 정답이어도 −1로 덮어쓴다.
  • k1.5: a continuous reward in [−0.5,0.5][-0.5,0.5] based on relative length within the group. Crucially it creates a signal even on prompts with 100% accuracy: a group whose advantages are all zero under the correctness reward alone (the “no-signal group” of the GRPO lesson) now produces a learning signal.
  • K2 (§3.2.3 “Budget Control”): responses beyond a per-task-type token budget are truncated and penalised. The penalty value is not disclosed (so it is not in the figure).
  • K2.5 Toggle (K2.5 §4.4.2): alternate two phases every mm iterations. In phase 0, responses over budget get reward 0 only if the prompt’s mean accuracy is at least λ\lambda; phase 1 uses the original reward without a budget. The budget budget(x)\text{budget}(x) is fixed once at the start of training as the ρ\rho-th percentile of the lengths of correct responses (the figure uses ρ=50\rho=50, estimated from the same group). The motivation is the observation that rigid budgets cause “length overfitting” that fails to generalise to problems needing longer reasoning. The report says that on K2 Thinking it cut output tokens by 25–30% on average with negligible loss in performance.
  • K3 (K3 §4.1.2): set an initial budget b0(x)b_0(x) per problem from the cold-start model, and overwrite the reward with −1-1 when total tokens T(y)T(y) exceed τ⋅b0(x)\tau\cdot b_0(x). For agentic tasks T(y)T(y) also counts tool-call arguments. A max-effort expert is trained with a large τ\tau; shrinking τ\tau then gives the high and low effort experts.

The code below implements k1.5’s length reward and shows how its weight shifts the learned policy on a toy problem where “thinking longer raises accuracy, with diminishing returns”.

NumPy How the length reward suppresses overthinking
import numpy as np

def len_reward(correct, lengths):
    """Kimi k1.5 §2.3.3. correct: 0/1 array, lengths: token counts (k responses to one prompt)."""
    L = np.asarray(lengths, float)
    lo, hi = L.min(), L.max()
    if hi == lo:
        return np.zeros_like(L)
    lam = 0.5 - (L - lo) / (hi - lo)
    return np.where(np.asarray(correct) == 1, lam, np.minimum(0.0, lam))

c = np.array([1, 1, 0, 1, 0, 0, 1, 0])
L = np.array([3200, 21000, 30000, 9000, 6000, 26000, 14000, 2500])
print("len_reward:", np.round(len_reward(c, L), 3))

# Toy problem: action = a "thinking length" bucket. Longer thinking raises accuracy, with diminishing returns.
lengths = np.array([1, 2, 4, 8, 16, 32]) * 1000
p_correct = np.array([0.20, 0.45, 0.65, 0.78, 0.83, 0.85])

def train(w, iters=400, k=16, lr=0.5, seed=0):
    rng = np.random.default_rng(seed)
    theta = np.zeros(6)                                  # start from the uniform policy
    for _ in range(iters):
        pi = np.exp(theta - theta.max()); pi /= pi.sum()
        a = rng.choice(6, size=k, p=pi)
        corr = (rng.random(k) < p_correct[a]).astype(float)
        rew = corr + w * len_reward(corr, lengths[a])    # original reward + w · length reward
        adv = rew - rew.mean()                           # k1.5: mean-reward baseline
        # One step of Eq. (3) at θ = θ_i: the τ term has zero gradient, only the policy-gradient term remains.
        g = (adv[:, None] * (np.eye(6)[a] - pi)).sum(0) / k
        theta += lr * g
    pi = np.exp(theta - theta.max()); pi /= pi.sum()
    return pi

for w in [0.0, 0.3, 1.0]:
    pi = train(w)
    print(f"w={w:<4} policy={np.round(pi, 2)}  accuracy={pi @ p_correct:.3f}  mean length={pi @ lengths:6.0f}")
 

With w=0w=0 the policy piles onto the longest bucket (32k) and accuracy approaches 0.85. With w=0.3w=0.3 it moves to the 8k bucket: mean length drops to about a quarter while accuracy is 0.78. The length reward is the knob that decides “how many points of accuracy to trade for how many times the tokens”. Cutting the maximum rollout length sharply in long2short RL is pulling that knob harder.

In PyTorch: the k1.5 loss and K2.5’s token-level variant

PyTorch k1.5 / K2 sequence loss and K2.5 token loss 로컬에서 실행run locally (pip install torch)
import torch

def kimi_k15_loss(logp_new, logp_old, mask, rewards, tau):
    """k1.5 Eq. (3) / K2 §3.2.3. K responses to one prompt.
    logp_new, logp_old, mask: [K, T] token log-probs (old = at rollout time, detached)
    rewards: [K]  (already including shaping such as the length reward)"""
    seq_logratio = ((logp_new - logp_old) * mask).sum(-1)       # log π_θ(y)/π_old(y)
    rbar = rewards.mean()
    return ((rewards - rbar - tau * seq_logratio) ** 2).mean()  # squared surrogate

def kimi_k25_loss(logp_new, logp_old, mask, rewards, tau, lo, hi):
    """K2.5 Eq. (1) as a loss. Tokens whose log-ratio is outside [lo, hi] get no policy gradient (regardless of the advantage's sign).
    K2.5 writes the interval as [α, β] with α, β > 0; here it is read as lo=-α, hi=β."""
    logratio = logp_new - logp_old                               # [K, T]
    adv = (rewards - rewards.mean())[:, None]                    # sequence reward on every token
    inside = ((logratio >= lo) & (logratio <= hi)).float().detach()
    ratio = torch.exp(logratio)
    pg = inside * ratio * adv                                    # ∇ratio = ratio ∇log π
    reg = tau * logratio ** 2
    N = mask.sum()                                               # normalise by all tokens in the batch
    return -((pg - reg) * mask).sum() / N
 

The difference between the two functions summarises how RL practice changed after 2025. k1.5 put a squared penalty on one sequence log-ratio. K2.5 goes down to tokens and switches off the gradient of tokens whose log-ratio has drifted far because of the training–inference engine mismatch. Unlike PPO’s clip it looks only at the log-ratio, not at the advantage’s sign (the same family as the IS masking in the training–inference mismatch lesson).

확인 문제Check yourself

Comparing k1.5's gradient (Eq. 3) with PPO's clipped objective, which description is most accurate?

The first term of Eq. (3), ∇log⁡πθ (rj−rˉ)\nabla\log\pi_\theta\,(r_j-\bar r), is REINFORCE with the mean reward as baseline; the second, −τ2∇(log⁡πθπθi)2-\frac{\tau}{2}\nabla(\log\frac{\pi_\theta}{\pi_{\theta_i}})^2, is an L2 penalty that softly keeps the policy near the previous one. There is no clip and no value network. The differences are that responses were sampled from πθi\pi_{\theta_i} (the off-policy extension) and that the optimiser is reset each iteration.

Results

The long-CoT model (report Table 2)

  • k1.5: 그룹 안 상대 길이로 [−0.5,0.5][-0.5,0.5]의 연속 보상. 정답률이 100%인 문제에서도 신호가 생긴다는 점이 중요하다. 정답 보상만으로는 advantage가 전부 0인 그룹(GRPO 레슨의 “신호 없는 그룹”)이 길이 보상 덕분에 학습 신호를 낸다.
  • K2 (§3.2.3 “Budget Control”): 과제 유형별 최대 토큰 예산을 넘으면 잘라 내고 벌점을 준다. 벌점 값은 공개하지 않았다(그림에는 넣지 않았다).
  • K2.5 Toggle (K2.5 §4.4.2): mm iteration마다 두 단계를 번갈아 돈다. phase 0에서는 그 문제의 평균 정확도가 λ\lambda 이상일 때만 예산을 넘은 응답의 보상을 0으로 만들고, phase 1에서는 예산 없이 원래 보상을 쓴다. 예산 budget(x)\text{budget}(x)는 학습 시작 시 정답 응답 길이의 ρ\rho 백분위수로 한 번 정한다(그림은 ρ=50\rho=50으로 같은 그룹에서 추정했다). 딱딱한 예산은 더 긴 추론이 필요한 문제로 일반화하지 못하는 “length overfitting”을 낳는다는 관찰이 동기다. 보고서는 K2 Thinking에서 출력 토큰이 평균 25~30% 줄고 성능 손실은 무시할 만했다고 보고한다.
  • K3 (K3 §4.1.2): 문제마다 cold-start 모델로 초기 예산 b0(x)b_0(x)를 잡고, 총 토큰 T(y)T(y)가 τ⋅b0(x)\tau\cdot b_0(x)를 넘으면 보상을 −1-1로 덮어쓴다. agent 과제에서는 T(y)T(y)에 tool-call 인자까지 센다. τ\tau를 크게 두고 max-effort 전문가를 학습한 뒤, τ\tau를 줄여 high·low effort 전문가를 만든다.

아래 코드는 k1.5 길이 보상을 구현하고, “길게 생각할수록 정답률이 오르지만 체감하는” 장난감 문제에서 길이 보상의 가중치가 학습된 정책을 어떻게 옮기는지 본다.

NumPy 길이 보상이 overthinking을 누르는 방식
import numpy as np

def len_reward(correct, lengths):
    """Kimi k1.5 §2.3.3. correct: 0/1 배열, lengths: 토큰 수 배열 (같은 프롬프트의 k개 응답)."""
    L = np.asarray(lengths, float)
    lo, hi = L.min(), L.max()
    if hi == lo:
        return np.zeros_like(L)
    lam = 0.5 - (L - lo) / (hi - lo)
    return np.where(np.asarray(correct) == 1, lam, np.minimum(0.0, lam))

c = np.array([1, 1, 0, 1, 0, 0, 1, 0])
L = np.array([3200, 21000, 30000, 9000, 6000, 26000, 14000, 2500])
print("len_reward:", np.round(len_reward(c, L), 3))

# 장난감 문제: 행동 = "생각 길이" 구간. 길게 생각할수록 정답 확률이 오르지만 체감한다.
lengths = np.array([1, 2, 4, 8, 16, 32]) * 1000
p_correct = np.array([0.20, 0.45, 0.65, 0.78, 0.83, 0.85])

def train(w, iters=400, k=16, lr=0.5, seed=0):
    rng = np.random.default_rng(seed)
    theta = np.zeros(6)                                  # 균등 정책에서 시작
    for _ in range(iters):
        pi = np.exp(theta - theta.max()); pi /= pi.sum()
        a = rng.choice(6, size=k, p=pi)
        corr = (rng.random(k) < p_correct[a]).astype(float)
        rew = corr + w * len_reward(corr, lengths[a])    # 원래 보상 + w·길이 보상
        adv = rew - rew.mean()                           # k1.5: 평균 보상 baseline
        # 식 (3)을 θ = θ_i 에서 한 걸음: τ 항의 gradient는 0이고 정책 경사 항만 남는다.
        g = (adv[:, None] * (np.eye(6)[a] - pi)).sum(0) / k
        theta += lr * g
    pi = np.exp(theta - theta.max()); pi /= pi.sum()
    return pi

for w in [0.0, 0.3, 1.0]:
    pi = train(w)
    print(f"w={w:<4} 정책={np.round(pi, 2)}  정답률={pi @ p_correct:.3f}  평균 길이={pi @ lengths:6.0f}")
 

w=0w=0이면 정책은 가장 긴 구간(32k)으로 몰려 정답률 0.85에 가까워진다. w=0.3w=0.3에서는 8k 구간으로 옮겨 평균 길이가 약 1/4이 되고 정답률은 0.78이다. 길이 보상은 “정답률 몇 %p를 토큰 몇 배와 바꿀지”를 정하는 손잡이다. long2short RL에서 최대 rollout 길이를 크게 줄이는 것은 이 손잡이를 더 세게 당기는 것과 같다.

PyTorch로: k1.5 손실과 K2.5의 토큰 단위 변형

PyTorch k1.5 / K2 시퀀스 손실과 K2.5 토큰 손실 로컬에서 실행run locally (pip install torch)
import torch

def kimi_k15_loss(logp_new, logp_old, mask, rewards, tau):
    """k1.5 식 (3) / K2 §3.2.3. 한 프롬프트의 K개 응답.
    logp_new, logp_old, mask: [K, T] 토큰 log-prob (old는 rollout 시점, detach)
    rewards: [K]  (길이 보상 등 shaping을 이미 더한 값)"""
    seq_logratio = ((logp_new - logp_old) * mask).sum(-1)       # log π_θ(y)/π_old(y)
    rbar = rewards.mean()
    return ((rewards - rbar - tau * seq_logratio) ** 2).mean()  # 제곱 surrogate

def kimi_k25_loss(logp_new, logp_old, mask, rewards, tau, lo, hi):
    """K2.5 식 (1)을 최소화 형태로. 로그비가 [lo, hi] 밖인 토큰은 정책 경사를 끈다(advantage 부호와 무관).
    K2.5 원문은 구간을 [α, β], α, β > 0 으로 적는다. 여기서는 lo=-α, hi=β로 읽었다."""
    logratio = logp_new - logp_old                               # [K, T]
    adv = (rewards - rewards.mean())[:, None]                    # 시퀀스 보상을 모든 토큰에
    inside = ((logratio >= lo) & (logratio <= hi)).float().detach()
    ratio = torch.exp(logratio)
    pg = inside * ratio * adv                                    # ∇ratio = ratio ∇log π
    reg = tau * logratio ** 2
    N = mask.sum()                                               # 배치 전체 토큰 수로 정규화
    return -((pg - reg) * mask).sum() / N
 

두 함수의 차이가 2025년 이후 RL 실무의 변화를 요약한다. k1.5는 시퀀스 로그비 하나에 제곱 정규화를 걸었다. K2.5는 토큰 단위로 내려가 학습–추론 엔진 불일치로 크게 벌어진 토큰의 gradient를 아예 끈다. PPO clip과 달리 advantage 부호를 보지 않고 로그비만 본다는 점이 다르다(학습–추론 불일치 레슨의 IS 마스킹과 같은 계열).

확인 문제Check yourself

k1.5의 gradient(식 3)를 PPO의 clip 목적함수와 비교할 때 가장 정확한 설명은?

식 (3)의 첫 항 ∇log⁡πθ (rj−rˉ)\nabla\log\pi_\theta\,(r_j-\bar r)은 평균 보상을 baseline으로 쓰는 REINFORCE이고, 둘째 항 −τ2∇(log⁡πθπθi)2-\frac{\tau}{2}\nabla(\log\frac{\pi_\theta}{\pi_{\theta_i}})^2는 직전 정책에서 멀어지는 것을 부드럽게 막는 L2 정규화다. clip도 value network도 없다. 차이는 응답이 πθi\pi_{\theta_i}에서 뽑혔다는 것(off-policy 확장)과 optimizer를 iteration마다 초기화한다는 것이다.

실험 결과

long-CoT 모델 (보고서 Table 2)

Switch the category to see at a glance where the model leads and where it trails. Bar length is normalised to each row's maximum (for Elo, zero sits just below the row minimum). "Show difference" plots each model's score minus Kimi's. Numbers: k1.5 report, Table 2. 분야를 바꿔 보면 어느 영역에서 앞서고 어느 영역에서 뒤지는지가 한눈에 보인다. 막대 길이는 벤치마크마다 그 행의 최댓값으로 정규화했다(Elo는 행 안의 최솟값 근처를 0으로 잡았다). "차이로 보기"를 켜면 각 모델 점수에서 Kimi 점수를 뺀 값을 보여 준다. 수치: k1.5 보고서 Table 2.

The long-CoT model edges out o1 on maths (MATH-500 96.2, AIME 2024 77.5) and trails it on LiveCodeBench (62.5 vs 67.2) and MMMU (70.0 vs 77.3). The Codeforces percentile is the same (94).

The short-CoT model (report Table 3)

BenchmarkKimi k1.5 shortGPT-4o 0513Claude 3.5 Sonnet 1022DeepSeek-V3Qwen2.5-72B-Inst.
AIME 2024 (Pass@1)60.89.316.039.223.3
MATH-500 (EM)94.674.678.390.280.0
LiveCodeBench (Pass@1)47.333.436.340.531.1
MMLU (EM)87.487.288.388.585.3
C-Eval (EM)88.376.076.786.586.1
MathVista-Test (Pass@1)70.163.865.3––

The abstract’s “up to +550%” refers to AIME 2024: 60.8 versus GPT-4o’s 9.3. On general knowledge (MMLU) there is little difference, so long2short’s gains come almost entirely from reasoning tasks. Appendix C.1 notes that the IF-Eval score in Table 3 came from an intermediate model, not the final one.

What the ablations say

  • long2short comparison (§3.4, Figure 7): long2short RL has the best token efficiency, ahead of DPO, merging and shortest rejection sampling. k1.5-short w/ rl reaches Pass@1 60.8 on AIME 2024 (mean over 8 runs) with 3,272 tokens on average; the shortest variant (k1.5-shortest) reaches 88.2 on MATH500 with about the same token count as other short models.
  • Length and performance (§3.3, Figures 5–6): on a smaller internal model, accuracy and response length rise together during training, and length rises more steeply on harder benchmarks.
  • Model size vs context (§3.5, Figure 8): a smaller model can match a larger one by writing longer CoTs after RL, but the larger model is more token-efficient.
  • Negative gradients (Figure 10): k1.5’s method is clearly more sample-efficient than ReST, which only re-fits good responses — evidence that pushing down wrong responses matters for learning long CoT.
  • Curriculum (Figure 9): warm-up on all data followed by a focus on hard problems beats uniform sampling.

All ablations are given only as plots, so exact numbers cannot be read off.

Reading critically

  • The model is invisible. Size, architecture, pre-training tokens, and the number of RL problems, iterations, τ\tau and length-reward weight are all missing; the weights are closed. It cannot be reproduced, and “how much did RL contribute” cannot be separated from the base model.
  • The case for the mean-reward substitution is weak. τlog⁡Z≈rˉ\tau\log Z\approx\bar r holds only for large τ\tau (the table in the code above). Then the actual algorithm is less mirror descent than “mean-baseline REINFORCE + L2 regularisation”, and the derivation is closer to motivation. There is no direct comparison showing this regulariser beats PPO-clip or GRPO.
  • Off-policy handling in partial rollout. There is no rule for how trajectories mixing several policy versions are weighted or which segments are dropped from the loss. That K2.5 introduced token masking is itself evidence that the problem was real.
  • Comparison conditions. The vision scores of short-CoT baselines come from OpenCompass (Table 3 caption); the sources and evaluation settings (number of samples, temperature) of o1 numbers in the long-CoT comparison are not stated. On AIME 2024, with 30 problems, one problem is 3.3 points.
  • K2.5’s notation. The follow-up K2.5 Eq. (1) writes the log-ratio interval as [α,β][\alpha,\beta] with α,β>0\alpha,\beta>0; read literally, it would mask on-policy tokens (log-ratio 0). It most likely means [−α,β][-\alpha,\beta], or the ratio interval [α,β][\alpha,\beta]. Check the intent when implementing.
확인 문제Check yourself

What happens when k1.5's length reward is switched on for a group in which every response is correct?

With the correctness reward alone, ri−rˉ=0r_i-\bar r=0 and there is no signal. The length reward gives correct answers λi=0.5−len(i)−min⁡max⁡−min⁡\lambda_i=0.5-\frac{\mathrm{len}(i)-\min}{\max-\min}, so the shortest gets +0.5w+0.5w and the longest −0.5w-0.5w. After subtracting the mean, short responses get positive advantages. Even easy prompts produce the signal “same answer, but shorter”.

Summary

  • k1.5 derives a consistency condition from the closed-form solution π⋆∝πθier/τ\pi^\star\propto\pi_{\theta_i}e^{r/\tau} of a KL-regularised problem anchored at the previous policy and learns its squared violation. In practice it is mean-baseline REINFORCE + an L2 penalty on the log-ratio.
  • It drops the value network, arguing that precise credit assignment can punish trial-and-error trajectories that recover from mistakes.
  • Partial rollout made 128k-context RL feasible; its price, off-policy trajectories, carries over into K2.5–K3’s token masking and λ-pause scheme.
  • The length reward creates a signal even in 100%-accuracy groups, and evolved into K2’s budget control → K2.5’s Toggle → K3’s per-effort budget overwrite.
  • long2short RL was more token-efficient than merging, DPO and shortest rejection sampling; the short-CoT model scored 60.8 on AIME 2024 with 3,272 tokens on average.
  • Model size, data scale and key hyperparameters are undisclosed, so reproducibility is low; its value is as a record of the method’s lineage.

long-CoT 모델은 수학(MATH-500 96.2, AIME 2024 77.5)에서 o1을 약간 앞서고, LiveCodeBench(62.5 대 67.2)와 MMMU(70.0 대 77.3)에서는 뒤진다. Codeforces 백분위는 같다(94).

short-CoT 모델 (보고서 Table 3)

벤치마크Kimi k1.5 shortGPT-4o 0513Claude 3.5 Sonnet 1022DeepSeek-V3Qwen2.5-72B-Inst.
AIME 2024 (Pass@1)60.89.316.039.223.3
MATH-500 (EM)94.674.678.390.280.0
LiveCodeBench (Pass@1)47.333.436.340.531.1
MMLU (EM)87.487.288.388.585.3
C-Eval (EM)88.376.076.786.586.1
MathVista-Test (Pass@1)70.163.865.3––

초록의 “최대 +550%“는 AIME 2024에서 GPT-4o(9.3) 대비 60.8을 말한다. 일반 지식(MMLU)에서는 큰 차이가 없다. 즉 long2short의 이득은 거의 전부 추론 과제에서 나온다. 보고서는 IF-Eval 점수가 최종 모델이 아니라 중간 모델에서 나왔다고 부록 C.1에서 밝힌다.

ablation이 말해 주는 것

  • long2short 비교 (§3.4, Figure 7): long2short RL이 DPO·병합·최단 rejection sampling보다 토큰 효율이 가장 좋다. k1.5-short w/ rl은 AIME 2024에서 평균 3,272 토큰으로 Pass@1 60.8(8회 평균), 가장 짧은 변형(k1.5-shortest)은 MATH500 88.2를 다른 short 모델과 비슷한 토큰 수로 얻었다.
  • 길이와 성능 (§3.3, Figure 5–6): 작은 내부 모델에서 학습이 진행되며 정확도와 응답 길이가 함께 오르고, 어려운 벤치마크일수록 길이가 가파르게 는다.
  • 모델 크기 대 문맥 (§3.5, Figure 8): 작은 모델도 RL로 더 긴 CoT를 쓰면 큰 모델과 비슷한 성능에 도달하지만, 큰 모델이 토큰 효율이 더 좋다.
  • 음의 gradient (Figure 10): 좋은 응답만 다시 학습하는 ReST보다 k1.5 방법의 표본 효율이 확연히 좋다. 틀린 응답을 눌러 주는 신호가 긴 CoT 학습에 중요하다는 근거다.
  • curriculum (Figure 9): 전체 데이터로 warmup 후 어려운 문제에 집중하는 쪽이 균등 샘플링보다 낫다.

ablation은 모두 그림으로만 제시되어 정확한 수치를 읽을 수 없다.

비판적으로 읽기

  • 모델이 보이지 않는다. 크기, 아키텍처, 사전학습 토큰 수, RL에 쓴 문제 수·iteration 수·τ\tau·길이 보상 가중치가 모두 빠져 있다. 가중치도 공개하지 않았다. 재현은 불가능하고, “RL이 얼마나 기여했나”를 base 모델과 분리해 판단할 수 없다.
  • 평균 보상 대체의 근거가 약하다. τlog⁡Z≈rˉ\tau\log Z\approx\bar r은 τ\tau가 클 때만 맞다(위 코드의 표). 그렇다면 실제 알고리즘은 mirror descent라기보다 “평균 baseline REINFORCE + L2 정규화”이고, 유도는 동기 부여에 가깝다. 이 정규화가 PPO-clip이나 GRPO보다 나은지 직접 비교한 실험은 없다.
  • partial rollout의 off-policy 처리. 여러 정책 버전이 섞인 궤적을 어떻게 가중하는지, 어떤 segment를 손실에서 빼는지 규칙이 없다. 후속 K2.5가 토큰 마스킹을 도입한 것 자체가 이 문제가 실제로 있었다는 방증이다.
  • 비교 조건. short-CoT 비교 대상의 비전 점수는 OpenCompass에서 가져왔고(Table 3 캡션), long-CoT 비교의 o1 수치 출처와 평가 설정(샘플 수, temperature)은 명시되지 않았다. AIME 2024처럼 문제 수가 30개인 벤치마크는 1문제가 3.3%p다.
  • K2.5 수식의 표기. 후속 K2.5 식 (1)은 로그비 구간을 [α,β][\alpha,\beta], α,β>0\alpha,\beta>0로 적는데, 문자 그대로 읽으면 로그비 0(on-policy) 토큰이 마스킹된다. 실제로는 [−α,β][-\alpha,\beta] 또는 ratio 구간 [α,β][\alpha,\beta]를 뜻할 가능성이 높다. 구현할 때는 의도를 확인해야 한다.
확인 문제Check yourself

모든 응답이 정답인 그룹에서 k1.5 길이 보상을 켜면 어떤 일이 생기는가?

정답 보상만으로는 ri−rˉ=0r_i-\bar r=0이라 신호가 없다. 길이 보상은 정답끼리 λi=0.5−len(i)−min⁡max⁡−min⁡\lambda_i=0.5-\frac{\mathrm{len}(i)-\min}{\max-\min} 를 주므로 가장 짧은 응답은 +0.5w+0.5w, 가장 긴 응답은 −0.5w-0.5w를 받는다. 평균을 빼면 짧은 응답이 양의 advantage를 받는다. 쉬운 문제에서도 “같은 정답을 더 짧게”라는 신호가 생기는 것이다.

정리

  • k1.5는 직전 정책 기준 KL 정규화 문제의 닫힌 해 π⋆∝πθier/τ\pi^\star\propto\pi_{\theta_i}e^{r/\tau}에서 일관성 조건을 끌어내고, 그 제곱 위반을 손실로 학습한다. 실전 형태는 평균 보상 baseline REINFORCE + 로그비 L2 정규화다.
  • value network를 쓰지 않는 이유로, 오류에서 회복하는 시행착오 궤적을 정확한 credit assignment가 오히려 벌할 수 있다는 논거를 든다.
  • 128k 문맥 RL을 partial rollout으로 가능하게 했고, 그 대가인 off-policy 궤적 문제는 K2.5·K3의 토큰 마스킹과 λ-중단 방식으로 이어진다.
  • 길이 보상은 정답률 100% 그룹에서도 신호를 만들고, K2 budget control → K2.5 Toggle → K3 effort별 예산 덮어쓰기로 진화했다.
  • long2short RL이 병합·DPO·최단 rejection sampling보다 토큰 효율이 좋았고, short-CoT 모델은 AIME 2024에서 평균 3,272 토큰으로 60.8을 냈다.
  • 모델 크기·데이터 규모·핵심 하이퍼파라미터가 비공개라 재현성은 낮다. 방법론의 계보를 읽는 문서로 가치가 크다.

더 읽을거리Further reading