Manuscript Offprint

arXiv:2610.12114

Universal Textual Teaching for LLMs

Zhanyi Lu, Huan Wang

Zhanyi Lu

Westlake University

luzhanyi@sjtu.edu.cn

Huan Wang

Westlake University

wanghuan@westlake.edu.cn

https://alexlu99.github.io/UTT/

Figure

Figure 1: Left: We introduce Universal Textual Teaching (UTT), a parameter-update-free framework that distills an LLM's knowledge into a textual Primer through multi-role LLM interaction. Notably, the resulting Primer can improve the performance of the source Student and other Students that are not involved in creating the Primer. Right: For the target Student Qwen3.6-27B, Primers synthesized from the Teacher-Student pairs (shown at the bottom of the figure) consistently improve accuracy. Even when Qwen3.6-27B does not participate in the Primer synthesis, the absolute accuracy gains reach 41.8% and 31.5% (see the rightmost column) on KernelBench and Omni-MATH-2, respectively. These results suggest that text can serve as a universal medium for knowledge transfer among different LLMs for complex tasks.

ABSTRACT

Knowledge distillation (KD) transfers knowledge from stronger Teacher models to weaker Student models, but most methods require training the Student parameters, thereby binding the distilled knowledge to a specific architecture and checkpoint. This implicit representation is difficult to interpret or reuse across models and limits KD for API-only or costly-to-train models. This paper studies knowledge transfer for large language models (LLMs). We introduce Universal Textual Teaching (UTT), a parameter-update-free framework that distills observed Teacher-Student knowledge gaps into a textual, interpretable, and reusable natural-language artifact called Primer. Specifically, UTT first identifies representative gap cases through paired evaluations, and iteratively updates the Primer via multi-role interactions: the Student attempts each task, the Prompter turns evaluation feedback into a teaching instruction, the Teacher provides a targeted demonstration, and the Synthesizer consolidates validated lessons. Empirically, on the challenging math (Omni-MATH-2) and code generation (KernelBench) tasks, extensive results confirm the effectiveness of the method: UTT remarkably raises the Student's accuracy from 9.4% to 48.6% and Fast 1_{1} accuracy from 9% to 35% on KernelBench, while increasing mathematical reasoning accuracy from 27.6% to 51.7%. UTT also performs better than representative prompt engineering and parameter-based KD methods. Of note, UTT is shown to be generalizable across different Teachers and Students: a Primer synthesized for one Teacher-Student pair can generalize to other Students that do not participate in the synthesis.

1 INTRODUCTION

Large language models (LLMs) demonstrate strong capabilities in reasoning, code generation, and knowledge-intensive tasks, yet capability gaps remain across models.(Achiam et al., 2023; Team et al., 2023; Xu et al., 2026; Qwen Team, 2026; Glm et al., 2024) Although open-source models are more flexible and accessible, they often trail powerful proprietary models because of limited scale and training compute (Kaplan et al., 2020). Knowledge distillation (KD) (Hinton et al., 2014) transfers knowledge from large teacher models (Teachers) to more efficient student models (Students), reducing computational and energy costs, broadening access to advanced model capabilities, and enabling wider participation in AI research and development (Xu et al., 2024).

Existing LLM distillation methods typically follow two routes: supervised fine-tuning on teacher-generated answers or reasoning traces (Kim & Rush, 2016; Hsieh et al., 2023; Ho et al., 2023), and preference optimization or reinforcement learning guided by teacher evaluations (Gu et al., 2024; Agarwal et al., 2024; Yan et al., 2025). Although effective, most require training the Student, binding the distilled knowledge to a specific architecture and checkpoint. Such implicit parameterization makes knowledge difficult to inspect or transfer, and limits applicability to API-only, non-trainable, or costly-to-train models.

These limitations raise a central question: Can the Teacher-Student knowledge gap be distilled into an explicit, interpretable, and reusable natural-language representation without updating parameters? We build on three premises: (1) modern LLMs can understand and follow natural-language instructions; (2) task-specific gaps may reflect missing knowledge or operational principles; and (3) such knowledge, when verbalized, can be directly used by other LLMs. Achieving this goes beyond asking a Teacher to generate a general prompt from a task description: reliable transfer must identify representative problems solved by the Teacher but not the Student, extract reusable knowledge, and avoid degrading the Student's existing capabilities.

To this end, this paper presents Universal Textual Teaching (UTT), a parameter-update-free framework that distills model knowledge into a natural-language artifact called Primer 1^{1} through multi-role teaching interactions (Figure 1). UTT first identifies representative knowledge-gap cases. For each case, the Student attempts the problem, the Prompter diagnoses the gap from evaluation feedback and formulates a teaching instruction, the Teacher provides a demonstration, and the Synthesizer integrates the record into the evolving global Primer. The Primer guides subsequent teaching rounds and is deployed directly as natural-language context after distillation. Relying solely on interactions among LLMs, the process requires no model training or parameter updates and supports both open-source and API-only commercial models.

Empirically, across various Teacher-Student configurations in mathematical reasoning and code generation, the synthesized Primers consistently improve their source Students and remain effective when transferred to other Students without resynthesis, demonstrating both effectiveness and cross-model reusability. Relative to the unprimed Student baselines, UTT improves KernelBench accuracy from 9.4% to 48.6%, Fast 1_{1} from 9% to 35%, and mathematical reasoning accuracy from 27.6% to 51.7%. Across the evaluated settings, UTT also outperforms representative prompt engineering and parameter-updating knowledge distillation methods.

Our main contributions are:

(1) A language-based perspective on KD for LLMs. We formulate LLM distillation as representing the Teacher-Student knowledge gap in natural language rather than encoding it in a specific Student's parameters, making the distilled knowledge interpretable and reusable across models.

(2) A parameter-update-free closed-loop KD framework. UTT identifies knowledge gaps through paired evaluation and iteratively synthesizes a deployable global Primer from Student attempts, Prompter feedback, and Teacher demonstrations, without updating any model parameters.

(3) Empirical validation across tasks and models. Across math and code tasks, UTT demonstrates effectiveness and transferability, with Primers transferable across models without resynthesis. UTT also outperforms representative prompt engineering and parameter-updating KD methods.

1^{1}We adopt the term Primer in its original sense of an introductory textbook, reflecting the foundational instruction and guidance that a Teacher provides to the Student.

References (71)

  • GPT-4 Technical Report
  • On-policy distillation of language models: Learning from self-generated mistakes
  • Reflective prompt evolution can outperform reinforcement learning
  • Benchmarks saturate when the model gets smarter than the judge (opens arXiv in a new tab)
  • AutoManual: Constructing instruction manuals by LLM agents via interactive environmental learning
  • Gptq: Accurate post-training quantization for generative pre-trained transformers
  • A family of large language models from glm-130b to glm-4 all tools (opens arXiv in a new tab)
  • Minillm: Knowledge distillation of large language models
  • Distilling the knowledge in a neural network
  • Large language models are reasoning teachers
  • Distilling step-by-step! outperforming larger language models with less training data and smaller model sizes
  • Scaling Laws for Neural Language Models
  • Sequence-level knowledge distillation
  • Optimizing instructions and demonstrations for multi-stage language model programs
  • Kernelbench: Can llms write efficient gpu kernels? In ICML, 2025
  • gradient descent
  • a systematic survey of prompt engineering techniques (opens arXiv in a new tab)
  • Dynamic cheat-sheet: Test-time learning with adaptive memory
  • Gemini: A Family of Highly Capable Multimodal Models
  • SkillX: Automatically constructing skill knowledge bases for agents (opens arXiv in a new tab)
  • Verbalized machine learning: Revisiting machine learning with language models
  • DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence
  • A survey on knowledge distillation of large language models (opens arXiv in a new tab)
  • SkillGLoW: Procedural-Family Skill Consolidation for Self-Improving Agents on Long-Horizon Task Streams
  • Learning to reason under off-policy guidance
  • Large language models as optimizers
  • Optimizing generative ai by backpropagating language model feedback
  • Does your multi-modal llm truly see the diagrams in visual math problems? In ECCV, 2024
  • ExpeL: LLM agents are experiential learners
  • Explaining datasets in words: Statistical models with natural language parameters
  • Large language models are human-level prompt engineers
  • For KernelBench, we use all 100 problems from Level 1
  • We abbreviate these models as Pro, Flash, Qwen, and Opus, respectively
  • For clarity, each listing presents the system instruction together with its runtime input fields; the implementation sends these two parts as the system and user messages, respectively
  • Distinguish the underlying cause from its symptoms, and state what the Teacher's worked solution should emphasize
  • Focus on transferable principles, reasoning strategies, checks, or decision rules that would help with related tasks
  • The solution should help the Student learn and should contain useful knowledge
  • Integrate these lessons into the current Primer
  • Do not copy the complete task solution or retain unnecessary task-specific details
  • >KernelBench</td><td>Pro$\rightarrow$Flash</td><td>135</td><td>55</td><td>100</td><td>210</td><td rowspan=
  • LUFFY uses a grouped policy-gradient objective over on-policy Student trajectories, with a learning rate of $1 \times 10^{-6}$ and dropout disabled
  • We consider three Teacher–Student configurations: Qwen3.8-Max→Qwen3.6-27B, Qwen3.8-Max→DeepSeek-V4.1-Flash, and Claude Opus 5→Qwen3.6-27B
  • Under Qwen3.8-Max→Qwen3.6-27B, the source Student improves from 41.5% to 76.0%, while transferring the same Primer to DeepSeek-V4.1-Flash improves its accuracy from 54.0% to 59.0%
  • These results indicate that UTT extends to multimodal reasoning tasks requiring joint understanding of images and text, and that its textual knowledge can
  • Each model is evaluated using two samples per problem
  • >Primer synthesis</td><td colspan=
  • To isolate the effect of inference budget from that of Primer synthesis, UTT uses the same Primer synthesized under the 32k-token setting at every evaluated budget, without resynthesis
  • UTT consistently outperforms the unprimed Student across all evaluated budgets, with a more pronounced advantage under smaller budgets
  • Notably, although the Primer is synthesized with a 32k maximum output-token budget, it continues to improve the Student at larger budgets, indicating that its knowledge and solution strategies are not tied to the specific output-token budget used during synthesis
  • For parameter-updating KD, we report only the elapsed time of parameter training
  • UTT completes Primer synthesis in 1.6 hours through 281 API model calls, approximately 0.68 million input tokens, and 5.57 million output tokens
  • Bold values indicate the best result for each subset
  • This trade-off suggests that direct Teacher demonstrations fit the synthesis problems more strongly, whereas the Prompter helps transfer the acquired knowledge to problems not used for synthesis
  • Thus, removing the gate does not yield a consistent improvement, but instead trades lower accuracy on the other three subsets for higher retention accuracy
  • >Configuration</td><td colspan=
  • The Primer improves both accuracy and Fast $_{1}$ in all four settings
  • The following Primers preserve the original model-generated content without factual correction; only Markdown and LaTeX formatting is normalized
  • Don’t use sign-count bounds: largest need not be positive sum
  • For $p \equiv 1 \pmod{4}$, $p = \pi \bar{\pi}$ in $\mathbb{Z}[i]$; Hensel gives $s$ with $\pi^e \mid i - s$, so among $i, \dots, i - k + 1$ at least $[k/p^e]$ are divisible by $\pi^e$; hence no $p \equiv 1 \pmod{4}$ appears in denominators
  • Not all $\mathbb{Q}(i)$: $1/5$ excluded
  • Boundary $\omega(c)=K+2$ with $\omega(n)=K+1$
  • For large even $n$, cycle base (outside squares on $4m$-gon plus reflected pairs gives $6m$) and insert four-square gadgets at cuts to add 8 or 16, covering residues mod 6; verify no unintended intersections
  • Bound first/last visits using side color counts; construct explicitly
  • For $2 \times 2$ zero-sum blocks, general solution $a_{ij}=(-1)^{i+j}(r_i+c_j)$; propagate sign choices across overlaps
  • Verify: $f(n_i)\ge a-n_i$, so $\sum ma-N$, and $\sum 0$
  • Toss coin1 once, coin2 $c$ times
  • Using &my_func directly is simpler and preferred
  • ModelNew._ext = load_inline( name="op", cpp_sources=[] cuda_sources=[cuda_src], verbose=False) self.ext = ModelNew._ext
  • Template: triangle with two given angles → third angle → vertical angle across → next triangle → straight-angle subtraction → target
  • Future work can reduce this overhead through Primer compression or retrieval-based selection of relevant content
  • This direction is most practical for resource-rich organizations with access to model weights and substantial training infrastructure