A repository dedicated to various implementations of Large Language Models (LLM). This repository includes examples and techniques integrating LLM with other advanced technologies such as Retrieval-Augmented Generation (RAG). Ideal for researchers and developers looking to explore and innovate in the field of natural language processing and AI.
-
RAG_LLaMA3.ipynb: This notebook demonstrates an implementation of Retrieval-Augmented Generation (RAG) using LLaMA3 and LangChain. It showcases how to create a RAG system that leverages the LLaMA3 model to provide accurate and contextually relevant responses by integrating with a retrieval system. This implementation is useful for applications requiring enhanced information retrieval capabilities combined with language model generation.
- Contextual Relevance: Integrates a retrieval system to provide contextually relevant responses.
- Enhanced Information Retrieval: Utilizes LangChain to improve the retrieval and generation process.
- LLaMA3 Integration: Demonstrates the use of LLaMA3 for advanced language generation capabilities.
langchain
: 0.2.5langchain_community
: 0.2.5langchain-huggingface
: 0.0.3pypdf
: 4.2.0pymupdf
: 1.24.5transformers
: 4.41.2bitsandbytes
: 0.43.1sentence-transformers
: 3.0.1faiss-gpu
: 1.7.2huggingface_hub
: 0.23.4accelerate
: 0.31.0
-
llama3_cpp.ipynb: This notebook provides an implementation of the LLaMA-3-8B-Instruct-32k-v0.1 model using the
llama-cpp-python
package. It includes options for both single-turn and multi-turn conversations, allowing users to interact with the model in a conversational manner. The notebook also includes code for downloading the model, setting up the environment, and handling user inputs efficiently.- Single-turn conversation: Interact with the model for one-off questions and responses.
- Multi-turn conversation: Maintain a conversation context across multiple interactions.
- CPU-Compatible: This implementation can be run on CPU, making it accessible for those without access to high-end GPUs.
llama-cpp-python
: 0.2.79
Feel free to fork this repository and contribute by submitting a pull request. Any contributions, whether it be improving existing code or adding new examples, are greatly appreciated.
This project is licensed under the MIT License - see the LICENSE file for details.