Giter Club home page Giter Club logo

llm-fine-tuning's Introduction

Fine-tuned Text Summarization Model

Introduction

In this project, we will fine-tune a pre-trained language model for the task of text summarization. Text summarization is the process of creating a concise and accurate summary of a given text while preserving its essential information. Specifically, we fine-tune a pre-trained T5 model for text summarization using the Prefix-Tuning technique on the CNN/Daily Mail dataset. Our advise is to modify the hyperparameters, such as the learning rate, batch size, and number of epochs, to potentially improve the model's performance.

Parameter-efficient Fine-tuning Techniques

While traditional fine-tuning updates all the trainable parameters of the pre-trained model, parameter-efficient fine-tuning techniques aim to further reduce the number of trainable parameters, leading to even greater computational efficiency and potential for better generalization.

Prefix Tuning

Prefix Tuning introduces a small number of trainable "prefix" vectors that are prepended to the input sequence before passing it through the pre-trained model. These prefix vectors are learned during fine-tuning, while the pre-trained model weights remain frozen. This approach significantly reduces the number of trainable parameters, making it more efficient and potentially less prone to overfitting.

Prompt Tuning

Prompt Tuning is similar to Prefix Tuning but operates on the input prompts instead of the input sequence itself. A small set of trainable vectors, called soft prompts, are learned and prepended to the input prompt during fine-tuning. This technique can be particularly effective for few-shot learning scenarios where only a few examples are available for fine-tuning.

Adaptor Modules

Adaptor Modules introduce small, trainable neural networks (called adaptors) between the layers of the pre-trained model. During fine-tuning, only the adaptor modules are trained, while the pre-trained model weights remain frozen. This approach allows for efficient adaptation of the model to the target task while preserving the pre-trained knowledge. These parameter-efficient fine-tuning techniques offer several advantages over traditional fine-tuning, including:

  1. Reduced Computational Cost: By training only a small subset of parameters, these techniques require significantly less computational resources, making them more scalable and accessible.
  2. Better Generalization: By preserving the majority of the pre-trained weights, these techniques may be less prone to overfitting and better able to generalize to unseen data.
  3. Flexibility: These techniques can be applied to various pre-trained models and tasks, providing a flexible and efficient approach to fine-tuning.

In summary, fine-tuning LLMs, especially with parameter-efficient techniques, allows for efficient adaptation of pre-trained models to specific tasks, leveraging the knowledge and patterns learned during pre-training while specializing for the target domain or task.

llm-fine-tuning's People

Contributors

jasl1 avatar

Stargazers

 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.