Git Product home page Git Product logo

seq_it's Introduction

Fine-tuning Large Language Models with Sequential Instructions

This is the code to replicate the instruction tuning experiments in the paper [Fine-tuning Large Language Models with Sequential Instructions]. [cite]

Our implementation is based on the Alpaca-LoRA and LAVIS repository.

SIT

Setup

For text-only experiments

conda create -n seq_ins python=3.8
conda activate seq_ins
pip install -r requirements.txt

For vision-language experiments

cd LAVIS
conda create -n seq_ins_vl python=3.8
conda activate seq_ins_vl
pip install -e .

Next, prepare train and eval data: for text-only data:

cd construct_data
bash download_all_data.sh

for vision-langauge data:

cd LAVIS
bash download_vqa.sh

Train

Train on text-only data, you can specify your preferred LLM, path of training dataset, training type (baseline or repeat) at ./train/ft_lora.sh

Train on vision-langauge data, you can first specify the pre-trained checkpoint at ./LAVIS/lavis/configs/models/blip2

then you can firstly specify the output models path at ./LAVIS/lavis/projects/instructblip/caption_coco_vicuna7b_train.yaml, then

bash run_scripts/blip2/train/eval_instruct_caption_coco.sh

Eval

For text-only experiments, you can configure the path of lora adapters, the task name, training type, model name, and the path of output file in ./eval/infer_eval.sh

Citation

Please consider citing us if you use our materials.

@misc{hu2024finetuning,
      title={Fine-tuning Large Language Models with Sequential Instructions}, 
      author={Hanxu Hu and Pinzhen Chen and Edoardo M. Ponti},
      year={2024},
      eprint={2403.07794},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

seq_it's People

Contributors

simonucl avatar hanxuhu avatar

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.