AI Dictionary › Fondamenti AI

Tokenizer

Tokenizzatore

Definition

The tokenizer is the component that splits text into minimal units called tokens before the model can process them. Think of a cook who, before cooking, cuts ingredients into standard pieces: not a whole carrot, but predictably sized slices. Likewise the tokenizer turns "intelligence" into fragments like "intelli" + "gence", mapping a common word to one token and a rare one to several. Each token becomes a number the model can handle. How the text is cut (by words, sub-words or characters) shapes how much text fits in memory and how much it costs to process.

Understanding tokenization matters because API costs and length limits are measured in tokens, not words. Non-English text, emoji and code can consume far more tokens than expected, making a request costlier or truncating it.

Definizione (italiano)

Il tokenizzatore è il componente che spezza il testo in unità minime chiamate token, prima che il modello possa elaborarle. Immagina un cuoco che, prima di cucinare, taglia gli ingredienti in pezzi standard: non lavora con la carota intera, ma con rondelle di dimensione prevedibile. Allo stesso modo il tokenizzatore trasforma "intelligenza" magari in "intelli" + "genza", oppure una parola comune in un solo token e una rara in molti frammenti. Ogni token viene poi convertito in un numero che il modello sa gestire. La scelta di come tagliare (per parole, sotto-parole o caratteri) influenza quanto testo entra nella memoria del modello e quanto costa elaborarlo.

Capire il tokenizzatore conta perché i costi delle API e i limiti di lunghezza si misurano in token, non in parole. Lingue diverse dall'inglese, emoji e codice possono consumare molti più token del previsto, rendendo una richiesta più cara o troncandola.

Related terms

More in Fondamenti AI

From our network

HSE Genius — AI for Safety Data Sheets

Extract SDS data, H phrases and ECHA compliance checks in seconds, powered by AI.

Visit hsegenius.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.