In this tutorial, we’ll show you how to install language models like Alpaca and Lama on your computer so that you can run a chat model like Chat GPT without internet access. This works on Linux, PC, and Mac, and requires Node.js and a few other programs. Let’s get started!
Step 1: Go to GitHub and navigate to https://github.com/cocktailpeanut/dalai. This is where you can download the necessary files to install the language models.
Step 2: Choose which model you want to install. Alpaca is a more optimized, smaller version, while Lama is the original open-source and larger in size. In this tutorial, we’ll be using Alpaca.
Step 3:
If you’re on a Mac, Install Node.js on your computer. Simply click on the Mac installer and follow the prompts.
If you’re on a PC, you’ll need to download Visual Studio, select Python development, Node.js, and Desktop Development C, and choose which modules you’d like to install.
Step 4:
Installation for Mac
First, let’s talk about installing alpaca models. To do this, you can run the following command inside TERMINAL:
npx dalai alpaca install 7B
This will download the alpaca models onto your computer, which you can use for various tasks.
Optionally, To download the larger llama models, you can run the following command:
npx dalai llama install 7B
This will download the llama models onto your computer, which you can use for tasks such as text generation or translation.
If you want to download multiple llama models, you can run this command instead:
npx dalai llama install 7B 13B
This will download both the 7B and 13B llama models onto your computer.
That’s it! Now you know how to install both llama and alpaca models on your computer. Have fun using them!
Installation for PC:
Firstly, it’s important to note that if you’re using a Windows computer, you need to run all the commands in cmd and not in powershell. Powershell has strict permissions that can make the script fail silently.
Now, let’s get started with installing alpaca models. Open your cmd application and type in this command:
npx dalai alpaca install 7B
This will download the alpaca models onto your computer.
Next, let’s add llama models. Open your cmd application and type in this command:
npx dalai llama install 7B
This will download the llama models onto your computer. If you want to download multiple llama models, you can type in this command:
npx dalai llama install 7B 13B
That’s it! You’ve successfully installed the alpaca and llama models on your computer.
LOADING the user interface
Once you’ve installed everything you need, you can run the following command to start the web UI server:
npx dalai serve
This command will start the server, which will allow you to interact with your installed models through a web interface.
Once you’ve started the server, you can open up your web browser and navigate to http://localhost:3000. This is where you’ll find the web UI for your installed models.
Now you can have fun playing around with your models and using them for various tasks! That’s it for this tutorial – happy exploring!
Additional Resources:
Read about Dalai – https://crfm.stanford.edu/2023/03/13/alpaca.html
GitHub https://github.com/cocktailpeanut/dalai