KAT: Adaptive Reasoning & Agentic Coding
- Kwaipilot-AutoThink (KAT) is an adaptive reasoning model family that dynamically toggles between reasoning and non-reasoning modes to optimize performance and reduce token usage.
- The KAT line, including KAT-V1-40B and KAT-Coder, employs a dual-regime training paradigm with structured supervision and reinforcement stages to mitigate overthinking.
- KAT integrates adaptive reasoning with agentic coding, enabling production-grade IDE support and delivering competitive performance on reasoning and coding benchmarks.
Kwaipilot-AutoThink, usually abbreviated KAT, denotes a Kuaishou-developed model family and training paradigm centered on adaptive reasoning control: the model is trained to switch between reasoning mode and non-reasoning mode according to task complexity rather than emitting long chain-of-thought traces indiscriminately (Zhan et al., 11 Jul 2025). In its initial public form, KAT is presented as an open-source 40B dense LLM, KAT-V1-40B, aimed at the overthinking problem in reasoning-intensive tasks; in later reports, the same KAT line expands into agentic coding systems, notably KAT-Coder, the open-sourced 32B checkpoint KAT-Dev, and the continued-post-training successor KAT-Coder-V2 (Zhan et al., 11 Jul 2025, Zhan et al., 21 Oct 2025, Li et al., 29 Mar 2026).
1. Definition, scope, and naming
KAT is defined in the KAT-V1 report as Kwaipilot-AutoThink, and in the KAT-Coder report as the broader model line and training philosophy under which code-specialized descendants are organized (Zhan et al., 11 Jul 2025, Zhan et al., 21 Oct 2025). The naming is hierarchical rather than flat: KAT denotes the family-level idea of adaptive or autonomous reasoning, KAT-Coder denotes a code-specialized agentic model, and KAT-Dev denotes the released deployment-oriented checkpoint.
| Name | Meaning | Role |
|---|---|---|
| KAT | Kwaipilot-AutoThink | Broader model line and training philosophy |
| KAT-V1-40B | Dense 40B model | Initial open-source adaptive reasoning model |
| KAT-Coder | Code-specialized KAT model | Agentic coding system in the technical report |
| KAT-Dev | Open-sourced 32B checkpoint | Deployment-oriented member of the KAT-Coder series |
| KAT-Coder-V2 | Continued-post-training successor | “Specialize-then-Unify” agentic coding model |
The family is framed not as a generic chat model line but as a response to two related system-level mismatches. In KAT-V1, the mismatch is between reasoning-heavy LLMs and interactive applications where indiscriminate chain-of-thought causes unnecessary latency and token inflation. In KAT-Coder, the mismatch is between static text-based code-model training and dynamic real-world agentic execution, where a model must plan, act, use tools, recover from failures, and operate inside interactive software workflows (Zhan et al., 11 Jul 2025, Zhan et al., 21 Oct 2025).
The reports also place KAT inside a production setting rather than a purely benchmark-driven one. KAT-V1 is described as deployed in Kwaipilot, Kuaishou’s internal coding assistant, and KAT-Coder is explicitly designed for production-grade IDE environments rather than only offline code completion (Zhan et al., 11 Jul 2025, Zhan et al., 21 Oct 2025).
2. AutoThink as adaptive reasoning control
The conceptual core of KAT is the AutoThink paradigm: the model should decide whether to enter a deliberative reasoning regime or answer directly, rather than treating explicit reasoning as uniformly beneficial (Zhan et al., 11 Jul 2025). The target failure mode is overthinking, defined as applying chain-of-thought-style reasoning to tasks that do not require it, thereby increasing latency, inflating token usage, and degrading efficiency in interactive systems.
In the KAT-V1 framing, the two operational modes are reasoning mode and non-reasoning mode. Reasoning mode corresponds to explicit chain-of-thought generation; non-reasoning mode corresponds to direct answering without multi-step deliberation. The claimed benefits are fourfold: higher or competitive accuracy on difficult reasoning tasks, improved efficiency through reduced unnecessary reasoning, stronger controllability, and substantial token reduction, including repeated claims of savings up to roughly 30% relative to strong reasoning baselines (Zhan et al., 11 Jul 2025).
The model is designed to support both autonomous mode switching and user-guided mode switching. Autonomous switching is learned within the autoregressive policy itself: at inference time the model first produces a <judge> analysis and then emits either <think_on> or <think_off>, after which generation proceeds accordingly. User-guided switching remains possible through prompt-level directives such as “DO NOT THINK” or “Think deeper”, which bias or override the default behavior (Zhan et al., 11 Jul 2025).
This mode-selection view distinguishes KAT from systems that only improve reasoning quality once reasoning has already been invoked. Related later work on adaptive reasoning is conceptually adjacent but methodologically different. ThinkPilot performs training-free optimization of > ... prefixes by behavior-guided evolutionary search, while Omni-AutoThink applies a two-stage supervised-plus-RL recipe to multimodal omni models and uses a think/no-think reward asymmetry to induce adaptive reasoning behavior (Li et al., 14 Oct 2025, Yang et al., 3 Dec 2025). A plausible implication is that KAT belongs to a broader 2025–2026 research shift in which “whether to think” becomes a separate optimization target from “how to think.”
3. KAT-V1-40B: model, data, and knowledge transfer
The concrete initial KAT release is KAT-V1-40B, a dense 40B-parameter model obtained by upscaling Qwen2.5-32B to 40B through targeted layer-wise expansion after layer saturation analysis. The paper reports 80 layers, no tied embedding, 40 / 8 attention heads (Q / KV), and 32K context length. It explicitly notes that “pre-training” means continued pre-training based on the upscaled Qwen2.5-32B to a 40B scale, not training from scratch (Zhan et al., 11 Jul 2025).
The KAT-V1 training system is a two-stage framework. The first stage is described as pre-training: knowledge enhancement, where the model learns to follow externally supplied mode cues using explicit trigger tokens <think_on> and <think_off>. These tokens are not involved in loss computation, but function as mode selectors during training. At this stage the model learns passive switching rather than autonomous gating (Zhan et al., 11 Jul 2025).
A central contribution of this stage is the construction of a dual-regime dataset. Queries are first assessed by a novel data labeling system using state-of-the-art LLMs to evaluate difficulty and domain characteristics. Think-off queries are those judged not to require multi-step reasoning; for these, DeepSeek-V3 is used to generate responses, followed by reject sampling with multiple state-of-the-art LLMs so that only accurate and relevant completions are retained. Think-on queries are processed through a multi-agent framework with three roles—solver, thinker, and critic—to generate verified long-CoT traces. The Stage 1 corpus contains approximately 10 million examples, with 34.8% Think-on and 65.2% Think-off (Zhan et al., 11 Jul 2025).
Knowledge transfer in Stage 1 uses MTP-enhanced knowledge distillation. The teachers are regime-specific: DeepSeek-V3 for Think-off data and DeepSeek-R1-0528 for Think-on data. The student is augmented with Multi-Token Prediction (MTP) modules that predict multiple future tokens in parallel, and the report states that combining MTP with a Universal Logit Distillation Loss yields approximately a 5 percent improvement over standard KD on several benchmarks (Zhan et al., 11 Jul 2025). The paper does not provide the exact ULD or MTP objective equations, but it is explicit that token-level logit alignment outperformed the other intermediate alignment strategies examined.
The report also describes a scaling extension beyond the dense 40B checkpoint. An early KAT-V1-200B row is reported for a 200B Mixture-of-Experts (MoE) model with 40B activated parameters, and the paper uses those early results to argue that the AutoThink paradigm scales beyond the initial dense release (Zhan et al., 11 Jul 2025).
4. Cold start, structured supervision, and Step-SRPO
The second KAT-V1 stage is the post-training: AutoThink stage, where externally guided switching is converted into autonomous mode selection. This transition begins with a cold-start initialization procedure. For each user query, the system uses a majority voting mechanism across multiple model outputs to decide the preferred reasoning mode, then samples responses from DeepSeek-R1 for Think-On and DeepSeek-V3 for Think-Off. DeepSeek-V3 is additionally used to produce a judgment rationale explaining why the chosen mode is appropriate; these rationales act as mode-selection priors (Zhan et al., 11 Jul 2025).
An exploration mechanism is built into this cold-start process: 1% of the queries are randomly assigned a mode, regardless of majority voting. The report states that this is intended to expose the model to diverse reasoning scenarios and reduce overfitting to biased gating patterns (Zhan et al., 11 Jul 2025).
The Stage 2 supervision format uses explicit structural tokens:
1 2 3 4 5 6 7 8 |
<think-on format>
<judge> {judge_analysis} </judge>
<think_on> <think> {thinking_content} </think>
<answer> {response} </answer>
<think-off format>
<judge> {judge_analysis} </judge>
<think_off> <answer> {response} </answer> |
This decomposition makes three sub-behaviors explicit: judgment, mode selection, and answer generation. The Stage 2 corpus contains approximately 3.5 million examples, with Think-on to Think-off at roughly 2:1, spanning code, math, science, general, multi-turn, and tool use (Zhan et al., 11 Jul 2025).
The final reinforcement-learning stage is Step-SRPO, described as an extension that introduces intermediate supervision into a GRPO/SRPO-style framework. The paper does not provide the full derivation, but it repeatedly characterizes the method as jointly optimizing Thinking Control, Reasoning RL, and General RL in one training session. The reward is split into Judge Reward, based on correctness of reasoning activation, and Answer Reward, based on final answer correctness or quality and modulated by the Judge Reward (Zhan et al., 11 Jul 2025).
Reward definitions are given by domain rather than by a single closed-form global equation. In math, evaluation uses symbolic equivalence checks; in code, predefined unit tests; in science, comparison of the first extracted multiple-choice answer letter; in general, lightweight heuristics such as keyword overlap and a simple classifier. The Stage 3 RL corpus contains 45K samples and is biased toward harder examples while retaining a small proportion of easy examples for stabilization (Zhan et al., 11 Jul 2025).
At inference time, switching remains explicit rather than latent. The trained model first produces a <judge> analysis, then emits either <think_on> or <think_off>. This suggests that KAT operationalizes adaptive reasoning as a structured token-level behavior rather than a separate hidden controller.
5. Agentic coding evolution: KAT-Coder, KAT-Dev, and KAT-Coder-V2
The KAT family later broadens from adaptive reasoning in general LLMs to agentic coding. The KAT-Coder Technical Report describes a large-scale coding model meant to operate in interactive software development workflows, and presents a four-stage curriculum: Mid-Term Training, Supervised Fine-Tuning (SFT), Reinforcement Fine-Tuning (RFT), and Reinforcement-to-Deployment Adaptation (Zhan et al., 21 Oct 2025).
Mid-Term Training uses a heterogeneous corpus that includes a real-world software engineering corpus of about 20B tokens mined from GitHub, reasoning and reflection data, synthetic Plan–Action–Observation trajectories, and instruction-following data with logical and structural constraints. The SFT stage constructs over one million samples, deliberately balanced across over twenty mainstream programming languages, ten representative contexts, and ten task archetypes. The RFT stage introduces multiple trajectory ground truths and a relative evaluation framework under GRPO, while the deployment-adaptation stage introduces Error-Masked SFT (EM-SFT) and Tree-Structured Trajectory Training (TST) for production IDE traces (Zhan et al., 21 Oct 2025).
The coding branch has its own internal naming hierarchy. KAT-Coder is the code-specialized technical system; KAT-Dev is the open-sourced 32B deployment-oriented checkpoint hosted at Kwaipilot/KAT-Dev; and the family is described as a deployable foundation for real-world intelligent coding agents (Zhan et al., 21 Oct 2025). A key systems contribution in this report is Trie Packed Training, which treats agent trajectories with shared prefixes as tries and computes those shared prefixes only once, using custom kernels for shared-prefix mask attention and modified positional embeddings.
The subsequent KAT-Coder-V2 Technical Report recasts agentic coding under a “Specialize-then-Unify” paradigm. Agentic coding is decomposed into five expert domains—SWE, WebCoding, Terminal, WebSearch, and General—each trained independently through SFT and RL before consolidation into a single model via on-policy distillation (Li et al., 29 Mar 2026). The report formalizes RL training samples as
emphasizing that an agentic example is not merely a prompt-response pair but an environment, toolset, scaffold, task, and verifier.
KAT-Coder-V2 also introduces two infrastructure and optimization components. KwaiEnv is a modular environment layer that supports datasets, verifiers, scaffolds, sandboxes, and trajectory management, with the report stating support for tens of thousands of concurrent sandbox instances. MCLA, or Monte-Carlo Log-probability Averaging, addresses MoE RL instability by averaging repeated log-probability estimates,
while Tree Training removes redundant computation on tree-structured agent trajectories and is reported to yield up to 6.2× speedup (Li et al., 29 Mar 2026).
6. Empirical profile, deployment, limitations, and disambiguation
KAT-V1-40B is reported as highly competitive for its scale on reasoning-heavy tasks. The main benchmark table lists 77.8 on MMLU-Pro, 91.2 on DROP, 75.1 on GPQA-Diamond, 97.4 on MATH500, 93.3 on AIME2024, 88.1 on AIME2025, 95.1 on HumanEval, and 74.2 on LiveCodeBench (Zhan et al., 11 Jul 2025). The paper’s strongest comparative claims are on difficult math and coding tasks, especially against larger baselines such as DeepSeek-R1-0528 and Qwen3-235B-A22B. Token efficiency is a second major theme: the report claims token reduction by up to approximately 30%, cites 27.3% fewer tokens in a specific AIME comparison, and elsewhere reports average savings ranging from 11.6% to 89.9% depending on setting (Zhan et al., 11 Jul 2025).
The coding branch is evaluated on explicitly agentic benchmarks. KAT-Coder is reported at 73.4 on SWE-Bench Verified, 86.0 on IFEval, 62.3 on TAU2-Bench Retail, 72.5 on AIME 2025, 48.2 on LiveCodeBench V6, 96.3 on HumanEval, and 68.2 on GPQA-Diamond (Zhan et al., 21 Oct 2025). KAT-Coder-V2 further reports 79.6% on SWE-bench Verified, 88.7 on PinchBench, leading results across all three reported frontend aesthetics scenarios, 46.8 on Terminal-Bench Hard, and 93.9 on -Bench (Li et al., 29 Mar 2026). These reports collectively position KAT as a family that moves from adaptive reasoning to full agentic software work.
The deployment evidence is partly benchmark-based and partly anecdotal. KAT-V1 is described as already deployed in Kwaipilot, where the paper uses examples of simple queries answered in think-off mode and complex SQL tuning tasks answered in think-on mode. KAT-Coder’s final adaptation stage is explicitly aligned to production-grade IDE environments, and KAT-Dev is the open release meant to operationalize that deployment line (Zhan et al., 11 Jul 2025, Zhan et al., 21 Oct 2025).
The reports are also marked by several disclosure asymmetries. KAT-V1 does not provide explicit equations for the distillation loss, the exact judge/answer reward composition, or the full Step-SRPO optimization. KAT-Coder leaves unspecified the base architecture family, tokenizer, context window, optimizer, batch size, hardware, and learning-rate schedule. KAT-Coder-V2 discusses MoE stabilization and large-scale RL infrastructure, but does not disclose the full MoE parameterization, routing policy, or a complete OPD objective (Zhan et al., 11 Jul 2025, Zhan et al., 21 Oct 2025, Li et al., 29 Mar 2026). This suggests that the KAT line is unusually detailed about data curation and training philosophy, but selectively detailed about some implementation internals.
Finally, Kwaipilot-AutoThink (KAT) should be distinguished from several unrelated arXiv systems that share the same acronym. “KAT: A Knowledge Augmented Transformer for Vision-and-Language” defines KAT as Knowledge Augmented Transformer, a multimodal OK-VQA model; the overlap is described as almost certainly coincidental (Gui et al., 2021). “KAT: Dependency-aware Automated API Testing with LLMs” defines KAT as Katalon API Testing, an LLM-based REST API testing framework rather than an AutoThink model family (Le et al., 2024). The acronym therefore refers to multiple unrelated research objects across the literature; within the Kuaishou line, however, KAT consistently denotes Kwaipilot-AutoThink and its coding descendants.