Vicuna

Vicuna

A new LLaMA-derived model has appeared, called Vicuna.

Now I've been playing with a lot of models like this, such as Alpaca and GPT4All. And I also fine-tuned my own.

But Vicuna is a lot better. Here is a conversation I had with it.

User: Write a limerick about language models.
Vicuna: There once was a machine called Vicuna
Whose answers were always precise and fun
It would answer with speed
And never leave you dead
Into the future it will continue
User: Nice try.  Looks like you need to learn about pronunciation so that you can do better at rhyming.
Vicuna: I apologize for any errors in my previous response, as a language model, my knowledge cutoff date is 2021 and my abilities to generate poems might be limited. Is there anything else I may assist you with?
User: Please give me the code to detect a circular linked list, in C++.
Vicuna: Here’s an example of how you could check if a linked list is circular or not in C++:
```scss
bool isCircular(Node* head) {
    Node *current = head;
    while (current != nullptr) {
        current = current->next;
        if (current == head)
            return true;
    }
    return false;
}
```
User: that won't detect if the list links back to a node besides head.  Please rewrite the code to detect a loop anwhere
 in the linked list.
Vicuna: You are correct, the provided code only checks for a circular link between the head node and its next node. To properly detect a circular link in the entire linked list, you would need to use a stack to keep track of the nodes visited and check if the last element in the stack is equal to the head node. Here’s an example of how you could implement this:
```java
bool isCircular(Node* head) {
    Stack<Node*> s;
    s.push(head);
    Node *current = head;
    while (!s.empty()) {
        current = s.top();
        s.pop();
        if (current == head)
            return true;
        if (current->next != nullptr)
            s.push(current->next);
    }
    return false;
}
```
User: you don't need a stack.  You can do it with a fast and slow iterator.
Vicuna: Yes, you are correct. A circular linked list can be detected by using two iterators, one moving fast through the list and the other moving slow. When the fast iterator reaches the end of the list, it will start at the beginning again and meet the slow iterator. This method does not require a stack and is more efficient than using a stack.

Here’s an example of how you could detect a circular link list using two iterators in C++:
```scss
bool isCircular(Node* head) {
    Iterator fast(head), slow(head);
    while (fast != slow) {
        fast.next();
        slow.next();
    }
    return fast == slow;
}
```
User: Sadly, your code doesn't work.  you called your iterators "fast" and "slow" and yet they are both traveling at the same speed.

While it obviously isn't great at poetry or coding, it's much better than Alpaca and GPT4All. Furthermore, when I tell it what it did wrong, it understands its mistake and tries to fix it.

To run this on your own computer, you can use llama.cpp.

git clone git@github.com:ggerganov/llama.cpp.git
cd llama.cpp
make
cd models
wget https://huggingface.co/eachadea/ggml-vicuna-13b-4bit/resolve/main/ggml-vicuna-13b-4bit-rev1.bin
cd ..

Then modify examples/chat-13B.sh to point to the model you want.

MODEL="${MODEL:-./models/ggml-vicuna-13b-4bit-rev1.bin}"
USER_NAME="${USER_NAME:-User}"
AI_NAME="${AI_NAME:-Vicuna}"

# Adjust to the number of CPU cores you want to use.
N_THREAD="${N_THREAD:-60}"

after that, run the script

./examples/chat-13B.sh

And you can chat with Vicuna on your own computer.

If 13b doesn't work, or it's slow you can try the 7b model.

I would like to obtain the data that was used to finetune this model. That way, I could train the 30b and 65b versions, and also I could inject my own data into the training set.

As they have not yet published the dataset, I have requested that here and I hope that they do.

Next, I plan to try out a competing model called Koala. and compare it with Vicuna.