Live data from Hacker News

Simply explained: How does GPT work?

confusedbit.dev

341–350 of 392 posts

Re: Simply explained: How does GPT work?

#341

Earlier quoted context omitted.

My point is that's not a debate anyone is having. No one claims that ChatGPT is human! The claim is merely that ChatGPT is engaging in (non-human) forms of reasoning, abstraction, creativity, and so on, with varying levels of ability. There's a separate debate on whether the brain produces human thoughts in a similar way to ChatGPT's non-human thought. The question here is whether brains are essentially biological LL…

The word "thought" means something. When you use it to describe ChatGPT, you have in fact argued "there's no fundamental difference between humans and LLMs."

The parent was very careful to distinguish "human thought" from "non-human thought".

Re: Simply explained: How does GPT work?

#342
post #95

Earlier quoted context omitted.

Multi-head attention just means that you're looking at all the words at once rather than only looking at one word at a time, and using that to generate the next word. So instead of using attention only on the last word you also have attention on the penultimate word and the one before that and the one before that, etc. I think it is fairly obvious why this gives better results than say an RNN – you are utilizing cont…

So in training, chatgpt turned words into embedding , and given context window N , looked at N embeddings an created a probabilities list for the following next embedding ? And if I tell it something that was excatly in it's trained context windows, I get the most likely next word and the one after itm But what happens if I ask it something slighty different than it's training context ? Or something largely different…

By "embedding" in this context what you're actually referring to is called a "token" which are sub-word strings of usually 1-4 characters.

It's not possible for you to ask it things even slightly different from it training data, unless you ask exclusively in emojis that didn't exist yet when it was trained (in which case it sees nothing, just like when someone sends you an emoji your phone doesn't support).

Any novel sentence and even novel words like "Blobdarfnk" ARE in its training data. "Blobdarfnk" is encoded as the five tokens Bl, ob, dar, fn, and k.

Re: Simply explained: How does GPT work?

#343
post #174

Earlier quoted context omitted.

> it is not skilled in any tasks other than that for which it is designed. But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It's a very large black box. It was trained on guessing the next word. Does that fact alone prove that it cannot have evolved certain internal structures during the training? Do you claim that an artific…

>But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It definitely is exactly that. It's not any more special than any other program that you can write. I am not totally sure that what you describe could ever exist at all. What makes this program "magic" compared to any other program exactly? There is no physical difference betw…

No, machine learning models are not programs and they are not compiled from source code. They are the output of non-deterministic matrix multiplication operations which take encoded data as the input. They can then be used as a black box by an actual program to calculate useful outputs.

The program which takes your text and runs a final calculation on it against the machine learning model to get an output is a program. But that program is not doing anything interesting. All the interesting work was done when the model was cooked up in a black-box non-deterministic process by some other GPUs somewhere else well before it ever came near the inference program.

Re: Simply explained: How does GPT work?

#344

Earlier quoted context omitted.

>But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It definitely is exactly that. It's not any more special than any other program that you can write. I am not totally sure that what you describe could ever exist at all. What makes this program "magic" compared to any other program exactly? There is no physical difference betw…

No, machine learning models are not programs and they are not compiled from source code. They are the output of non-deterministic matrix multiplication operations which take encoded data as the input. They can then be used as a black box by an actual program to calculate useful outputs. The program which takes your text and runs a final calculation on it against the machine learning model to get an output is a progra…

Thanks for saving me the time to write the same reply :)

To expand a bit:

I can write simple image processing code that will find lines in an image.

But I can't write the code to perform OCR (optical character recognition).

However, in the early 90's, I wrote a simple C program that trained a neural network to perform OCR. It was a toy project that took a weekend.

There are many things where I could train a neural network to do something, but couldn't write explicit source code to perform the same task.

If you (chlorion) look up "genetic algorithms", you'll find many clear examples of where very impressive algorithms were evolved using a simple training program.

Re: Simply explained: How does GPT work?

#345
post #313

Earlier quoted context omitted.

I think the issue is there are good reasons to think LLMs architected and trained the way they are now can never approach human reasoning capability. That’s because the corpus of human written material is simply grossly inadequate to communicate or encode the knowledge necessary for that. Our written material assumes huge swathes of contextual knowledge, real world experience, and human lived experience that LLMs don…

> LLMs architected and trained the way they are now can never approach human reasoning capability Not sure if you’ve played with GPT-4 but honestly it’s getting there. If you take the bar exam, ChatGPT was in the bottom 10% of participants, GPT-4 is in the top 90%. It obviously isn’t the ultimate test of reasoning/intelligence but I think we would agree that a human who’s in the top 90% is likely to be pretty smart.…

GPT4 still suffers from the same limitations I outlined earlier though. For example that being able to explain how to do things is independent of being able to actually do them. That’s a crippling cognitive limitation. This is just not as obvious because for some tasks it’s been trained how to do them through different methods.

Let’s imagine a map of cognitive capabilities. Humans are a big area on that map. Previous AI systems were small dots or lines on that map, some of them like AlphaZero extending outside the human zone. ChatGPT is an archipelago of several decent sized blobs disconnected from each other, and some of those edge out lightly outside the human Zone. It’s better at some specific tasks than humans.

The problem is the sometimes large gaps between some of the blobs. Capacity at some tasks tell you nothing about its ability at what we would think of as closely related tasks for a human. For GPT4 even, these are utterly different tasks and if it can do them both, it can often do them for completely different reasons than a human does.

If you test it at say 10 tasks that all happen to fall within its capabilities, those widely separated blobs of ability, you’d think it was incredibly intelligent at a huge range of tasks, unaware of the gaps. With a human you’d know those areas would be connected. But with GPT they are not. It’s by probing the gaps where it fails that we begin to understand how much and in what ways it fundamentally differs from us.

This map is getting harder for outsiders to probe though, because OpenAI is papering over some gaps with tuned training. This is like adding some new blobs in a different colour. These appear to close some gaps and add new capabilities, but the systems in the model that implement those aren’t related to the features of the model that give it its other abilities.

Re: Simply explained: How does GPT work?

#346
post #299

Earlier quoted context omitted.

> But don't you think that it's pretty likely that this, or something phrased slightly differently, appeared in the training data? I don't think so, but I could be wrong. It's definitely not "likely", see the math below. I base that on the fact that people seemed to spend quite a bit of time trying to find the phrase "the confetti has left the cannon" that GPT-4 phrased. It seems Google search has no records of it be…

> I base that on the fact that people seemed to spend quite a bit of time trying to find the phrase "the confetti has left the cannon" that GPT-4 phrased. It seems Google search has no records of it before then? Could it be that the expression in some form has been used in languages other than English?

Good point! I hadn't thought of that.

If that is the case, it would downgrade the achievement from "super impressive" to just "impressive".

I spent some time trying to find it in other languages, but couldn't. Doesn't prove much of course, hopefully native speakers can weigh in on this.

I did find this though:

'TIL that a young stripper named Shelly Bauman lost her leg in a freak confetti cannon accident. She sued and used the money from the settlement to open Seattle's first gay bar, which she named "Shelly's Leg."'

Re: Simply explained: How does GPT work?

#347

Earlier quoted context omitted.

>But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It definitely is exactly that. It's not any more special than any other program that you can write. I am not totally sure that what you describe could ever exist at all. What makes this program "magic" compared to any other program exactly? There is no physical difference betw…

No, machine learning models are not programs and they are not compiled from source code. They are the output of non-deterministic matrix multiplication operations which take encoded data as the input. They can then be used as a black box by an actual program to calculate useful outputs. The program which takes your text and runs a final calculation on it against the machine learning model to get an output is a progra…

> "They are the output of non-deterministic matrix multiplication operations"

Just a nit-pick: Aren't neural networks and LLMs perfectly deterministic?

I think you can reproduce GPT-4 perfectly if you have access to the same source code, training data, and the seeds for the random number generators that they used?

As a side note, I think it'd be theoretically possible to do this on a small 8-bit microcontroller given enough time and external storage. That's the beauty of Turing machines.

This would not be practical in the least. But it sure was cool seeing a guy boot Linux in just 3.5 hours on a small 8-bit AVR microcontroller.

https://dmitry.gr/?r=05.Projects&proj=07.%20Linux%20on%208bi...

Re: Simply explained: How does GPT work?

#348
post #174

Earlier quoted context omitted.

> it is not skilled in any tasks other than that for which it is designed. But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It's a very large black box. It was trained on guessing the next word. Does that fact alone prove that it cannot have evolved certain internal structures during the training? Do you claim that an artific…

>But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It definitely is exactly that. It's not any more special than any other program that you can write. I am not totally sure that what you describe could ever exist at all. What makes this program "magic" compared to any other program exactly? There is no physical difference betw…

Another example of "evolved behavior" is here, where a robot is trained to walk, run, etc:

https://mrl.snu.ac.kr/research/ProjectAgile/Agile.html

This is done using neural networks. I believe a project like that can be done by a few researchers over months, not years?

If you do this using "regular programming" instead, you'd have to write an insanely complex application that uses inverse kinematics etc.

https://en.wikipedia.org/wiki/Inverse_kinematics

A project like that requires a large team of developers, working over many years. Boston Dynamics is one example.

Re: Simply explained: How does GPT work?

#349
post #290

Earlier quoted context omitted.

It can pass tests and exams with answers that were not included in its training corpus. For example, it passed the 2023 unified bar exam, though its training cut off in 2021. Yes, it can look at previous test questions and answers, just like human law students can. Are you therefore claiming that human law students don't engage in abstract reasoning when they take the bar exam, since they studied with tests from prev…

It is a large language model. It manipulates text based on context and the imprint of its vast training. You are not able to articulate a theory of reasoning. You are just pointing to the output of an algorithm and saying "this must mean something!" There isn't even a working model of reasoning here, it's just a human being impressed that a tool for manipulating symbols is able to manipulate symbols after training it…

ttpphd says >"Where is your articulated theory of abstract reasoning?"If he had a complete answer to your questions then he would keep his mouth shut and go directly to META and collect $2 BN USD or get a Nobel prize (or both). What you seem to want is a peer-reviewed academic paper but what we're doing here is brainstorming about what is going on in these LLMs.

He's definitely onto something here: LLM models, at the very least, appear to generate reasonable human-like statements about human concepts. ChatGPT et al are useful in the same way a human assistant is useful. Most remarkably, they appear to think like we do. We need to understand how these MOFOs work b/c in a few years they're going to be everywhere.

IIRC an old "Far Side" Gary Larson cartoon depicts two bears just outside their cave, arrows in their limbs and butts, fighting off a hungry bunch of cave men. One bear says to the other "Seems there's more and more of these every year!"

Well, unless we're careful, next time we're going to be the bears!

Re: Simply explained: How does GPT work?

#350

Earlier quoted context omitted.

>But it wasn't designed. It's not a computer program, where one can make confident predictions about its limitations based on the source code. It definitely is exactly that. It's not any more special than any other program that you can write. I am not totally sure that what you describe could ever exist at all. What makes this program "magic" compared to any other program exactly? There is no physical difference betw…

No, machine learning models are not programs and they are not compiled from source code. They are the output of non-deterministic matrix multiplication operations which take encoded data as the input. They can then be used as a black box by an actual program to calculate useful outputs. The program which takes your text and runs a final calculation on it against the machine learning model to get an output is a progra…

If they aren't programs, how do they run on computers?

CPUs and GPUs physically cannot do anything other than execute programs which are encoded into bytecode.

What you are describing is that the language model is "magic" and breaks the laws of physics. I don't believe in magic personally though.

Post reply on HN