This repository contains the code used to create the results presented in the blog post titled "Comparing different LLMs".
The HF_models/models_HF.py
file wraps different Language Models (LLMs) available in the transformers library inside the LLM
module from langchain
. On the other hand, the Llama/model_lit_llama.py
file wraps Lit-LLaMA inside the same module. Note that to use Lit-LLaMA, you'll need to request the weights from Meta.
In the comparing_LLM.ipynb
notebook, you'll be able to call any of the models seen in the blog (GPT4 and Bloomz 176b) and test its performance using the template.
To run the code, you need to have the following requirements:
- Python 3
- Jupyter Notebook
- Some models may require ~23 GB of VRAM.
- Clone the repository to your local machine.
- Install the required dependencies:
pip install -r requirements.txt
- Open
comparing_LLM.ipynb
using Jupyter Notebook. - Follow the instructions in the notebook to test the different LLMs.