Coder Social home page Coder Social logo

navneet1083 / textsum-tune Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 25 KB

This project is based on fine-tuning LLM models (FLAN-T5) for text summarisation task using PEFT approach. All evaluation metrics being computed on ROUGE scoring and LoRA optimisation techniques being used for fine-tuning.

License: MIT License

Python 5.43% Jupyter Notebook 94.57%
flan-t5 huggingface-transformers llm-training lora peft ppo ppo-agent rlhf

textsum-tune's Introduction

Fine tuning LLM model with LoRA strategy

This project is based on fine-tuning LLM models (FLAN-T5) for text summarisation task using PEFT approach.

Following dataset (huggingface dataset) is being used for fine-tuning

  • SAMSum (It contains about 16k messenger-like conversations with summaries)
  • DialogSum (contains 10,000+ dialogues with the corresponding manually labeled summaries and topics)

Fine tuning is being carried out with Google's FLAN T5 and it's tokenizer. This project also includes following proposals to carry out fine-tuning:

  • Prompt engineering
  • Instruction based fine-tuning
  • Full fine-tuning (would better to have huge datasets)
  • PEFT (LoRA) fine-tuning

Evaluation

The ROUGE metric helps quantify the validity of summarizations produced by models. This metric evaluates not to perfection, but indicate overall increase in summarizations effectiveness.

Below are the stats on ROUGE score being achieved with fine-tuning on FLAN-T5 model on samsum datasets

Model rouge1 rouge2 rougeL rougeLsum
FLAN T5 (base model) 0.2334158581572823 0.07603964187010573 0.20145520923859048 0.20145899339006135
PEFT (LoRA fine tuned) 0.40810631575616746 0.1633255794568712 0.32507074586565354 0.3248950182867091

Interpretation of improvement on PEFT fine-tuned models:

Absolute percentage improvement of PEFT MODEL over BASE model

score matrix % improvement
rouge1 17.47%
rouge2 8.73%
rougeL 12.36%
rougeLsum 12.34%

Future Work

  • Inclusion of inference code (though basic notebook exists for inference)
  • Adaptation of this framework with custom data-loader for pre-defined format
  • Include other strategies for PEFT computation
  • Include toxic efficient model with inclusion of RLHF
  • Include graph on trained weights to visualize certain stats on word-embeddings
  • Include more base models as an adapter in this framework

textsum-tune's People

Contributors

navneet1083 avatar

Watchers

 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.