Pretraining and Foundation Models
Broad capability starts with a training objective
Pretraining fits a model on a broad dataset before adapting it to a particular application. For a causal language model, the common objective is to predict each next token from earlier tokens. Other models reconstruct masked content or learn relationships between text, images, and other modalities.
Repeated exposure lets the parameters encode statistical regularities. It does not turn the weights into a clean, queryable database. Facts may be incomplete, contradictory, outdated, or memorized incorrectly. A model cannot reliably supply a provenance record for every learned association.
Data preparation changes the model
Training pipelines collect data, filter invalid or unwanted material, deduplicate, tokenize, and form training sequences. Mixing code, prose, languages, and domain-specific text affects what the model practices. Repeating low-quality examples can amplify their problems.
Data quantity is not the only consideration. Licensing, consent, sensitive information, representation, contamination, and provenance matter. A benchmark that appears in training data may overstate generalization when used later as an evaluation.
flowchart LR A[Permitted source data] --> B[Filter and deduplicate] B --> C[Tokenize and batch] C --> D[Optimize prediction objective] D --> E[Base checkpoint] E --> F[Evaluate and adapt]
Pretraining cost and scaling
Large-scale training often distributes work across devices. Data parallelism processes different examples with replicated weights. Model or tensor parallelism splits model computation. Pipeline parallelism splits layers into stages. These approaches introduce communication and scheduling overhead.
A checkpoint records weights and sometimes training state. Restarting training faithfully may require optimizer state, scheduler state, random-state information, and data position, not just weights.
Base versus instruction models
A base model trained on continuation can plausibly continue “Question: …” rather than comply like an assistant. Instruction tuning changes behavior toward following requests. Model cards should explain training intent, supported uses, limitations, and licensing; inspect them before selecting a deployment artifact.
Checkpoint with answers
Does pretraining guarantee fresh facts? No. Knowledge reflects the available training material and learned patterns; current facts need an appropriate source.
Why is benchmark contamination harmful? A score may reflect exposure to evaluation answers instead of solving genuinely unseen problems.
Exercise: You only need current refund policies. Should you pretrain a model from scratch? Answer: generally no. Start with retrieval from authorized current policies and an existing model, then evaluate whether adaptation is necessary.
Further reading
Hugging Face model cards explain documentation attached to model releases.