# yongliang-wu/DFT

[ICLR 2026] On the Generalization of SFT: A Reinforcement Learning Perspective with Reward Rectification.

Repository: https://github.com/yongliang-wu/DFT
Canonical: https://ross.abutalabs.com/products/dft
Homepage: https://arxiv.org/abs/2508.05629
Language: Python
License Family: other
Last push: 2026-08-01T04:15:51+00:00

## Health v2 (maintenance only)
Score: 61/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 35, longevity 28
- inputs: {"age_days": 398, "days_push": 32, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1100, forks 26 (observed 2026-08-28T04:03:35.399037+00:00)

## What it is
DFT (Dynamic Fine-Tuning) is the official implementation of an ICLR 2026 paper that improves Supervised Fine-Tuning of LLMs by dynamically rescaling the loss with token probabilities, rectifying the implicit reward structure of SFT gradients. It requires only a single-line change to standard SFT and improves generalization on math reasoning, code generation, and multi-modal benchmarks.

## Use cases
- fine-tune an LLM with better generalization than standard SFT
- improve supervised fine-tuning for math reasoning tasks
- apply a one-line loss modification to an existing SFT pipeline
- use DFT as a streamlined alternative to offline RL fine-tuning
- reproduce ICLR 2026 paper results on models up to 7B parameters

## When to choose
- you are fine-tuning LLMs on math or code datasets and want better generalization than vanilla SFT
- you want an RL-like generalization boost without running full RL training
- you are doing research on SFT vs RL training dynamics

## When to avoid
- your fine-tuning domain is literary, financial, or otherwise outside math/code tasks where DFT is unproven
- you need a production-grade, licensed, well-supported training framework
- you work with models far beyond 7B parameters, which the paper did not evaluate

## Facets
- artifact type: library
- maturity: active
- function: llm-training, machine-learning, deep-learning
- domain: large-language-models, machine-learning, deep-learning
- platform: python
- tags: sft, fine-tuning, reinforcement-learning, research-paper, iclr-2026, reward-rectification, math-reasoning, gpu

## Member repositories
- yongliang-wu/DFT (main) score 61

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:35.399037+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:45:56.429077+00:00, confidence not recorded.
  - readme: https://github.com/yongliang-wu/DFT (fetched 2026-08-28T04:03:35.399037+00:00, sha c572b7b0f369)
  - homepage: https://arxiv.org/abs/2508.05629 (fetched 2026-08-29T12:49:27.802032+00:00, sha 6b1fa346495c)
  - site_page: https://info.arxiv.org/about/ourmembers.html (fetched 2026-08-29T12:49:27.810955+00:00, sha 47cbc55ff1de)
  - site_page: https://info.arxiv.org/about/donate.html (fetched 2026-08-29T12:49:27.806705+00:00, sha cca9c3a11c56)
  - site_page: https://info.arxiv.org/about (fetched 2026-08-29T12:49:27.813288+00:00, sha a1f16f915a9a)
  - site_page: https://info.arxiv.org/labs/index.html (fetched 2026-08-29T12:49:27.809010+00:00, sha b14a8d05a0ec)
- Data as of 2026-08-30T08:39:29.467469+00:00.
