🔠 Natural Language Processing and Large Language Models

A collection of technical primers on natural language processing (NLP) and large language models (LLMs), spanning frontier model architectures, latent reasoning, training and adaptation, retrieval, evaluation, and foundational NLP methods.

The primers explore the mathematical foundations, architectural design choices, training objectives, and practical trade-offs behind modern language models, with an emphasis on research and engineering.
Frontier Architectures and Reasoning
Continuous Autoregressive Language Models
Continuous latent representations; alternatives to discrete token generation
Mixture-of-Experts (MoE)
Expert architectures; sparse computation; model design
Long-Context Language Models
Context length extension; RoPE scaling; LongLoRA
Prompt Engineering and Reasoning
Chain-of-thought; chain-of-prompt; Auto-CoT; retrieval-augmented prompting
LLM Training, Adaptation, and Retrieval
Model Fine-Tuning
Fine-tuning strategies; model adaptation; training considerations
Parameter-Efficient Fine-Tuning (PEFT)
Adapters; LoRA; QLoRA; surgical fine-tuning
Retrieval-Augmented Generation (RAG)
Retrieval-augmented language models; multimodal retrieval; MuRAG
Adapting LLMs to New Tasks
Fine-tuning vs. retrieval-augmented generation vs. prompt engineering
Data Sampling Strategies
Hard sampling; negative sampling
Regularization
L1 and L2 regularization; dropout
Evaluation, Reliability, and Applications
Hallucinations in Language Models
Hallucination mitigation; chain-of-verification; human-in-the-loop methods
NLP Evaluation Metrics
Metrics for evaluating natural language processing models
AI-Generated Text Detection
DetectGPT; GPTZero; watermarking
Generative AI
Foundations of generative artificial intelligence
Conversational AI
Dialogue systems; applications; future directions
Knowledge Graphs and Language Models
Knowledge representation; entity linking; ERNIE; KGLM
Core Language Model Architectures
Transformers
Encoder and decoder architectures; BERT; T5
Attention Mechanisms
Sequence-to-sequence attention; self-attention; multi-head attention
Language Modeling
N-gram models; neural language models; ELMo; GPT-3
Tokenization
Tokenization of natural language for language models
Token and Positional Embeddings
Contextualized embeddings; positional embeddings; Word2Vec; bag-of-words
Hypernetworks
Neural networks that generate parameters for other networks
Foundations and Classical NLP
Extended Long Short-Term Memory (xLSTM)
Extensions to recurrent LSTM architectures
Neural Architecture Building Blocks
Recurrent neural networks; LSTMs; Transformers
Neural Networks for NLP
RNNs; LSTMs; CNNs; dropout and regularization
Word Representations and Lexical Retrieval
TF-IDF; BM25; WordNet; Word2Vec; FastText; GloVe
Machine Translation
Sequence-to-sequence models; neural machine translation
Foundational NLP Tasks
Named entity recognition; dependency parsing
Word Sense Disambiguation
Context-dependent interpretation of ambiguous words
Text Preprocessing
Stopword removal; lemmatization