Here’s a documentation guide for setting up this GitHub repository locally, including how to install Llama.cpp on Windows, download the model, and run the model in the command line using Llama.cpp. Follow the steps below for the complete setup:
Llama.cpp is required to run the model on your local machine. Follow these steps to install it on Windows:
-
Go to the Llama.cpp GitHub Repository.
-
Follow the installation instructions for Windows:
- Clone the Llama.cpp repository:
git clone https://github.com/ggerganov/llama.cpp
- Navigate to the repository folder:
cd llama.cpp - Install dependencies (e.g.,
cmake,git,g++). - Build the project:
cmake . cmake --build . --config Release
For more details on installation, check the Llama.cpp repository.
- Clone the Llama.cpp repository:
You will need the Chocolatine-3B-Instruct-DPO-Revised-Q4_K_M-GGUF model for running inference. Download it from the following link:
Save the model file in an accessible directory on your machine. Make sure to note the path where the model is saved for use in the following steps.
To set up the necessary environment and dependencies, follow these steps:
-
Clone the repository:
git clone https://github.com/your-repo/chatbot-physics.git
Replace
your-repowith the correct repository name. -
Navigate to the repository directory:
cd chatbot-physics -
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use venv\Scripts\activate
-
Install the required dependencies from
requirements.txt:pip install -r requirements.txt
Once Llama.cpp and the model are set up, you can perform a dry run of the model using the command line. Use the following command to run the model in Llama.cpp:
-
Ensure you are in the
llama.cppdirectory. -
Run the model:
./main -m /path/to/model/file -p "Hello, how can I assist you?"Replace
/path/to/model/filewith the actual path to the downloaded Chocolatine-3B model.The
-pflag is used to pass the prompt to the model, and you can modify the prompt as needed.
To clone this repository, use the following command:
-
Open a terminal or command prompt.
-
Run the following Git command:
git clone https://github.com/your-repo/chatbot-physics.git
-
Navigate into the project directory:
cd chatbot-physics
Follow the steps above, and you should be able to successfully set up the project locally on your machine. For any additional help or troubleshooting, refer to the respective documentation links provided above.