## 2 Definition of Large Language Models
### The Training Process of Large Language Models  
The process of training a large language model is a complex, multi-stage sequence of data-driven, computational, and human-centric activities that ultimately yields an intelligent, responsive system that is aligned with human needs [34]. These stages are outlined sequentially and summarized in Figure 3. The training pipeline begins with the collection of textual data from diverse sources books, academic articles, encyclopedias, news websites, social media, and human conversations selected to form a rich, varied, and representative corpus of natural language [2]. Given the heterogeneity of these data sources, Section 2.3 provides a detailed account of the various datasets employed throughout the training process.  
Figure 3: The training process of large language models.  
However, raw collection alone is insufficient; the data must undergo cleaning and preprocessing. In this phase, duplicate content, incomplete sentences, unwanted languages, and offensive or noncompliant materials are removed. Known as data preprocessing, this step is pivotal to the final model's quality, since noisy inputs directly lead to erroneous learning outcomes. Once the data have been prepared, the model enters the pretraining phase. Here, without requiring labeled data, the model is trained in a self-regressive manner [35]; that is, by observing the input sequence \(X=x_{1},x_{2},\cdots,x_{t-1}\), it learns to predict the next token, modeling the probability according to Equation (1):  
\[P(y|X)=\prod_{t=1}^{T}\left(y|x_{1},x_{2},\cdots,x_{t-1}\right) \tag{1}\]  
Central to this phase is the Transformer architecture, built around the self-attention mechanism. Its capacity to capture long-range dependencies and to process tokens in parallel has underpinned the success of models such as GPT-3 and PaLM. As parameter counts and dataset sizes grow, the model attains greater generalization ability, enabling it to internalize both linguistic patterns and factual knowledge.  
Following pretraining, the model proceeds to fine-tuning. During fine-tuning, the pretrained weights are optimized on task-specific data often composed of human-crafted instructions so that the model can execute targeted functions like summarization, question answering, or translation. A complementary approach in this stage is in-context learning [*3], wherein the model adapts to a new task by simply conditioning on a few exemplars provided in the prompt, without any parameter updates.  
Despite fine-tuning, models may still exhibit deviations from human preferences or ethical norms. To better align the model with human values, reinforcement learning from human feedback (RLHF) is employed [36; 37]. RLHF typically involves three steps:  
1. Collecting human pairwise preference labels (\"better\" vs. \"worse\");
2. Training a reward model to predict these preferences;
3. Optimizing the language model with algorithms such as proximal policy optimization (PPO) to maximize the reward signal.  
This process helps the model generate safer, more acceptable, and ethically sound responses, while also correcting errors incurred during pretraining. Finally, the trained model must undergo rigorous evaluation. This evaluation suite assesses linguistic comprehension, text generation quality, conceptual reasoning, and performance across a range of tasks. If weaknesses are detected in certain areas, the training cycle may be revisited and repeated for those components. This iterative loop of retraining and enhancement continues until the model achieves satisfactory performance, culminating in a versatile and powerful system capable of applications from text generation to user assistance.