Giter Club home page Giter Club logo

rot's Introduction

Recursion of Thought

Official PyTorch implementation of ACL 2023 (short, findings) paper: Recursion of Thought: A Divide and Conquer Approach to Multi-Context Reasoning with Language Models.

Installation

We recommend using Anaconda. The following command will create a new conda environment rot with all the dependencies.

conda env create -f environment.yml

To activate the environment:

conda activate rot

Directory structure

├── configs
├── data
├── episodes
├── models
├── eval.py
├── gpt_eval.py
├── gpt_fine_tune.py
├── train_cmds
└── train.py
  • configs: Model & training configurations
  • data: Codes related to problem generation
  • episodes: Problem configurations
  • models: Codes for Transformer and LSTM
  • eval.py: Evaluation logic
  • gpt_eval.py: GPT-3 evaluation script
  • gpt_fine_tune.py: GPT-3 fine-tuning script
  • train_cmds: The commands used to train the models
  • train.py: The main training logic

GPT-3 experiments

Run the gpt_fine_tune.py script to create data for GPT-3 and request fine-tuning. The API key should be present in the environment variable OPENAI_API_KEY.

python gpt_fine_tune.py

The following script will evaluate the fine-tuned models.

python gpt_eval.py

Experiments with the tiny models

Use the following command to train a model.

python train.py -c [config_path] -e [episode_path] -p [paradigm] -l [log_directory]

config_path should be one of the files in configs directory, and episode_path should be one of the files in episodes. paradigm should be one of wt, cot, and rot. In the train_cmds file, we provide all commands that we used to for our main experiments. The evaluation results will be recorded in the TensorBoard summary.

rot's People

Contributors

soochan-lee avatar

Stargazers

jason law avatar  avatar  avatar Mark avatar fab avatar Ruben Selander avatar Zong Ling avatar  avatar meetog avatar  avatar Andrew Moore avatar  avatar Max Azoury avatar Kenn avatar  avatar Raymond avatar  avatar Ilya Lasy avatar Timothy Correia-Paul avatar  avatar  avatar Don Kang avatar Ethan Pisani avatar Ohad Cohen avatar  avatar  avatar  avatar Bander Alsulami avatar Kaito avatar Willi Kappler avatar Jeff Carpenter avatar snoop2head avatar Seungone Kim avatar  avatar Yoon, Seungje avatar yukyunglee avatar 爱可可-爱生活 avatar gamen avatar Zheng Yuan avatar Jaewoo Ahn avatar Byeongchang Kim avatar

Watchers

Kenn avatar  avatar

Forkers

jjhw shism2

rot's Issues

question about LM capcapacity, thanks

Admire the work you do and say thanks for open source, but I have some questions.

After reading the paper, what I understand is that " To gain mathematical computing power, the model needs to be fine-tuned".
The capability is dramatically improved, but how about common ablity?

For example, A model like LLaMa or alpaca, even someone else after RLHF. After the training, how much impact does it have on the ability to generate models in other aspects? (such as chat, instructed ability)

Is there any evaluation of the above mentioned? thank you very much :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.