A three-stage preference training framework (SFT → Final-Answer DPO → Trajectory DPO) that teaches LLMs to self-correct by generating drafts, criticizing them, and producing revised answers.

Stars

4

7-day growth

No data

Forks

0

Open issues

0

License

No data

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It introduces a structured pipeline for instilling self-correction capabilities in LLMs through synthetic preference pairs and explicit trajectory alignment, with clear evaluation metrics for correction success and over-revision rates.

Who it is for

  • NLP researchers studying self-correction and reasoning in LLMs
  • ML engineers building robust math reasoning systems
  • Practitioners applying DPO and SFT for preference alignment
  • Developers interested in automated data synthesis for training

Use cases

  • Improving a model's ability to correct its own mathematical answers
  • Building a system that automatically revises draft responses
  • Reducing over-revision errors when the original draft is already correct
  • Training a model to generate high-quality critiques along with corrected answers

Strengths

  • Complete three-stage training recipe with ready-to-use scripts and configs
  • Automatic synthetic preference pair generation from GSM8K, including repair and keep-correct types
  • Supports efficient QLoRA / LoRA training with as little as 16GB GPU memory
  • Comprehensive evaluation suite for self-correction (success rate, over-revision rate) and direct math accuracy

Considerations

  • Synthetic data is primarily derived from GSM8K math word problems; generalization to other domains is not verified
  • Training pipeline is multi-stage and may require careful hyperparameter tuning and GPU resources
  • Custom dataset integration requires adapting to the specific intermediate data format described in the README

README quick start

安装 PyTorch(根据你的 CUDA 版本选择)

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Related repositories

Similar projects matched by category, topics, and programming language.

slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
gavamedia
Featured
gavamedia GitHub avatar

deltafin

Deltafin is a research project that runs the 2.8-trillion-parameter Mixture-of-Experts model Kimi K3 on a single Apple Silicon Mac (e.g., M1 Max with 64 GB) at about 16 seconds per token, using exact, reproducible inference with local or streaming expert loading.

AI & Machine LearningLarge Language Models
304
jamesob
Featured
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI & Machine LearningLarge Language Models
1,660