NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Logits-Based Finetuning

Jingyao Li, S. Yang, Sitong Wu, Han Shi, Chuanyang Zheng, Hong‐Xi Xu, Jiaya Jia2025

Abstract

In recent years, developing compact and efficient large language models (LLMs) has emerged as a thriving area of research. Traditional Supervised Fine-Tuning (SFT), which relies on singular ground truth labels, often fails to capture token-level dependencies and linguistic diversity. To address these limitations, we propose a logits-based fine-tuning framework that integrates the strengths of supervised learning and knowledge distillation. Our approach constructs enriched training targets by combining teacher logits with ground truth labels, preserving both correctness and linguistic diversity. This ensures more reliable and effective training. We constructed a large-scale 1.2M logits dataset and trained a series of science-focused models. Experimental results demonstrate that our method achieves significant improvements, with accuracy gains of 18% on Mawps and 22.7% on TabMWP. Across nine widely used mathematical benchmarks, our method consistently outperforms prior SFT models, achieving an average improvement of 7.28%.

Introduction

When training small, efficient Large Language Models (LLMs), researchers typically rely on Supervised Fine-Tuning (SFT). SFT utilizes "one-hot" labels, directing the model toward a single correct token for any given position. However, natural language is inherently fluid; multiple phrasings can be equally valid. Standard SFT often fails to capture these nuances and the underlying relationships between semantically similar tokens.

Conceptual comparison between standard SFT (CE Loss) and Logits-Based Finetuning (KL Loss) using a teacher's distribution.

Conversely, Knowledge Distillation (KD) attempts to make a student model mimic a teacher model's entire probability distribution. While this captures linguistic variety, it introduces a significant risk: if the teacher model (e.g., LLaMA-3.1-70B) hallucinates or makes a logical error, the student model inherits that error. The Logits-Based Finetuning (LFT) framework was developed to bridge this gap, providing the linguistic "wisdom" of a teacher while remaining anchored to verified ground truth.

Methodology

The core of the LFT framework is the construction of an enriched training target. This process involves blending the teacher's probabilistic predictions with the absolute certainty of ground truth labels through several key steps:

  1. Top-K Sparsification: To optimize storage and focus on high-quality signals, only the top K most likely tokens from the teacher model are retained for each position.
  2. Distribution Blending: These teacher probabilities are combined with the ground truth one-hot vector to create a hybrid distribution.
  3. Mathematical Constraints: The resulting distribution is refined to ensure the ground truth remains the most probable token, relative proportions between the teacher’s top candidates are preserved, and the final output remains a valid probability distribution.
  4. KL Divergence Loss: The student model is trained to minimize the Kullback-Leibler (KL) divergence between its predictions and this enriched target, rather than just minimizing cross-entropy against a single label.

Experimental Setup and Datasets

To validate this approach, we constructed a massive 1.2M science logits dataset. The training data consists of 1 million samples from MetaMath-GSM8K and 240,000 samples from OpenMathInstruct2. LLaMA-3.1-70B-Instruct served as the teacher model to generate the necessary logits.

We evaluated the resulting models, ScienceLLaMA-1B and ScienceLLaMA-3B, across nine mathematical and scientific benchmarks, including GSM8K (grade school math), MATH (competition level), OlympiadBench, and TabMWP (tabular math).

Key Results and Insights

Performance Gains

The LFT method yielded dramatic improvements over standard LLaMA-3.2 baselines. ScienceLLaMA-3B achieved an 81.0% accuracy on GSM8K, outperforming other models in its size class such as Gemma-2-2b and Phi-3.5-Mini. On specialized tasks, accuracy increased by 18% on Mawps and 22.7% on TabMWP, with an overall average improvement of 7.28% across all nine benchmarks.

Data Efficiency

One of the most significant findings is the superior data efficiency of LFT. Our experiments showed that training on just 25% of the data using the LFT method produced results comparable to or better than training on 50% of the data using standard SFT. This suggests that the enriched target provides a much denser learning signal than hard labels alone.

Comparison of GSM8K accuracy between SFT and LFT across different training data volumes, highlighting LFT's superior data efficiency.

Linguistic Understanding

By exposing the student to "near-miss" tokens (e.g., recognizing that "lies" and "sits" are both plausible after "The cat..."), the model develops a deeper understanding of linguistic structure. This allows the student to learn how a teacher thinks about phrasing options while being strictly forced to arrive at the correct factual answer.

Conclusion

Logits-Based Finetuning represents a significant step forward in training small, high-performance LLMs. By combining the correctness of ground truth with the diversity of teacher logits, LFT creates models that are both more accurate and more linguistically robust. Future work will focus on scaling this approach to larger architectures and exploring its application in more subjective, non-mathematical domains.

Summary updated

BibTeX
@misc{li2025logits,
  author = {Jingyao Li and S. Yang and Sitong Wu and Han Shi and Chuanyang Zheng and Hong‐Xi Xu and Jiaya Jia},
  title = {{Logits-Based Finetuning}},
  year = {2025},
  doi = {10.18653/v1/2025.emnlp-main.745},
}

Loading related content...

Figure