> What still has not been explained to me is... well, how does the LLM actually become interactive, in the sense that you can then prompt it and it spits back an answer. In other words, how does the LLM actually "know" it's supposed to spit back an answer in the first place?

The model is a function that produces (simplified) a new state and an output from an initial state.

Its called from a program that has a loop that on the first iteratiom feeds it an initial state, then captures/displays/transmits the output, then repeats but using the new state returned, until the output is a designated stop marker or a specified numbeer of iterations or some other stop condition is reached.

IOW, it “knows” to respond because the non-AI part of the computer program is structured that way; its completely unrelated to AI.

Didn't you just described an nth-order Hidden Markov Chain ?

> Doesn’t you just described an nth-order Hidden Markov Chain ?

Yes, and its not exactly strictly accurate (at least on a more useful level than a description which simplifies to a Turing machine would be, which would be technically accurate, too) as to exactly how models work, which is why I said “(simplified)”, but it is, I think, accurate enough for the question asked.

The AI “magic”, such as it is, is in the shape of the function that “decides” what output to produce for a given input, not in deciding to produce output at all.

Thanks,

Is there a toy conversational LLM on Github or elsewhere?

Something like: https://github.com/karpathy/nanoGPT