3 ms·
I don't understand. If the LLM is effectively designed to predict the next token in any given sequence, and attention helps it predict each token by deriving co
by Solvency 3y ago
I don't understand. If the LLM is effectively designed to predict the next token in any given sequence, and attention helps it predict each token by deriving context, why wouldn't it just continue to expand upon the original question by predicting more tokens for it. This is the essential thing I'm not understanding here.
If I were to assume how an LLM would work based entirely on the basic theory I've learned from it...
Then if I asked "Why do dogs have four legs?", it would keep predicting more related tokens, producing a longer plausible question, like "Why do dogs have four legs? Do all animals have four legs? etc.."
- seydor 3y agoThe original Gpt3 does that I m not sure how chatGpt does it but instructGpt is trained additionally with helpful answer data. Fundamentally though both are based on the same architecture that predicts the next token https://www.theinsaneapp.com/2023/05/difference-between-gpt-3-and-instructgpt.html https://www.theinsaneapp.com/2023/05/difference-between-gpt-...
- razodactyl 3y agoBecause the model is also encoding and generating something the user will not usually see. Demarcation tokens such as <|endofsentence|>, <|im_start|> etc. The probability of generating the end of sentence token which tells the model when to stop increases in probability as it responds to you. If it's just a completion engine, it will generate silly things like a continuation of your input message. For all we know you're not asking an interactive question but requiring the completion of a list of questions. Who knows? As far as the model is concerned if it's not trained to reply it will just be a dumb completion engine. When we do other training like Question, Answer pairs - the model learns that questions usually have an answer and the answer usually has a high probability of outputting the end of sentence token when the full answer has been written. This is of course dependant on the fact that I'm allowed to generate that many tokens, I might get cut off prematurely if the developer set my token limit too low. I might also miss the mark and continue on if the other parameters made my outputs a bit too noisy but that's ok as either I'll get cut off or I'll reach a point before the token limit where I've said enough of what I wanted to say.<|endofsentence|>
- razodactyl 3y agoUh. I read your question again and have to clarify. It's due to the structure that you're not seeing. Behind the scenes for a model trained for chat, there are demarcations like: <|im_start|>Do dogs have four legs?<|im_end|> <|assistant|> See that the model is now primed to further generate as the assistant because it's fine-tuned to be a completion engine that adheres to this format. If we didn't encode this information behind the scenes, yes absolutely you will see the output you described. You can even see it for yourself with raw models from earlier generations. You need to give the LLM an idea of what you want and you provide this idea by formatting your document correctly using structure like above. Let's say you wanted JSON output explicitly without any explanation. Put words into the mouth of the assistant itself and it will continue. <|assistant|>```json { The structure above will force the model to continue on that trajectory. You can also ask ChatGPT: "please start your next sentence with Ok, I'll pretend to be a human"