GithubHelp home page GithubHelp logo

helm's Introduction

Before conducting finetuning, you need to downlaod the llama2-XXB-hf model checkpoints from huggingface

This project is modified on https://github.com/georgian-io/LLM-Finetuning-Hub, requirements can be found in this project.

Training

Training LLaMA2-13B-Lora:

python llama2_train.py \
    --pretrained_ckpt  $PATH_OF_LLAMA2$ \
    --lora_r 16 --epochs 10 --dropout 0.1 --save_step 1000 --table_mode raw

Traing HeLM

Step1: get Egpt and train a feedback model

python llama2_train.py \
    --pretrained_ckpt  $PATH_OF_LLAMA2$ \
    --lora_r 16 --epochs 10 --dropout 0.1 --save_step 1000 --table_mode train_ggpthighlight_evi

If you want to call ChatGPT API by yourself to get Egpt, we also provide the scrip: label_by_gpt_rY.py

Step2: Get Emerge

Build searching evidence: 
python llama2_fetaqa_eviBuild.py \
--experiment_dir $PATH_OF_FEEDBACK_MODEL$ --evi_method n2

Build merged evidence:
python llama2_fetaqa_eviBuild-merge.py \
--experiment_dir $PATH_OF_FEEDBACK_MODEL$

Step3: train reasoner ans summarizer

python llama2_fetaqa_evi_train.py \
    --pretrained_ckpt $PATH_OF_LLAMA2$ \
    --lora_r 16 --dropout 0.1 --save_step 1000

python llama2_train.py \
    --pretrained_ckpt $PATH_OF_LLAMA2$ \
    --lora_r 16 --dropout 0.1 --save_step 1000 --table_mode train_mergehighlight_evi

Evaluation

HeLM Evaluation

Step1: reasoning by reasoner

python llama2_fetaqa_evi_infer.py --stage p2 --experiment_dir $PATH_OF_REASONER$

Step2: use summarizer generate output by highlighted evidence:

python llama2_fetaqa_test.py \
    --experiment_dir $PATH_OF_SUMMARIZER$
    --adapter_dir checkpoint-2000 --data_mode test_mergehighlight_evi

LLaMA2-13B-Lora Evaluation

python llama2_fetaqa_test.py \
    --experiment_dir $PATH_OF_SUMMARIZER$
    --adapter_dir checkpoint-2000 --data_mode raw

helm's People

Contributors

eulring avatar

Stargazers

Giang Nguyen avatar

Watchers

Kostas Georgiou avatar  avatar

helm's Issues

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.