Using Large Language Models to Understand Puns
Course project for CNIT 483 - Applied Machine Learning (Fall 2023)
These instructions are for macOS running Apple Silicon
Make sure you have Python 3.9 and above
- Clone the repository
git clone https://github.com/RyanDsilva/punderstand.git
-
Download a quantized model to the local folder
models
. Make sure it is in the.gguf
format. I used themistral-7b-openocra.Q6_K
from this link. -
Install python dependencies
pip install -r requirements.txt
- Install
llama.cpp
for Apple Silicon
CMAKE_ARGS="-DLLAMA_METAL=on" pip install llama-cpp-python
- Get your Open AI API key and store it in the
.env
file
OPEN_API_KEY=''
- To run the UI:
sh run.sh
- To reproduce results, run the
.ipynb
notebook files.