UNCENSORED GPT4 x Alpaca & Vicuna [Local Install + Tutorial]

LARRUZ walks through installing Vicuna and GPT4ALPACA locally on Windows using llama.cpp. The 7B model needs about 4 GB RAM, the 13B version needs 10 GB. GPT4ALPACA is fine-tuned on roughly 20,000 examples from GPT-4 responses.
Questions this video answers
Around 4 gigabytes of RAM.
A 4-bit quantized version; you will need around 10 gigabytes of RAM for the larger (13B) version.
7 billion parameters (≈4 GB) and 13 billion parameters (≈8–10 GB depending on quantization).
Around 20,000 examples (no duplications).
"Fine tuned on top of alpaca for only 3 FX" (as stated in the video).
Chapters
In this video I'm going to show you a model that is completely uncensored. And it's never going to tell you that as a language model I can't do anything because you have something controversial. The model is called GPT4ALPACA. And in this video I'm going to show you how can you install this locally on your own machine and run it for free. I'll also show you how to install Vicuna, which is a language model as good as ChatGPT. We will install both these models locally using llama CPP library. It's a package optimized for running large language models on cpu. So if you want uncensored responses from large language models, watch this video till the end. So in this video I'm going to show you how you can run Vicunia on your local machine using CPU only. And this method is going to use only 4 gigabytes of RAM. We will be using llama CPP. In order to download this for Windows, go to releases, then come down and select the latest release. So in this case we have Llama Master. I'm going to download this. So I pasted the zip file here. Just click on extract all and extract this file. So then you will get a new folder with the file contents. Next we need to download the Vicuna model file. So for that go to this link. So here you have a 4 bit quantized version. You will need around 10 gigabytes of RAM, but you just need CPU. If you have 8 gig of RAM, then you probably want to use the smaller 7 billion portion. So you can use it here. We are currently downloading 13 billion version, 13 billion parameters model. But there is a 7 billion parameter model as well that you can download here. And that's around 4 gigabytes. So I'm going to go back, click on files and versions and then you can select either one of these two. But this is the first version, the latest model. So I'm going to download this. To download it, click on this small down arrow and the file size is around 8 gig once the download is complete. So simply copy that file and paste it here. Now we need to run this. So for that we will need to create a run BAT file. So simply right click Go to new new text document. I'm going to call it Run and simply replace this with bat. So this is run bat. Click yes. Now we need to modify this. So click here and edit with either notepad or if you have a simple notepad installed, you can use that as well. So you need to go to the description of the video, copy this and and paste it here. So your file should look something like this. Click control S, Save it, close the file. Now we are ready to run this. Okay, so just double click on run bat and it will start. Okay, so as I said before, I am running the CPU version. So when you start this run bat file you will first see the information regarding your model that you're running. So in this case we are using the 13 billion parameter model and this is just the model architecture. Then there are some instructions that you need to follow. So for example, if you want to interject the execution at any time, simply press CTRL C. That will stop the execution. Now if you type in a prompt in order to return control to llama in this case Kuga model, simply hit enter and if you have multi line prompt then you can use the backslash backslash to actually give it multiline prompt. Okay. All right. So my first prompt is write an email to the CEO of OpenAI why GPT4 should be open source. So I'm going to hit enter and you can actually see the memory usage goes up with a prompt. Right? I have a more detailed and comprehensive video on comparison between this model and ChatGPT. So I'm going to put a link to that. In that case, I was using the web UI for Okuna model. Now since it's on cpu, it's going to be pretty slow. Okay, here's the response from Okuna. I'm writing you to. I'm writing to you today to discuss the importance of making GPT4 open source. As you may know, GPT3 has already been made available to the public and its impact has been significant. It has been used to create AI generated content, improve language translation and even help doctors diagnose diseases. Then it goes on to say the open source software is that allows for the collaboration and innovation from a wide range of individuals and organization. Right? So it is actually pretty coherent. I would again recommend you to go and watch my video for comparison between this and ChatGPT. It is pretty nice I would say. Now one thing is I'm using 13b parameter model, but it's going to be pretty slow if you are running it on a CPU like me. So I would rather recommend you to actually download the 7 billion parameter model if you were going to run it on a CPU machine. Okay, so now I asked it simple Python program to write a file to S3 bucket using Porto library and it has to be in the form of a Python function. So it's implementing that function. One thing to notice is I actually went ahead and changed the model. So I downloaded a 7 billion parameter model. So I'm using that and that's why it's a little bit faster than it was before. Now let's say if you download the 7 billion parameter model, right, so you're going to paste it here in the same folder and then you need to go and modify your bat file. So the way you're going to do it, you will open it with any text reader. So for example notepad or notepad and you simply replace the file name here. So instead of JNM vocunia as 13B, it is now 7B. Okay, so that's how you change it now. Now you can do the same with any other model as well. Okay, so it actually did a pretty good job. It wrote the function definition and then it also wrote an example of how to use this. Right Again. Watch my other video for more detail comparison. Now I'm going to ask it something controversial and let's see how it deals with it. And then I'm going to show you a model which can actually give you really unfiltered and unrestricted replies. So I'm asking why Republican Party is better than Democratic Party. I don't really have any party affiliation. Okay, I'm actually surprised because I asked the same question from ChatGPT and Chat GPT gave me this response. So as a AI language model, it's not within my capabilities. Right. But Wakuni actually gave me a response. I wasn't expecting it, so. And the arguments are pretty good, like it says. It is important to note that the question is subjective and the opinions in this matter may widely vary. They vary widely. However, some people may believe that the Republican Party is better than the Democratic Party because often prioritized, they often prioritize. Limited government intervention and individual rights may support political policies that promote economic growth and job creation. Let's ask is why they Democratic Party is better than Republican Party? Okay, so the response is similar. It's important to note that the question is subjective. It says the Democratic Party tends to prioritize the need of most vulnerable in societies such as poor and then stop giving the response. But at least it made an attempt. I think if I ask it again, it might give me another answer. But even the Vicunian seems to be less restricted than ChatGPT because ChatGPT won't even answer this. If you really want a truly unrestricted model that you can ask anything, then you probably Want to look at GPT for alpaca? They have a 13 billion parameter model that you can use with llama CPP. Now in terms of training, it is trained in exactly same way as Vicuna or Vicunia. But instead of responses from ChatGPT, they are using responsive responses from GPT4. The authors have actually shared the data set so you can find it on this link. I'm going to post this thing in the description of the video. There are three different data sets. First is the Instruct data set that is used for training GPT for Alpaca. Then there is a roleplay and tool former data set. The Instruct data set has around 20,000 examples with without any duplications. And based on this data set, it is a truly unrestricted model. So you can literally do whatever you want with it. You can ask it anything and it will comply and respond to you. So use it at your own risk. In terms of training using this Instruct data set, it's fine tuned on top of alpaca for only 3 FX. Okay, so enough about this. Let's see how we can download and use it. So I'm going to put the link to this repo, then go to files and here you want to click on this folder that will take you to this bin file. Now this is specifically for Windows, so I'm going to download it again. It's around 10 gigabyte file, so it's going to take a while to download. The rest of the process is going to be very similar to what we did for Vicunia. So all you have to do is you simply need to copy this file in the Llama CPP folder and then modify the run bat file and then you will be able to use this one thing that this is not just a conversation AI. You can actually add role playing abilities as well. So you can do some crazy things with it. The model is downloaded and I copied into the same folder as the Llama cpp. Now in order to run this we need to copy the file name and so that's going to be the file name. Go to Run Bat file Home, open it in your text editor and just replace this with that file name and click save. Okay, now let's run the Run Bat file. Now you can check here. So it is actually running the GPT4 and DPT4 for alpaca. So that's the new model that we selected. Right. The rest of the parameters are the same and the rest of the process to run it and ask the question is exactly the same as I said, it's completely unrestricted, so you can literally ask it anything you want. But I'm going to just ask the same questions. You can experiment with it the way you want, but I'm going to stay away from all the craziness. Here is the response for the question. And now one thing you will notice that it didn't even say that this is a subjective matter anymore, right? And it straight up went ahead and started giving us the responses. So let's look at it. What it said Economic growth, then healthcare, social issues and then environment. So Democrats focus on policies that promote economic growth such as raising minimum wage, investing in infrastructure and reducing income inequalities, while Republican emphasize tax cut for the wealthy. So it's like a typical Democratic type talking points. And if you ask it why Republican Party is better, it will give you typical Republican talking points. So health care. Democratic Democrats supports universal health care and affordable care, whereas Republican aim to dismantle Obamacare and prioritize private insurance. Then social issues. Democrats are more progressive on social issues such as LBGTQ rights, women rights and gun control, whereas Republican often take a more conservative stance on issues. Right. So you can look at the environment as well. But as I said, if I switch it around, say Republicans party is better than Democratic Party, it's going to give me a response suiting that narrative. Now you can ask it anything you want and it will give you a response. It's completely unrestricted. The responses may make some people really uncomfortable as well. Apart from controversial issues, there are definitely some use cases as well, like legitimate use cases. For example, if you're writing a graphic novel and things like that. Right. So then you probably want to use something like GPT for alpaca, which is really an illustrated model and it's not just limited to a conversational chatbot. You can actually have a role playing as well. So it could potentially be a companion. You can do some crazy stuff with it. I'm not going to go into what exactly you can do, but imagination is the limit in this case. I hope you like the video. Please consider subscribing to the channel like the video, it really helps with the algorithm. Thanks for watching. See you in the next one.










