Topic
Perplexity & Language Model Evaluation Metrics
6 posts on perplexity & language model evaluation metrics — part of glossary on the n4n AI blog.
What is perplexity in language models?
Perplexity measures how well a language model predicts the next token — lower is better. This explainer covers the math, intuition, and practical use cases for engineers evaluating LLMs.
How perplexity is used during LLM pretraining
A practical guide to how perplexity drives LLM pretraining decisions — from loss curves to checkpoint selection, with code and common pitfalls.
How perplexity is calculated, with a worked example
Learn how perplexity is calculated with a complete worked example, from probability distributions to runnable Python code for evaluating language models.
How BLEU, ROUGE, and perplexity differ as metrics
A practical comparison of BLEU, ROUGE, and perplexity for LLM evaluation — when each metric works, where they fail, and how to pick the right one for your task.
Common language model evaluation metrics, explained
A practitioner's guide to the language model evaluation metrics that actually matter — perplexity, accuracy, F1, BLEU, BERTScore, LLM-as-judge, and major benchmark suites — with code snippets and guidance on when to use each.
Benchmarking LLMs: perplexity vs MMLU vs human eval
A practitioner's comparison of perplexity, MMLU, and human evaluation for LLM benchmarking — when each metric works, where they fail, and how to combine them.
More topics in glossary
- Structured Outputs & JSON Mode19
- AI Agents Fundamentals12
- Hallucination in LLMs11
- Sampling Parameters: Top-p, Top-k & Penalties11
- Context Window & Context Length10
- Fine-Tuning Fundamentals9
- Foundation Models: Base vs Instruct vs Chat9
- Model Families & Naming Conventions: GPT-5, Claude, Gemini 3, Llama 4, Mistral, DeepSeek, Qwen, Grok9
- Grounding & Fact-Checking in AI8
- LLM Benchmarks: MMLU, HumanEval, SWE-bench & GPQA8
- Max Tokens, Stop Sequences & Output Truncation8
- Quantization Formats: GGUF, GPTQ, AWQ & INT4/INT88