Zubnet AIAprenderWiki › BERT
Models

BERT

Bidirectional Encoder Representations from Transformers
Um modelo baseado em Transformer do Google (2018) que revolucionou o NLP ao introduzir pré-treinamento bidirecional — cada token pode atender a cada outro token, dando ao modelo compreensão contextual profunda. BERT é um modelo encoder-only: se destaca em entender texto (classificação, busca, NER) mas não consegue gerar texto como GPT ou Claude.

Por que importa

BERT é o paper NLP mais influente da era moderna. Provou que pré-treinar em texto não rotulado e depois fazer fine-tuning em tarefas específicas podia esmagar cada benchmark existente. Mesmo que LLMs tenham roubado os holofotes, modelos estilo BERT ainda movem a maioria de motores de busca, sistemas de embedding e pipelines de classificação em produção porque são menores, mais rápidos e mais baratos que LLMs para tarefas não-generativas.

Deep Dive

BERT's training uses two objectives: Masked Language Modeling (MLM) — randomly mask 15% of tokens and predict them from context — and Next Sentence Prediction (NSP) — predict whether two sentences are consecutive. MLM forces bidirectional understanding because the model must use both left and right context to predict masked words. This is fundamentally different from GPT's left-to-right approach.

Why BERT Still Matters

In the LLM era, BERT-family models (RoBERTa, DeBERTa, DistilBERT) remain the backbone of production NLP. They're 100x smaller than LLMs (110M–340M parameters vs. billions), 10x faster for inference, and often better for tasks that don't require generation. Most embedding models used in RAG and semantic search are BERT descendants. Google Search used BERT extensively before transitioning to larger models.

BERT vs. GPT: The Architecture Split

BERT (encoder-only, bidirectional) and GPT (decoder-only, left-to-right) represent two philosophies. BERT sees the whole input at once — perfect for understanding. GPT sees only what came before — perfect for generating. The field initially thought encoder-decoder (T5) would win by combining both. Instead, decoder-only (GPT approach) won for LLMs because it scales more cleanly, and you can approximate bidirectional understanding through clever prompting.

Conceitos relacionados

← Todos os termos
← Benchmark Bias →