All modern LLMs use a tokenizer to convert a sequence of bytes into a sequence of tokens. Short, common words like "the" and "why" are represented as single tokens, while longer and less-common words are represented by multiple tokens. For example, the word "fantastic" is three tokens ("f", "ant", "astic").
Each of these tokens is assigned an arbitrary integer value ("fantastic" becomes [69, 415, 3477]) and then those integer values are used to lookup embedding vectors for each word.
Each embedding vector represents the MEANING of the tokens, by plotting them into a 4096-dimensional vector-space. At runtime, the model looks up each token ID in a dictionary and finds its embedding vector.
For the word "fantastic", those embedding vectors might look something like this:
"f" (69) = [ 0.123, 0.456, ...etc... 0.789, -0.890 ]
"ant" (415) = [ 0.111, -0.222, ...etc... 0.333, -0.444 ]
"astic" (3477) = [ -0.101, 0.202, ...etc... -0.303, 0.404 ]
All of these vectors are assembled into a matrix, and then passed into the layers of neural network, where the actual training/inference occurs.So the language-model has NO IDEA how any of the words are spelled, because the tokenization (and embedding vector lookup) happens as a pre-processing step, outside the bounds of the learning algorithm.
If you want a LLM to understand spelling, you have to include exhaustive spelling information in its training data. For example:
"The word 'fantastic' is spelled f-a-n-t-a-s-t-i-c."
"The word 'FANTASTIC' is spelled F-A-N-T-A-S-T-I-C."
...etc...
And even then, even with 100k+ English words all spelled out in your training data, you'd be hard-pressed to infer any ROT-13 tokens in your output data, because the learning model has probably never seen a token like "qvq" or "pebff".You can play with the GPT tokenizer directly here:
https://beta.openai.com/tokenizer
It will show you the tokenization of any block of text, and the token IDs of the resultant tokens. It's very handy if you spend much time working with GPT-3 (or any other modern language-model!)