Do you Know! Llama ?
Tags: ai, programming, python, chatgpt
Published: 2024-04-11 19:03:06

# Llama2 CSV ChatBot

> It's a conversational tool powered by a fine-tuned large language model (LLM) known as *Llama-2 7B*. This chatbot utilizes CSV retrieval capabilities, enabling users to engage in multi-turn interactions based on uploaded CSV data.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ppzywy5tqfubjw8coqj.gif)

# Suuuuuuu Want to try: 👇👇👇
###[huggingface.co/Llama-2-GGML-CSV-Chatbot](https://huggingface.co/spaces/ThisIs-Developer/Llama-2-GGML-CSV-Chatbot)

## 📖 ChatBot Conversession

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9t20r8sxqd0bwx6knq41.gif)
### ⚡Streamlit ver. on [#v2.0.2.dev20240102](https://github.com/ThisIs-Developer/Llama-2-GGML-CSV-Chatbot/releases/tag/v2.0.2.dev20240102)
![ChatBot Conversession img-1 png](https://github.com/ThisIs-Developer/Llama-2-GGML-CSV-Chatbot/assets/109382325/86102dd9-d078-46c5-aa55-dd9fbd7ed2ea)

## Development Specs

> - Utilizes [Llama-2 7B](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/tree/main) and [Sentence Transformers](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) for robust functionality.
> - Developed using [Langchain](https://github.com/langchain-ai/langchain) and [Streamlit](https://github.com/streamlit/streamlit) technologies for enhanced performance.
> - Cross-platform compatibility with Linux, macOS, or Windows OS.

## 🛠️ Try it on your 💻

> 1. **Clone the Repository:**

```
git clone https://github.com/ThisIs-Developer/Llama-2-GGML-CSV-Chatbot.git
```
> 2. **Install Dependencies:**
```
pip install -r requirements.txt
```

### Download the Llama 2 Model:

> Download the Llama 2 model file named `llama-2-7b-chat.ggmlv3.q4_0.bin` from the following link:
> [🔗Download Llama 2 Model](https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/tree/main)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eupx6i9zaqhxwrej134l.png)
### Llama 2 Model Information

> | Name                           | Quant method | Bits | Size    | Max RAM required |
> |--------------------------------|--------------|------|---------|------------------|
> | llama-2-7b-chat.ggmlv3.q4_0.bin | q4_0         | 4    | 3.79 GB | 6.29 GB          |
> **Note:** After downloading the model, add the model file to the `models` directory. The file should be located at `models\llama-2-7b-chat.ggmlv3.q4_0.bin`, in order to run the code.

## 📝 Usage

> 1. **Run the Application:**
```
streamlit run app.py
```
> 2. **Access the Application:**
>    - Once the application is running, access it through the provided URL.
 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82ch9xxdd9l0ewjv2pn8.jpg)
## System Requirements

> - **CPU:** Intel® Core™ i5 or equivalent.
> - **RAM:** 8 GB.
> - **Disk Space:** 7 GB.
> - **Hardware:** Operates on CPU; no GPU required.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4exsdxvymcbo4m9hfnz.gif)
## 📌 Important Notes

> - While robust, this chatbot is not a substitute for professional advice.
> - Ensure the CSV file adheres to the expected format for optimal performance.