reasoning-teacher  by itsnamgyu

Reasoning teacher via LLM fine-tuning (ACL 2023 paper)

created 2 years ago
340 stars

Top 82.2% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides the official code for "Large Language Models Are Reasoning Teachers," an ACL 2023 paper. It enables users to run Chain-of-Thought (CoT) reasoning on OpenAI models and fine-tune student models (like T5, Flan-T5, GPT-2) using the Fine-tune-CoT method on custom datasets and hardware.

How It Works

The project implements two main functionalities: OpenAI API experiments and custom experiments on user-provided hardware. For OpenAI, it leverages their API for data collection and fine-tuning. For custom experiments, it utilizes PyTorch Lightning and Hugging Face Transformers to fine-tune open-source models. The core methodology, Fine-tune-CoT, trains student models using reasoning data generated by larger "teacher" models, aiming to transfer complex reasoning capabilities.

Quick Start & Requirements

  • Install: pip install -r requirements.txt and python setup.py develop
  • Environment: Python <= 3.10, PyTorch Lightning <= 1.9, PyTorch >= 2.0
  • Data: Download experimental data from provided Dropbox/Google Drive links (approx. 8GB for completion data).
  • Notebooks for OpenAI API experiments and custom fine-tuning are available.

Highlighted Details

  • Code for running CoT reasoning on OpenAI models.
  • Fine-tune-CoT implementation for training student models (T5, Flan-T5, GPT-2) on custom GPUs.
  • All experimental data is publicly shared in JSON/JSONL formats.
  • Includes scripts to reproduce paper results and generate tables/figures.

Maintenance & Community

  • Developed by Namgyu Ho, Laura Schmid, and Se-young Yun.
  • Accepted to ACL 2023.
  • No explicit community links (Discord/Slack) or roadmap are provided in the README.

Licensing & Compatibility

  • The repository is released under the MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The project has specific Python and PyTorch version requirements. While it supports custom open-source models, the primary focus and extensive data are geared towards OpenAI models. The README mentions "Needs update" for data organization patterns, suggesting potential ongoing development or changes.

Health Check
Last commit

4 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
9 stars in the last 90 days

Explore Similar Projects

Starred by Travis Fischer Travis Fischer(Founder of Agentic), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

OpenPipe by OpenPipe

0.5%
3k
Fine-tuning platform for cheaper models
created 2 years ago
updated 1 year ago
Starred by Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers), Simon Willison Simon Willison(Author of Django), and
9 more.

simple-evals by openai

0.4%
4k
Lightweight library for evaluating language models
created 1 year ago
updated 3 weeks ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems) and Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind).

LightRAG by HKUDS

1.0%
19k
RAG framework for fast, simple retrieval-augmented generation
created 10 months ago
updated 1 day ago
Feedback? Help us improve.