Earlier quoted context omitted.
LLMs are not lookup tables. They aren't "matching" in that way. There's this idea of "supercharged interpolation", the idea that they just take out certain texts and switch out words or whatever, that is not true. https://arxiv.org/abs/2110.09485
I was under the impression that LLMs vectorizes text and based on the user input tries to guess the next character based on a comparison of vectors?
Most Models are a two part process.
Training and Inference (when you sample the model after it is trained).
The text during training is tokenizer and embedded which basically just means it is broken down into a little more parts and vectorized.
At the start,the model is acomplete blank state. It has a bunch of neurons/parameters that do nothing.
How does training work ?
The model first gets some preceding text and tries to make a prediction of what might follow. It fails predictably. Now here's the rub. That failures helps. The model makes some changes to its parameters to reflect this failure. Now the model is just a tiny bit better. Rinse and repeat.
The weights/parameters/neurons are not that data re-encoded. They are more like instructions on how to make predictions based on what it has learnt so far.
Is it possible to memorize data ? Yes. Is that going to happen for the vast majority of data it is trained on ? Absolutely not.
Here's the interesting thing. After a certain scale of data, blatant memorization becomes a hindrance. It becomes harder to memorize every new thing it sees than to just learn how to make good predictions. So it doesn't memorize.
What I believe you were alluding to is how "attention" works in transformers.
When you pass some text into a transformer, basically the model makes a comparison of how each token relates to every other token in the text.
For example, let's say you give it the text.
"His child's name is John. He is probably a____"
How is "his" related to "child's" and "name" and "is" etc for each word and each combination. It uses this to aid predictions. How it uses this and the nuances of the comparisons are learnt in training.