GithubHelp home page GithubHelp logo

himanshuvnm / foundation-model-large-language-model-fm-llm Goto Github PK

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

This repository was commited under the action of executing important tasks on which modern Generative AI concepts are laid on. In particular, we focussed on three coding actions of Large Language Models. Extra and necessary details are given in the README.md file.

Jupyter Notebook 100.00%
attention-is-all-you-need aws fine-tuning flan-t5 foundation-models generative-ai hate-speech-detection huggingface huggingface-transformers large-language-models lora ml-m5-2xlarge peft-fine-tuning-llm python3 pytorch rlhf rnn-pytorch low-rank-ada

foundation-model-large-language-model-fm-llm's Introduction

Foundation-Model-Large-Language-Model-FM-LLM-

This repository was commited under the action of executing important tasks on which modern Generative AI concepts are laid on. In particular, we focussed on three coding actions of Large Language Models which are given as follows:

  1. We explore the dialogue summarization example through Generative AI on the AWS with instace-type ml-m5-2xlarge. This was successfully executed by incorporating summary of a dialogue with the pre-trained Large Language Model (LLM) FLAN-T5 from Hugging Face. Further, we employed Prompt engineering which is an important concept in foundation models for text generation. We used Zero-Shot Inference, One-Shot Inference and Few-Shot Inferences to conclude the dialogue summarization experiment.
  2. In the second experiment, we explore an important concept of Fine Tuning on a Generative AI model and again we worked on the dialogue summarization experiment. It is again important to note that this particular experiment was conducted on the AWS with instace-type ml-m5-2xlarge. After recalling the dataset of our interest, which in this case is DialogSum Hugging Face dataset, we load the pre-trained FLAN-T5 model and then tokenize it. After testing the model with shot-inferencing, we Fine-Tuned the model and then we evaluated the validity of the trained LLM by the ROGUE metric. After that we have performed Fine Tuning, we executed Parameter Efficient Fine-Tuning (PEFT) which is a generic term that includes Low-Rank Adaptation (LoRA) and the experiment ic concluded by calculating the ROGUE metric again to check the validity of PEFT on the model.
  3. Lastly, we study how to fine tune a FLAN-T5 model to generate less toxic content with Meta AI's hate speech reward model. After we have executed traditional commits, we perform the fine tuning to detoxify the summary by optimizing the Reinforcement Learning policy against the reward model by using Proximal Policy Optimization (PPO). Again, please do not forget that, we conducted all this on the AWS with instace-type ml-m5-2xlarge.

All these coding were made available during the course that I took on https://www.coursera.org/learn/generative-ai-with-llms at Coursera. The certificate of my active participation is already uploaded in this repository.

foundation-model-large-language-model-fm-llm's People

Contributors

himanshuvnm 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.