Git Product home page Git Product logo

longform's Introduction

LongForm: Effective Instruction Tuning with Reverse Instructions

The LongForm dataset is created by leveraging English corpus examples with the reverse instructions method. We select a diverse set of human-written documents from existing corpora such as C4 and Wikipedia and generate instructions for the given documents via LLMs. Then, we extend these examples with structured corpora examples such as Stack Exchange and WikiHow and task examples such as question answering, email writing, grammar error correction, story/poem generation, and text summarization.

The LongForm dataset

The Dataset and Models

We release the LongForm-C dataset on Github and on HuggingFace. Check out the paper or these links for more detail.

The LongForm Models: We release the models on the model hub of HuggingFace. We cannot release LongForm-LLaMA-7B publicly due to restrictions of LLaMA models.

*You need to have the original weights of LLaMA-7B and add with this diff to get the LongForm model.

Evaluation

We provide in-depth evaluation of LongForm models and baselines in the paper. We present the METEOR scores of models in out-of-domain datasets. In all tasks, Recipe Generation (RGen), long-form question answering (ELI5), short story generation (WritingPrompts/WP), LongForm models outperform prior instruction-tuned models.

All Recipe Generation ELI5 Writing Prompts
T0++ 10.9 18.7 3.8 10.2
Tk-Instruct 6.3 12.9* 3.6 2.4
Flan-T5 10.6 20.9* 3.5 7.4
Alpaca-LLaMA-7B 14.6 19.5 12.5 11.8
OPT-30B 11.1 18.6 12.2 2.6
LongForm-T5-XL 16.3 20.2 18.3 10.6
LongForm-OPT-6.7B 17.7 16.9 17.2 19.0
LongForm-LLaMA-7B 19.7 21.7 18.6 18.9

Language Understanding and Generation

We compare the performance of the LongForm-C dataset, the FLAN dataset, and a combined model finetuned with both datasets on both NLG and NLU tasks, aiming to evaluate LongForm-C's effectiveness in improving NLU alongside generation tasks.

Model Dataset NLG NLU (5-shot MMLU)
LLaMA-7B FLAN 9.1 36.6
LLaMA-7B LongForm-C 19.7 35.2
LLaMA-7B FLAN+LongForm-C 16.5 38.9

Smaller versions of LongForm-OPT models are also available:

‡: We can just release the difference between LongForm-LLaMA-7B and pretrained LLaMA-7B publicly due to restrictions of LLaMA models.

Limitations

The LongForm dataset and models mainly focus on long text generation and have limitations regarding structured prediction tasks in NLP. Additionally, we observe that LongForm models may present hallucination problems similar to those found in LLMs.

License

The LongForm project is subject to a MIT License with custom limitations for restrictions imposed by OpenAI (for the instruction generation part), as well as the license of language models (OPT, LLaMA, and T5). The WikiHow subset of LongForm-C is subject to the license proposed by WikiHow.

Citation

@misc{koksal2023longform,
      title={LongForm: Effective Instruction Tuning with Reverse Instructions}, 
      author={Abdullatif Köksal and Timo Schick and Anna Korhonen and Hinrich Schütze},
      year={2023},
      eprint={2304.08460},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

longform's People

Contributors

akoksal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

longform's Issues

License

Hi, thanks for sharing the great work. One quick question, would you mind adding a license to the repo so that people can use it? Open license like MIT would be great. Also I was wondering if the preprocessing scripts would be shared or not. Thanks again.

Rregarding model fine-tuning

Is it possible to have a look at model fine-tuning code for the models mentioned in the paper? Thank you!

Would be specifically interested in the hyperparameters used for fine-tuning as well as how you handle the long sequences in the fine-tuning process? Are you concatenating all instructions and outputs together and split the resulting text into chunks? Are you calculating the loss for the instruction part of the input as well as for the output or only for the output (like in Alpaca)?

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.