Giter Club home page Giter Club logo

llama-2b-medical-bot-using-chainlit's Introduction

Chainlit Agent Based LLama model

###User Note : Please 1st Download and place the LLAMA 2B model into native directory before running the program.

Download LLAMA 2b here : https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/blob/main/llama-2-7b-chat.ggmlv3.q8_0.bin

(size of model is 6gbs so not possible to push if not in repo (may have automatically been rejected by repo management system)

0.) Dowload the said model

1.) Run Ingest.py

2.) later run model.py

3.) Run command in terminal : chainlit run model.py -w

4.) User window automatically pops up as see in readme,md

User window

img.png

Question based on text data in the pdf in data folder

here we are sourcing it from the 2004 edition of the book : Gale Encyclopedia Of Medicine

img_1.png

Here the response time highly depends on the Host computer resources as RAM and Processor (Min 8 GB RAM/Ideal 16 RAM).

img_2.png

Each of the Function calls can be tracked here to give the User a idea of the train of thought/process happening in the Background.

img_3.png

High lights

1.) Yellow text : This is the LLAMA 2B response.

2.) Pink text : This is the exact source from the ~600 Page Book from where the data was extracted and vectorized.

img_4.png

Chainlit is powerful as it allows for inbuilt customisations which are similar to streamlit.

img_5.png

Based on my understanding this can be expanded to other raw and unstructured Data sets as PPTS,Raw Docs,CSVs.

This gives a truely intelligent data outputs and is core in our Porject Usecase.

img_6.png

The Llama model can be replaced by any of the models downloaded from other sources as Huggingface Hub or Github in general.

This allows for a wide usecase application.

The creativity of the model can be changed or altered in the temperature parameter.

img_7.png

It also has the added advantage of reiterating ut's search as the old queries and answers are left in memory.

Overlay of the process

img_8.png

References

Llama 2 Model (Quantized one by the Bloke): https://huggingface.co/TheBloke/Llama...

Llama 2 HF Model (Original One): https://huggingface.co/meta-llama

Chainlit docs: https://github.com/Chainlit/chainlit

Faiss GitHub: https://github.com/facebookresearch/f...

AI Anytime: https://github.com/AIAnytime

Langchain Docs: https://python.langchain.com/docs/get...

Sentence Transformers Hugging Face: https://huggingface.co/sentence-trans...

CTransformers GitHub: https://github.com/marella/ctransformers

llama-2b-medical-bot-using-chainlit's People

Contributors

flyfir248 avatar

Stargazers

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