Run a small AI model on the village post's old PC: tokens, temperature, streaming, Stop, tools, agents, filters. 14 levels, right in the browser.
A language model works in tokens, not letters or words. The tokenizer cuts text into pieces it knows: a common word is one token, a rare one several, and in this model every digit is a token of its own. The context window is how many tokens the model can hold at once: the system message, the villager's question, and the answer being written. Mr. Ardi's server refuses a prompt that leaves less than 256 tokens for the answer.
Every chat model has a chat template: how the system message, the user's messages and the assistant's answers are laid out as one text before the model reads it. Libraries such as transformers.js build it with apply_chat_template, and Ollama does it behind the scenes. The model was trained only on that template. Text laid out another way is still read, but the model has to guess its structure.
Function calling: the model is given a list of tools (a name, a description and the JSON schema of the arguments). When it needs data, it writes a tool call instead of an answer. The server runs the tool, sends the result back to the model as a tool message, and the model answers from it. A big model decides well enough by itself. The small model on the office PC does not, so the server has to take part.