Technique Atualizado 2026-04
Tokenizer
Definição
Um tokenizer é o algoritmo que divide o texto em tokens (unidades elementares) antes de ser processado por um LLM.
Veja também no glossário
T
Token
A token is the basic unit processed by an LLM. It's a piece of word, punctuation or character that the model uses to understand and generate text.
L
LLM (Large Language Model)
An LLM is an AI model trained on billions of texts, capable of understanding and generating human language.
E
Embedding
An embedding is a numerical representation (vector) of text or data, capturing its semantic meaning.
C
Context Window
The context window is the maximum amount of text an LLM can process in a single request.
Ferramentas que usam tokenizer
Perguntas frequentes
Por que o tokenizer é importante?
Ele determina quantos tokens um texto consome, e portanto o custo e se o texto cabe na janela de contexto. Um tokenizer ruim desperdiça tokens.
Todos os LLMs usam o mesmo tokenizer?
Não. A OpenAI usa o tiktoken, a Anthropic e o Google têm os seus próprios. Um mesmo texto pode ter 100 tokens no GPT-4 e 120 no Claude.