What is Alpaca🦙
Alpaca is an artificial intelligence from the field of NLP that has been developed at Stanford University.
Alpaca is capable of generating text, but how powerful is Alpaca? According to the university itself, they have reported a similar power to OpenAI’s GPT-3, specifically to the current top version: DaVinci-0003.
That is to say, Alpaca is right now “State of art” in its field. And it is also remarkable the fact that it is open source.
However, despite being open source, it is not “free”, that is, it is OpenSource but not FreeSource. Its license is almost limited to personal and educational use. This restrictive license is due to the way Alpaca has been trained as we will see in the next point.
State of Art in NLP with few resources
The paper presents two major challenges in training high-quality instruction tracking models on an academic budget: the need for a robust pre-trained language model and high-quality instruction tracking data. To address these challenges, the use of Meta’s new LLaMA models and the automatic generation of instruction data via an existing robust language model are proposed. It is explained how the Alpaca language model was obtained through the self-instruction method and the generation of 52,000 unique instructions and their corresponding outputs at a cost of less than $500 using the OpenAI API.
To give you an idea of what this means: GPT-3 cost a whopping several million dollars to train. Here what we are seeing is how a powerful model is trained with very few resources, albeit aided by more powerful models. 😱
How to install and use Alpaca 🍣
You can download and install Alpaca on Linux following these steps. Both in Debian and Ubuntu and distros with .deb package in general.
If you want to install Alpaca on Linux distros like Fedora, just change the “apt” in the commands to “dnf” and you are done.
Open the terminal and use the following commands:
sudo apt update
sudo apt upgrade
sudo apt install make gcc g++ git
git clone https://github.com/antimatter15/alpaca.cpp
You can download Alpaca with this command:
curl -o ggml-alpaca-7b-q4.bin -C - https://ipfs.io/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC
And here I leave 3 other sites from where to download it(just in case 😜).
curl -o ggml-alpaca-7b-q4.bin -C - https://gateway.estuary.tech/gw/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC
curl -o ggml-alpaca-7b-q4.bin -C - https://cloudflare-ipfs.com/ipfs/QmQ1bf2BTnYxq73MFJWu1B7bQ2UD6qG7D7YDCxhTndVkPC
Yes, all from the IPFS protocol or bridges thereof.
And presto, we can use it! 🥳
Just download Alpaca from any of the 3 sources mentioned at the end of the linux installation point, and then run the following command in the terminal: