CLOUD CONCEPT

Pre-Training

Pre-training is the initial large-scale training stage in which a model learns broadly reusable patterns from data before task-specific adaptation.

Cloud Concepts Hub →

What is Pre-Training

For foundation models, pre-training establishes general capabilities such as language prediction, visual representation, or relationships across modalities. It matters because the training data, learning objective, and compute budget strongly influence what downstream applications can achieve, even after fine-tuning.

Pre-training builds a model's foundational capabilities by repeatedly processing training examples and adjusting model parameters to reduce a learning objective. Foundation models typically learn from large datasets containing text, images, audio, code, or combinations of these modalities. Many use self-supervised learning, where training targets are derived from the data rather than manually assigned to every example. For example, a language model can learn by predicting the next token in a sequence, while a masked-language model learns to reconstruct hidden tokens.

The foundation model lifecycle begins with defining requirements, selecting data, and choosing a model architecture or an existing model. When training from scratch, engineers initialize model parameters and run pre-training over the selected dataset. Data preparation includes checking usage rights, removing sensitive information where required, filtering low-quality material, deduplicating examples, and creating evaluation datasets that are isolated from training data. Dataset composition affects language coverage, domain knowledge, bias, and exposure to harmful content.

In the cloud, pre-training commonly uses accelerated compute, distributed training software, object storage, and checkpointing. Large models may require multiple accelerators working together because parameters, optimizer state, and intermediate activations exceed one device's memory. Engineers monitor training loss, held-out performance, hardware utilization, and numerical stability. Checkpoints save model and training state so interrupted jobs can resume instead of restarting, which is important when compute is expensive or capacity is interrupted.

Organizations do not need to pre-train a foundation model for every application. They can obtain an existing model through a managed model service or use an open-source or open-weight pre-trained model, subject to its license and access conditions. Open weights do not automatically imply that training data or training code is available. Training a custom model from scratch provides control over architecture, data, and optimization, but usually requires substantially more compute, data engineering, and specialist expertise than adapting an existing model.

Pre-training differs from fine-tuning, continued pre-training, and distillation. Fine-tuning starts from existing model weights and adapts them for a task, domain, or behavior, often using a smaller curated dataset. Continued pre-training, also called continuous pre-training in some exam materials, resumes a pre-training-style objective on additional data to expand or refresh capabilities. Distillation trains a student model using a teacher model's outputs or other signals, often to reduce deployment cost or latency. These techniques can be combined rather than treated as mutually exclusive choices.

For example, a manufacturer building an assistant for maintenance engineers might first evaluate an existing language model. If the model struggles with specialized terminology, continued pre-training on authorized technical documents could improve domain familiarity, followed by fine-tuning on approved question-and-answer examples. If the main requirement is answering from frequently changing manuals with citations, retrieval-augmented generation may be more appropriate than updating weights. Retrieval supplies information at inference time; it does not itself pre-train the model.

Pre-training is not equivalent to storing a perfectly searchable database, although models can memorize training examples and expose privacy risks. More training data or longer training does not guarantee better results if quality, coverage, or optimization is poor. Evaluation should examine downstream usefulness, factual reliability, safety, and potential data leakage rather than relying only on training loss. After adaptation and evaluation, deployment monitoring and user feedback inform later dataset revisions, retrieval improvements, or additional training; ordinary feedback collection does not automatically update model weights.

Key aspects of Pre-Training

Effective pre-training combines suitable data, scalable optimization, careful evaluation, and a deliberate decision about whether to train from scratch or reuse an existing model.

Broad capability learning

Pre-training learns reusable representations and patterns rather than optimizing only for one narrowly defined application. For language models, next-token prediction is a common objective, but objectives differ across model types.

Data quality and governance

Training data must be selected for relevance, coverage, permitted use, and privacy requirements. Deduplication and separation of training and evaluation data help reduce memorization risks and misleading evaluation results.

Compute-intensive optimization

Large-scale pre-training can require distributed accelerator clusters, substantial storage throughput, and careful memory management. Checkpointing, utilization monitoring, and resumable jobs help control operational risk and wasted compute.

Reuse versus training from scratch

An existing pre-trained model usually reduces the time and cost required to build an application. Training from scratch is justified when requirements demand control that available models cannot provide and sufficient data, expertise, and budget exist.

Distinct adaptation techniques

Continued pre-training extends an existing model using a pre-training-style objective, while fine-tuning targets more specific capabilities or behavior. Distillation transfers signals from a teacher to a student and can support a smaller deployment model.

Lifecycle evaluation

Evaluate held-out performance and downstream quality before deployment, including safety, bias, and privacy concerns. Production feedback should drive deliberate improvements rather than being assumed to retrain the model automatically.

Cloud services for Pre-Training

Amazon S3 can hold governed training datasets and checkpoints, while Amazon SageMaker AI provides managed training jobs that consume those datasets and produce model artifacts. Teams needing lower-level infrastructure control can run compatible distributed training software directly on Amazon EC2 instead. Amazon Bedrock offers another starting point: use an existing pre-trained foundation model rather than funding initial training, and consider supported customization options only when evaluation identifies a need. Across these approaches, engineers remain responsible for dataset rights, evaluation design, security controls, and cost management.

Amazon Simple Storage Service image Amazon S3

Stores training corpora, processed datasets, model artifacts, and checkpoints. Access controls, encryption, and versioning support governance and reproducibility, but data quality and usage rights remain engineering responsibilities.

Open Amazon S3 →
Amazon EC2 image Amazon EC2

Provides GPU- and AWS Trainium-based compute options for running compatible pre-training workloads. Self-managed training on EC2 offers infrastructure control but requires engineers to manage orchestration, software environments, failures, and capacity.

Open Amazon EC2 →
Amazon Bedrock

Provides access to existing pre-trained foundation models, allowing applications to use their capabilities without running initial pre-training. Continued pre-training is available for supported models; this is distinct from offering arbitrary foundation model training from scratch.

Open Amazon Bedrock →