NEW
Also known as: LM, NLP model
A probabilistic model that assigns probabilities to sequences of tokens and predicts likely continuations of text.
DESCRIPTION
A language model (LM) estimates the probability distribution over token sequences in natural language. Classical n-gram models rely on counts, while modern neural LMs (RNNs, LSTMs, Transformers) learn rich contextual representations. Large language models trained on massive corpora enable generation, summarization, translation, and question answering. LM quality is often measured by perplexity and downstream task performance. Pretraining on general text followed by fine-tuning or instruction-tuning is common. LMs underpin many generative AI applications and require careful governance for bias, safety, and alignment.
ALTERNATIVE DEFINITIONS
Wikipedia
A language model is a probability distribution over sequences of words in a natural language.
Concise probabilistic definition of LMs.
Stanford CS224N
Language models estimate the probability of sequences of words and are used to predict the next word in a sequence.
Connects probability estimation to next-word prediction usage.
Hugging Face
A language model assigns a probability to a sequence of tokens and can generate text by sampling likely continuations.
Highlights generative capability in addition to probability assignment.
RELATED TERMS
N-gram Neural Language Model Transformer Model Tokenization Perplexity Generative AI Embeddings Next-Token Prediction Pretraining Fine-Tuning
COMPETING TERMS
Rule-Based NLP
RELATIONS
- Broader: Model
- Narrower: Causal Language Model Large Language Model Masked Language Model Neural Language Model Unigram Language Model
KNOWLEDGE AREAS
TARGET AUDIENCE
AI Engineer Data Scientist MLOps Engineer AI Product Manager
EXTERNAL SOURCES
- Wikipedia - Language model
- Stanford CS224N - NLP course covering language models
- Hugging Face - Transformers library documentation
- arXiv - Transformer architecture paper
TOP QUESTIONS
How does a Language Model work?
It learns to predict the next token given prior context by optimizing likelihood on large text corpora. Neural LMs capture long-range dependencies and semantics.
Category: Mechanism
What is perplexity in Language Models?
Perplexity measures how well a model predicts a sample; lower values indicate better predictive performance and less uncertainty.
Category: Metrics
Why are Language Models relevant today?
They power generative AI for chat, coding, summarization, and search. Advances in Transformers have unlocked state-of-the-art performance.
Category: Relevancy
What are common risks with Language Models?
Risks include hallucinations, bias, privacy leakage, and misuse. Governance, guardrails, and evaluation are essential.
Category: Risks
What is the difference between a pretrained and fine-tuned Language Model?
Pretrained models learn general language patterns; fine-tuning adapts them to specific tasks or domains for improved performance.
Category: Comparison
How do Language Models represent text?
They map tokens to embeddings and process sequences through architectures like Transformers to build contextual representations.
Category: Representation
What data is required to train a Language Model?
Large, diverse text corpora with tokenization and deduplication. High-quality, domain-relevant data improves downstream utility.
Category: Requirements
How are Language Models evaluated beyond perplexity?
Benchmarks assess reasoning, factuality, and safety; human evaluations and task-specific metrics complement automated tests.
Category: Evaluation
What is a hot topic around Language Models?
Instruction tuning, retrieval-augmented generation, tool use, and alignment techniques are major research and product focuses.
Category: Topic