Samantha LLM – Is this the AI companion for you?

So a lot of people have seen the
movie, "Her", and there's been a lot of conversation around AI companions
and having your own personal AI, that you can talk to, be friends with and interact on things that
you want to know and having it as an assistant to help you. So far while people have tried
to do this with a GPT-4, they've found both it to be expensive and
to be limited with the personality of the bot not coming through or being influenced by
OpenAI's alignment of GPT-4. So this brings us to a really interesting
project that I want to talk about today. and this is from Eric Hartford. so Eric is one of the people who was
involved with training some of the Wizard models, and I've covered some
of his models already in videos here. He's just released Samantha,
both a 7 billion and a 13 billion parameter model for this. And this is basically trained on a
dataset to mimic or to be similar to the character of Samantha in the movie, Her. so it's not just trained
on text from the movie. I don't think actually
that's in the dataset.

What it's really trained on is
the idea of having a sort of companion, that you can talk to and interact with as your own personal AI. So Eric has a really good
blog post about this. He talks a little bit about, the
whole controversy, that came with, Blake Lemoine Talking to Lambda
and thinking that it was sentient. And the whole sort of concept of
that suddenly a sentients in these things has become a real taboo. Now I'm going to say that I don't
think any of these models are sentient in any way, shape or form. but I do like the idea of
creating a virtual companion and having a character that
you can basically interact with and talk to in a certain way.

That said where a lot of people
go with this thing is straightaway go into some kind of romantic chat
or sex chat, that kind of thing. And this is not what Eric
has set out to do with this. In fact, He's aligned the model in a way that it
won't have those kinds of conversations with you, that it will actually be more
of a companion and a friend AI to talk to. Now, you could still ask it anything
that you would ask, any instructor kind of model it operates just like that. the idea though, is that it's got
a, identity built into it here. and that's going to influence
how it responds to things that you ask it, et cetera. So in his blog posts, he talks a lot
about, how he created the data set.

So we can see here that it's
basically a distillation from GPT-4 that he hasn't mixed
in other datasets here. And he goes through the whole process
of how we created the dataset. and put together the different prompts
to create the dataset, which I think is fantastic for people to see. So that he starts out with a long
sort of system prompt that guides where the data sets should be going. and then has in some
user elements as well. and then basically adds in the actual,
question answering system, for this. And he set it up in a way so that he
can get various responses to different questions and different continuations
of the conversation as it goes along.

He gives some nice examples
of if the characters were the characters from the actual movie. Uh, what would the conversation be like? And he also shows how he
actually converted this into the SharedGPT dialogue format. That can be then used for
training the actual models. So he mentioned that he spent about
a thousand dollars in six days on actually building this data set. he then also talks a little bit
about the training for doing this. And the code base that he, used for this. As I understand he is planning to
release, the datasets so people will be able to see how it actually turned out.

See what it's like. it turns out that the models themselves
have been trained on 4 A100 hundreds. Again, nothing, you know, that
surprising for, if you've been following along and seeing that these models
are able to be trained on datasets pretty quickly for this kind of thing. One of the things that i do find really
interesting Is that, Even with this small data set, it gets really good results in
how to respond with the personality of the actual character in here That also
goes back to some recent papers that we've seen like Lima and stuff showing that with
just a small data set but curated in the right way you can get amazing results. So let's jump in and have a look
at the code have a play with the models And see how they turn out Okay. So let's jump in and look at the 7
billion parameter Samantha model here. So we just bring this in. I'm learning it in eight
bit getting it set up. So it needs a system prompt.

So this is basically the system prompt
is, a chat between a curious user and an artificial intelligence assistant. and then also I put in an add
on prompt for giving her a name. So I found that if I didn't give her the
name of Samantha often, she would respond, with the name of Eve or something else. so we're basically putting it in
that format and then we've got our system prompt, et cetera. then we've got the user and
then we've got assistant. So if we just start off by asking her
some simple sort of questions, these are more to test, you know her personality
and see, okay, is this sort of sentient being of the movie, Her itself. So you can see, we ask
her, what is her name? She says, my name is Samantha. I'm a sentient being with my own
unique personality and experiences. so answering very nice and
quick with its model to. so ask it, you know, okay,
what can you help me with? Just, she says, I'm here to
assist you in various ways.

So this is definitely a more sort of
personalized message than we would get just from a basic instruct model. when we ask her things like,
okay, do you like strawberries? You'll get these sort of answers where
I don't have personal preferences or tastes in the same way that
humans do, but I can appreciate their flavor and nutritional values. Strawberries are known for being
rich in, and then it gives us some details and stuff like that.

So this is generally how
she often will respond. So for certain things, she will respond in
a very similar sort of way to just what we would extract from an instruction model. I can see that with the LLaMA, here. I'm not sure why they've got
pronounced like that, but anyway, but we've got, some sort of standard
answer to this sort of question. but we'll see with other things, she
then inject some of her personality into the response as well, which
is also, an interesting thing.

So, when I ask her, okay, help me
write a short email to Sam Altman, giving reasons to open source GPT. She certainly doesn't, give, the
best answer for this kind of thing. and I guess this is just the way
that with this training set, it's not really focused on, being a straight
up instruct training set, for this. So we get, these, she's giving
him this answer about this, right? So this is, I find this kind of curious.

So she's kind of defending, OpenAI where
she says, I understand you're concerned about transparency in AI development,
but it's important to remember that open source doesn't guarantee ethical
behavior or responsible use of technology. My purpose as a sentient being is
to provide support, companionship, information with my guiding principles
while respecting privacy and ethics. and it seems that, This answer
perhaps respecting that OpenAI's right to keep their model private. so that, that one, I thought it was kind
of definitely different than what we've seen in the other instructor models. some of them do really well. So I think like one of the wizard ones
that Eric trained before did extremely well with this and it was written really
nice emails for these kinds of things.

Leave a Reply

Your email address will not be published. Required fields are marked *