4
$\begingroup$

So I read Wolfram's What Is ChatGPT Doing … and Why Does It Work? but it left one really big question in my mind. His summary [if it could be called that!] really emphasizes that the core model is trained to "continue a piece of text that it’s been given".

But if I prompt it with something like:

this is the reason that

it usually gives a response like:

I'm sorry, but your message seems to be incomplete. Could you please provide more context or information so that I can understand what you are trying to convey?

And in general, tends to very much give the impression of a conversation, "prompt" vs. "response".

Architecturally is there a layer within the core LLM that encodes and gets trained on the "conversation" aspects? Or is that done via a separate standalone system, either an independently trained model or some non-ML wrapper logic?

$\endgroup$
1

1 Answer 1

3
$\begingroup$

TLDR: It is taught to do that during training

The secret sauce here is not in the architecture but in the fine-tuning part of the training process. The details of which have not been made public yet.

Large-language models (LLMs), such as ChatGPT, indeed do nothing else than continually predict the next token for a given sequence of tokens (the prompt).

LLMs are traditionally simply trained to predict this next token in a self-supervised manner on an immensely large amount of data. However, after having done this, there is a second stage to training, namely fine-tuning. The OpenAI ChatGPT Blog states that it does some human-feedback reinforcement learning.

Human feedback reinforcement learning

In short, human feedback reinforcement learning is nothing else then prompting the model for some input (question), letting it generate several responses, and ordering these answers based on desired output by humans. There are tons of people ranking these answers by hand for fine-tuning these models.

ChatGPT and other Chat LLMs are thus trained to respond to the prompt

this is the reason that

with

  1. You prompt seems incomplete

as during fine-tuning this was probably ranked higher by humans than

  1. stackexchange is awesome.
  2. the internet is cool.
  3. the sun comes up in the morning.

In essence, it is thus simply trained to respond that way. It has nothing to do with the architecture, wrappers or anything of the sort.

Now this applies much broader to the general concept of chat. The whole fine-tuning process is basically feeding in questions and receiving answers. So the 'chat functionality' is induced into the model through the training process. However, as you can probably still do, it can finish your stories if you ask it to with prompts such as

You are a writer, finishing stories of others. You start working on "There once was...".

Which is not necessarily a 'chat', but simply next word prediction.

$\endgroup$
1
  • 2
    $\begingroup$ I'd bet that ChatGPT has marker tokens for end of prompt, etc. It sees "This is the reason that <|endofprompt|>" and obviously cannot continue the sentence in a valid way; after <|endofprompt|> always comes a new sentence. Alternatively a token class could be given alongside each token, with similar effect. $\endgroup$ Apr 24, 2023 at 21:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .