Comparing Different Language Models

This repository contains the code used to create the results presented in the blog post titled "Comparing different LLMs".

Overview

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.

Requirements

To run the code, you need to have the following requirements:

  • Python 3
  • Jupyter Notebook
  • Some models may require ~23 GB of VRAM.

How to use

  1. Clone the repository to your local machine.
  2. Install the required dependencies: pip install -r requirements.txt
  3. Open comparing_LLM.ipynb using Jupyter Notebook.
  4. Follow the instructions in the notebook to test the different LLMs.