Giter Site home page Giter Site logo

harshit-sharma1256 / llm-zero-to-hundred Goto Github PK

View Code? Open in Web Editor NEW

This project forked from farzad-r/llm-zero-to-hundred

0.0 0.0 0.0 48.67 MB

This repository contains different LLM chatbot projects (RAG, LLM agents, etc.) and well-known techniques for training and fine tuning LLMs.

Python 11.17% Jupyter Notebook 88.83%

llm-zero-to-hundred's Introduction

LLM-Zero-to-Hundred

CAIS
This repository showcases various applications of LLM chatbots and provides comprehensive insights into established methodologies for training and fine-tuning Language Models.

List of projects:

List of tutorials

General structure of the projects:

Project-folder
  ├── README.md           <- The top-level README for developers using this project.
  ├── HELPER.md           <- Contains extra information that might be useful to know for executing the project.
  ├── .env                <- dotenv file for local configuration.
  ├── .here               <- Marker for project root.
  ├── configs             <- Holds yml files for project configs
  ├── data                <- Contains the sample data for the project.
  ├── src                 <- Contains the source code(s) for executing the project.
  |   └── utils           <- Contains all the necesssary project's modules. 
  └── images              <- Contains all the images used in the user interface and the README file. 

NOTE: This is the general structure of the projects, however there might be small changes duo to the specific needs of each project.

Project description:

In this project, I demonstrate how an open source LLM can be deployed on-prem. For that, I took RAG-GPT project and convert it into a fully open source RAG chatbot. The open source chatbot is designed using Google Gemma7B LLm and BAAI/bge-large-en as the embedding model.

YouTube video: Link

In this project, I compare the performance of `5` famous RAG techniques which have been proposed by Langchain and Llama-index. The test is being done on `40` questions on `5` different documents. Moreover, the projects provides `2` separate RAG chatbots that offer `8` RAG techniques from these two frameworks.

YouTube video: Link

In this project, we use a fictional company called Cubetriangle and design the pipeline to process its raw data, finetune `3` large language models (LLMs) on it, and design a chatbot using the best model.

YouTube video: Link

Libraries: huggingface - OpenAI - chainlit

WebGPT is a powerful tool enabling users to pose questions that require internet searches. Leveraging GPT models:

  • It identifies and executes the most relevant given Python functions in response to user queries.
  • The second GPT model generates responses by combining user queries with content retrieved from the web search engine.
  • The user-friendly interface is built using Streamlit.
  • The web search supports diverse searches such as text, news, PDFs, images, videos, maps, and instant responses.
  • Overcoming knowledge-cutoff limitations, the chatbot delivers answers based on the latest internet content.

YouTube video: Link

Libraries: OpenAI (It uses GPT model's function calling capability) - duckduckgo-search - streamlit

RAG-GPT is a chatbot that enables you to chat with your documents (PDFs and Doc). The chatbot offers versatile usage through three distinct methods:

  1. Offline Documents: Engage with documents that you've pre-processed and vectorized. These documents can be seamlessly integrated into your chat sessions.
  2. Real-time Uploads: Easily upload documents during your chat sessions, allowing the chatbot to process and respond to the content on-the-fly.
  3. Summarization Requests: Request the chatbot to provide a comprehensive summary of an entire PDF or document in a single interaction, streamlining information retrieval.

Libraries: OpenAI - Langchain - ChromaDB - Gradio

YouTube video: Link

WebRAGQuery: (Combining WebGPT and RAG-GPT)

WebRAGQuery is a chatbot that is built on the foundations of WebGPT and RAG-GPT, this project gives the users the ability to utilize the LLM's pretrained knowledge, Duckduckgo web search engine, and chatting with websites.

Key Features:

  • Intelligent Decision-Making: The GPT model intelligently decides whether to answer user queries based on its internal knowledge base or execute relevant Python functions and access the internet.
  • Web-Integrated Responses: The second GPT model seamlessly combines user queries with content retrieved from web searches, providing rich and context-aware responses. WebRAGQuery supports a variety of searches, including text, news, PDFs, images, videos, maps, and instant responses.
  • Website-Specific Queries: When users inquire about a specific website, the model dynamically calls a function to load, vectorize, and create a vectordb from the site's content and therefore, gives the user the ability to ask questions about the content of the website. Users can query the content of the vectordb by starting their questions with ** and exit the RAG conversation by omitting ** from the query. ** can trigger the third GPT model for RAG Q&A.
  • Website summarization: On demand, this chatbot is able to go through a website and provide the user with a summary of the content.
  • Memory: WebRAGQuery boasts a memory feature that allows it to retain information about user interactions. This enables a more coherent and context-aware conversation by keeping track of previous questions and answers.
  • Chainlit Interface: The user-friendly interface is built using Chainlit.
  • Overcoming Knowledge-Cutoff Limitations: This chatbot transcends knowledge-cutoff limitations, providing answers based on the latest internet content and even allowing users to ask questions about webpage content.

YouTube video: Link

Libraries: OpenAI - Langchain - ChromaDB - chainlit

## Tutorial description:

This project showcases the capacity of GPT models to produce executable functions in JSON format. It illustrates this capability through a practical example involving the utilization of Python with the GPT model.

Libraries: OpenAI

YouTube video: Link

This project provides a comprehensive visualization of text vectorization and demonstrates the power of vector search. It further explores the vectorization on both OpenAi `text-embedding-ada-002` and the open source `BAAI/bge-large-zh-v1.5` model.

Libraries: OpenAI - HuggingFace

YouTube video: Link

Slides: Link

Running each project

To run the projects, you will need to install the required libraries. Follow the steps below to get started:

  1. Clone the repository and navigate to the project directory.
git clone https://github.com/Farzad-R/LLM-Zero-to-Hundred.git
cd <yourproject>
  1. Create a new virtual environment using a tool like virtualenv or conda, and activate the environment:
conda create --name projectenv python=3.11
conda activate projectenv
  1. Install the required libraries using the following commands:
pip install -r requirements.txt
  1. Then
cd <to each directory>

Follow the instructions provided for that specific project.

llm-zero-to-hundred's People

Contributors

farzad-r 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.