Lesson 01 — the cost surface of LLMs. A practical first look at what every other lesson on this site will assume you’ve felt for yourself. ## The mistake nobody catches You’re sitting across from the head of a Maltese SME. They want to deploy an AI chat agent for their customer support. They ask the question every client eventually asks: *“What will this cost us per month?”* The natural instinct is to estimate from words. A typical support message is around 50 words. Multiply by the number of monthly conversations, multiply by the price per million words you read on the model provider’s page, and you have a number. That number is wrong. Possibly by a factor of two. > **The rule:** Never estimate LLM cost from word count. Always measure with the model’s tokeniser — especially for Maltese, which behaves badly on tokenisers trained primarily on English. ## What a tokeniser actually does Language models don’t read words. They read **tokens** — integer IDs from a vocabulary the model was trained on. A tokeniser is the deterministic function that converts a string into the longest pieces of itself that the vocabulary recognises. Three things flow from that single mechanic: - **Cost** scales with tokens, not words. Every provider prices “per million tokens”. - **Latency** scales with tokens. Each token is one forward pass through the network. - **Quality** can drop when the tokeniser splits a language into nonsense fragments — the model has to work harder to reassemble meaning. ## Try it yourself Below is a live tokeniser. Type or paste any text, or click one of the examples. Watch what happens to the token count as you switch between English, Arabic, and Maltese — three languages that the same model treats very differently. Tokenizer GPT-4 / GPT-3.5 (tiktoken cl100k) Llama 3 / 3.1 Try an example English Arabic Maltese Mixed Maltese-English Maltese with Arabic loanwords Maltese legal text Your text Characters 87 Tokens 0 Chars / token vs. English Loading tokenizer… ### Cost at 1 million queries / month Assuming this text is the average prompt + 50 tokens of response. Prices are list rates and change frequently. GPT-4o Llama 3.1 70B ## What you just saw The English example above runs at roughly 6 characters per token. That’s the figure most teams build their cost models around. The Maltese example, encoding the same sentence translated, lands at around 2 characters per token — close to three times worse than English. The Arabic version — same meaning again — typically lands worse still, with individual letters often becoming their own tokens. The model is paying two to three times as much attention — literally — to encode the same idea. Look at the visualised tokens for the Maltese examples. You’ll see common morphemes — `ġ`, `ħ`, prefixes like `il-` and `ta'` — chopped into single-character or two-character fragments. That’s the tokeniser failing to find efficient mappings for a language it has only sparse training data on. Switch to the Llama 3 tokeniser and the numbers shift again. Different model families allocate vocabulary budget to different languages. There is no universal answer to “what’s the token cost of Maltese?” — only “what’s the token cost of *this Maltese* against *this tokeniser*?” ## Three architect-grade arguments You can leave this lesson with three things that most heads of tech do not know: 1. **Maltese-language deployments cost roughly twice as much per query as English-language ones** on the major hosted models. The exact multiplier depends on the tokeniser and the kind of Maltese (everyday, legal, technical). 2. **The number you quote should come from measurement, not from estimation.** Five minutes with a tokeniser on real customer data beats half an hour of pricing-page arithmetic. 3. **Tokeniser quality is part of model selection, not just a footnote.** A model with twice the parameters but a worse tokeniser for your language may be slower *and* more expensive than a smaller model with a better one. --- *Cost figures use list prices for GPT-4o and Llama 3.1 70B (Together AI) at the time of writing. They will change; the ratios are the durable part. Tokenisation runs entirely in your browser — your text is never sent to a server.*