← 返回资讯屏轩教育 · 行业资讯

How Large Language Models Work: Core Principles of Claude and Other LLMs — 大型语言模型核心原理:Claude 等 LLM 完全指南

2026-08-21 00:12 · 本文部分内容由AI辅助创作

一、什么是大语言模型?从统计语言模型到 Claude 的演进 | What Is an LLM? From Statistical Language Models to Claude

大语言模型(Large Language Model,简称 LLM)是当前人工智能领域最热门的技术之一,Claude、GPT、文心一言、通义千问等产品都属于这一范畴。要理解这些模型,首先要明白一个基本事实:大语言模型本质上是一个”根据前文预测下一个词”的概率系统。它并不真正”理解”文字的含义,而是在海量文本中学习到了词语之间惊人的统计规律,从而能够生成语法正确、逻辑连贯的回复。这个核心思想贯穿了从早期的 n-gram 语言模型到今天的千亿参数 Transformer 模型的全部发展历程。

A large language model (LLM) is one of the hottest technologies in artificial intelligence today. Products such as Claude, GPT, Ernie Bot and Qwen all belong to this category. To understand these models, we must first grasp a fundamental fact: an LLM is essentially a probabilistic system that “predicts the next word based on the preceding context.” It does not truly “understand” the meaning of text; rather, it learns astonishing statistical regularities among words from massive amounts of text, enabling it to generate grammatically correct and logically coherent replies. This core idea runs through the entire evolution from early n-gram language models to today’s Transformer models with hundreds of billions of parameters.

理解大语言模型对计算机科目考试越来越重要。无论是 GCSE、A-Level 计算机科学课程中的”人工智能与机器学习”章节,还是大学计算机专业的自然语言处理课程,LLM 的核心原理都是高频考点。本文将以 Claude 等主流模型为例,从 token 化、词嵌入、Transformer 架构、预训练、RLHF 到采样策略,逐层拆解大语言模型的工作原理,并在最后给出考试答题框架。

Understanding large language models is increasingly important for computer science exams. Whether it is the “Artificial Intelligence and Machine Learning” chapter in GCSE or A-Level Computer Science, or university-level natural language processing courses, the core principles of LLMs are high-frequency exam topics. Using mainstream models such as Claude as examples, this article will break down how LLMs work layer by layer: tokenization, word embeddings, the Transformer architecture, pre-training, RLHF and sampling strategies, and finally provide an answer framework for exam questions.

二、Token 化:模型如何切分文本 | Tokenization: How the Model Splits Text

计算机无法直接处理原始字符,大语言模型的第一步是”分词”,也就是 tokenization。Token 是模型处理文本的最小单位,它可以是单词、单词的一部分,甚至是单个字符。例如,英文单词 “unbelievable” 可能被切分为 “un”、”believ”、”able” 三个 token,而中文则通常按字或词切分。现代模型大多使用 BPE(Byte Pair Encoding,字节对编码)算法自动学习如何切分文本,它从字符级开始,反复合并出现频率最高的相邻字符对,最终形成一套高效的 token 词汇表。

Computers cannot process raw characters directly, so the first step for a large language model is tokenization. A token is the smallest unit of text that the model processes; it can be a whole word, part of a word, or even a single character. For example, the English word “unbelievable” might be split into three tokens: “un”, “believ” and “able”, while Chinese text is usually split by character or by word. Modern models mostly use the BPE (Byte Pair Encoding) algorithm to learn how to split text automatically. Starting from the character level, BPE repeatedly merges the most frequent adjacent character pairs, eventually forming an efficient token vocabulary.

Token 化对模型能力的影响常被忽略,但却是重要考点。第一,token 词汇表大小决定了模型的”词汇视野”,主流模型的词汇表通常在 3 万到 20 万之间。第二,同一段文本的 token 数量影响计算成本和上下文长度,例如一个中文字通常对应 1 到 2 个 token,而一个英文单词平均约 1.3 个 token。第三,分词方式影响模型对稀有词、专有名词和新词的处理能力。考试中常出现”估算一段文本的 token 数”或”解释 BPE 分词流程”这类题目。

The impact of tokenization on model capability is often overlooked, yet it is an important exam point. First, the vocabulary size determines the model’s “lexical horizon”; mainstream models usually have vocabularies between 30,000 and 200,000 tokens. Second, the token count of the same text affects computational cost and context length: one Chinese character typically corresponds to one or two tokens, while an English word averages about 1.3 tokens. Third, the segmentation method affects how well the model handles rare words, proper nouns and new words. Exams often ask students to “estimate the token count of a passage” or “explain the BPE tokenization process.”

三、词嵌入:把词语变成向量 | Word Embeddings: Turning Words into Vectors

切分完 token 之后,模型需要把这些离散的符号转换成计算机能计算的数值形式,这一步称为嵌入(embedding)。词嵌入的核心思想是:把每个 token 映射到一个高维空间中的向量,使得语义相近的词在向量空间中距离相近。经典例子是 “king” 与 “queen” 的向量差约等于 “man” 与 “woman” 的向量差,这体现了语义关系的数学化。早期方法如 Word2Vec 和 GloVe 使用静态嵌入,即每个词只有一个固定的向量;而现代大语言模型使用上下文相关的动态嵌入,同一个词在不同句子中会得到不同的向量表示。

After tokenization, the model must convert these discrete symbols into numerical values that computers can calculate; this step is called embedding. The core idea of word embeddings is to map every token to a vector in a high-dimensional space so that semantically similar words are close together in that space. A classic example is that the vector difference between “king” and “queen” is roughly equal to that between “man” and “woman”, demonstrating the mathematization of semantic relationships. Early methods such as Word2Vec and GloVe used static embeddings, where each word has only one fixed vector; modern LLMs use context-dependent dynamic embeddings, where the same word receives different vector representations in different sentences.

嵌入层在模型中的角色相当于”翻译官”:把 token 的整数编号翻译成携带语义信息的浮点数向量。嵌入维度是重要的超参数,主流模型的嵌入维度通常在 1024 到 8192 之间。维度越高,能表达的信息越丰富,但计算量也越大。考试中常考的题型包括:解释嵌入向量的含义、说明静态嵌入与动态嵌入的区别、以及分析”语义相似度如何通过向量距离度量”。

The embedding layer acts as an “interpreter” in the model: it translates the integer IDs of tokens into floating-point vectors that carry semantic information. The embedding dimension is an important hyperparameter, typically ranging from 1024 to 8192 in mainstream models. Higher dimensions can express richer information but also require more computation. Common exam question types include: explaining the meaning of embedding vectors, describing the difference between static and dynamic embeddings, and analyzing how semantic similarity is measured by vector distance.

四、Transformer 与自注意力机制:LLM 的核心架构 | Transformers and Self-Attention: The Core Architecture of LLMs

2017 年,Google 团队发表了里程碑论文《Attention Is All You Need》,提出了 Transformer 架构,这是所有现代大语言模型的基础。Transformer 的核心创新是自注意力机制(self-attention)。自注意力的思想是:在处理每个词时,模型同时”关注”句子中所有其他词,并根据相关性赋予不同的权重。例如在句子 “The animal didn’t cross the street because it was too tired” 中,”it” 指代的是 “animal” 还是 “street”?自注意力机制通过计算词与词之间的相关性分数,让模型能正确判断 “it” 指代 “animal”。

In 2017, the Google team published the milestone paper “Attention Is All You Need”, introducing the Transformer architecture, which is the foundation of all modern large language models. The core innovation of the Transformer is the self-attention mechanism. The idea of self-attention is: when processing each word, the model simultaneously “attends to” all other words in the sentence and assigns different weights according to relevance. For example, in the sentence “The animal didn’t cross the street because it was too tired”, does “it” refer to “animal” or “street”? The self-attention mechanism computes relevance scores between words, allowing the model to correctly determine that “it” refers to “animal”.

自注意力的计算过程可以拆解为三个步骤。第一步,为每个 token 生成三个向量:查询向量(Query)、键向量(Key)和值向量(Value),它们由输入向量分别乘以三个不同的权重矩阵得到。第二步,用查询向量与所有键向量做点积,得到注意力分数,再经过 softmax 归一化为权重。第三步,用归一化后的权重对所有值向量加权求和,得到该位置的输出向量。这个”查询-键-值”结构借鉴了信息检索中的概念,是理解 Transformer 的关键。

The computation of self-attention can be broken down into three steps. First, for each token the model generates three vectors: a Query vector, a Key vector and a Value vector, obtained by multiplying the input vector by three different weight matrices. Second, the Query vector is dotted with all Key vectors to produce attention scores, which are then normalized by softmax into weights. Third, the normalized weights are used to compute a weighted sum of all Value vectors, producing the output vector for that position. This “Query-Key-Value” structure borrows concepts from information retrieval and is the key to understanding the Transformer.

为了让模型能关注不同类型的语义关系,Transformer 还引入了多头注意力(multi-head attention):将注意力计算并行执行多次,每次使用不同的权重矩阵,就像多个”专家”从不同角度审视句子,最后把各头的结果拼接起来。多头注意力让模型同时捕捉语法关系、指代关系、语义相似度等多种信息。此外,Transformer 还包含前馈网络(feed-forward network)、层归一化(layer normalization)和残差连接(residual connection)等组件,它们共同保证了深层网络的稳定训练。

To allow the model to attend to different types of semantic relationships, the Transformer also introduces multi-head attention: the attention computation is executed several times in parallel, each with different weight matrices, like multiple “experts” examining the sentence from different angles, and the results of all heads are concatenated. Multi-head attention enables the model to capture syntactic relations, coreference, semantic similarity and other information simultaneously. In addition, the Transformer includes components such as the feed-forward network, layer normalization and residual connections, which together ensure stable training of deep networks.

五、位置编码与上下文窗口 | Positional Encoding and the Context Window

自注意力机制本身不区分词的位置:把 “I love you” 和 “you love I” 输入模型,如果不加位置信息,注意力计算的结果是完全相同的。为了让模型感知词语顺序,Transformer 引入了位置编码(positional encoding)。原始 Transformer 使用正弦余弦函数生成位置向量,而现代模型(如 GPT 系列)大多采用可学习的位置嵌入,或者在注意力计算中加入旋转位置编码(RoPE)。位置编码让模型知道每个词在序列中的位置,从而理解语序和句法结构。

The self-attention mechanism itself does not distinguish word positions: feeding “I love you” and “you love I” into the model produces identical attention results if no positional information is added. To let the model perceive word order, the Transformer introduces positional encoding. The original Transformer used sine and cosine functions to generate positional vectors, while modern models (such as the GPT series) mostly use learnable positional embeddings, or add rotary position embeddings (RoPE) into the attention computation. Positional encoding lets the model know the position of each word in the sequence, thereby understanding word order and syntactic structure.

上下文窗口(context window)指模型一次能处理的 token 总数,它由位置编码和注意力计算的可扩展性共同决定。早期的 GPT-3 上下文窗口只有 2048 个 token,而 Claude 3.5 等现代模型已经支持 20 万甚至 100 万 token 的上下文。上下文窗口越大,模型能”记住”的对话历史、文档内容就越多,应用场景也越广,比如一次读完一整本书再回答相关问题。但更大的上下文窗口也带来更高的计算成本和注意力计算的平方级复杂度,这是当前研究的热点。

The context window refers to the total number of tokens the model can process at once, determined jointly by positional encoding and the scalability of attention computation. Early GPT-3 had a context window of only 2048 tokens, while modern models such as Claude 3.5 support contexts of 200,000 or even one million tokens. The larger the context window, the more conversation history and document content the model can “remember”, and the broader the application scenarios, such as reading an entire book before answering questions about it. However, larger context windows also bring higher computational cost and quadratic complexity in attention computation, which is a hot research topic.

六、预训练:下一词预测任务 | Pre-training: The Next-Token Prediction Task

架构搭建好之后,模型需要通过”预训练”(pre-training)来学习语言知识。预训练的核心任务极其简单:给定前文,预测下一个词是什么。模型从互联网、书籍、论文等来源收集的海量文本中学习,反复执行这个任务,不断调整内部的数万亿个参数,使得预测越来越准确。令人惊讶的是,这个看似简单的任务最终让模型涌现出语法能力、推理能力、知识记忆甚至一定程度的编程能力。这种”简单任务、海量数据、大模型”的组合所产生的能力飞跃,被称为”涌现”(emergence)。

After the architecture is built, the model must learn language knowledge through “pre-training”. The core task of pre-training is extremely simple: given the preceding text, predict what the next word is. The model learns from massive amounts of text collected from the internet, books and papers, repeatedly performing this task and continuously adjusting its trillions of internal parameters so that predictions become more and more accurate. Surprisingly, this seemingly simple task ultimately gives rise to grammar ability, reasoning ability, knowledge memorization and even a degree of programming ability. The leap in capability produced by this combination of “simple task, massive data, large model” is called “emergence”.

预训练过程中有几个关键概念需要掌握。第一是损失函数(loss function),通常使用交叉熵损失来衡量预测分布与真实答案的差距,训练目标就是最小化损失。第二是优化算法,最常用的是 Adam 及其变体,配合学习率调度(learning rate schedule)来控制参数更新的步伐。第三是批处理与梯度下降:由于数据量巨大,训练采用小批量随机梯度下降,在 GPU/TPU 集群上进行,一次完整的预训练往往需要数周时间和数百万美元的成本。考试中常要求解释”为什么下一词预测能教会模型理解语言”这类思辨题。

Several key concepts in pre-training must be mastered. First, the loss function, usually cross-entropy loss, measures the gap between the predicted distribution and the true answer; the training objective is to minimize the loss. Second, the optimization algorithm, most commonly Adam and its variants, combined with a learning rate schedule to control the pace of parameter updates. Third, batching and gradient descent: because the data volume is enormous, training uses mini-batch stochastic gradient descent on GPU/TPU clusters; a complete pre-training run often takes weeks and costs millions of dollars. Exams often ask reasoning questions such as “explain why the next-token prediction task can teach a model to understand language.”

广告 / Sponsored

七、规模定律:为什么参数越多越聪明 | Scaling Laws: Why Bigger Models Are Smarter

2020 年,OpenAI 发表了著名的《Scaling Laws for Neural Language Models》论文,揭示了大语言模型性能与规模之间的幂律关系:模型性能(以损失函数衡量)随参数数量、数据量和计算量的增加而稳定提升,且这种提升在很大范围内没有上限。这就是为什么 AI 公司竞相训练越来越大的模型:参数量从 GPT-2 的 15 亿,到 GPT-3 的 1750 亿,再到 GPT-4 和 Claude 3 系列传闻中的数万亿参数。规模越大,模型在语言理解、推理和知识掌握上的表现越强。

In 2020, OpenAI published the famous paper “Scaling Laws for Neural Language Models”, revealing a power-law relationship between LLM performance and scale: model performance (measured by loss) improves steadily with increases in parameters, data and compute, with no upper limit within a wide range. This is why AI companies race to train ever larger models: parameter counts grew from 1.5 billion in GPT-2, to 175 billion in GPT-3, and to reportedly trillions of parameters in GPT-4 and the Claude 3 series. The larger the scale, the stronger the model becomes at language understanding, reasoning and knowledge mastery.

规模定律同时揭示了”数据与参数要平衡”的道理:仅增加参数而不增加数据,模型会因数据不足而过拟合;仅增加数据而不增加参数,模型的能力又会达到瓶颈。经验法则表明,参数量与训练数据量应按大约 1:20 的比例增长,例如 700 亿参数的模型需要约 1.4 万亿 token 的训练数据。考试中常考”解释规模定律的含义””说明为什么大模型需要海量数据”等题目,答题时抓住”幂律关系””数据-参数平衡””涌现能力”三个要点即可。

Scaling laws also reveal that “data and parameters must be balanced”: increasing only parameters without adding data causes overfitting, while increasing only data without adding parameters hits a capability bottleneck. A rule of thumb is that parameters and training data should grow in a ratio of roughly 1:20; for example, a 70-billion-parameter model needs about 1.4 trillion training tokens. Exams often ask students to “explain the meaning of scaling laws” or “explain why large models need massive data”. When answering, capture the three key points: power-law relationship, data-parameter balance, and emergent abilities.

八、监督微调与 RLHF:让模型学会对话 | Supervised Fine-Tuning and RLHF: Teaching the Model to Chat

预训练完成的模型(称为基础模型,base model)只会”续写文本”,并不擅长遵循指令或进行对话。要把它变成像 Claude 这样好用的助手,还需要两个关键步骤。第一步是监督微调(Supervised Fine-Tuning,SFT):用人类撰写的”指令-回答”对数据继续训练模型,让模型学会按照指令格式作答。例如给出”用一句话解释光合作用”这样的指令,人工写好标准答案,让模型模仿学习。经过这一步,模型初步具备了对话能力。

A pre-trained model (called a base model) can only “continue writing text”; it is not good at following instructions or holding conversations. To turn it into a useful assistant like Claude, two key steps are needed. The first is Supervised Fine-Tuning (SFT): the model is further trained on human-written “instruction-response” pairs, learning to answer in the instruction-following format. For example, given the instruction “explain photosynthesis in one sentence”, humans write the standard answer and the model learns by imitation. After this step, the model initially gains conversational ability.

第二步是 RLHF(Reinforcement Learning from Human Feedback,基于人类反馈的强化学习),这是让模型变得”有用、诚实、无害”的关键。RLHF 的流程是:先让人工标注员对模型的多个回答进行偏好排序,用这些偏好数据训练一个”奖励模型”(reward model)来预测哪个回答更好;然后用强化学习算法(如 PPO)优化主模型,使它的回答在奖励模型上得分越来越高。训练过程中还要加入 KL 散度约束,防止模型为了讨好奖励模型而偏离正常语言。Claude 在发布前的”宪法式 AI”对齐(constitutional AI)也是 RLHF 的一种扩展,用 AI 反馈代替部分人工反馈。

The second step is RLHF (Reinforcement Learning from Human Feedback), which is key to making the model “helpful, honest and harmless”. The RLHF process is: first, human annotators rank multiple responses from the model by preference; these preference data train a “reward model” that predicts which response is better; then a reinforcement learning algorithm (such as PPO) optimizes the main model so that its responses score higher and higher on the reward model. A KL-divergence constraint is added during training to prevent the model from drifting away from normal language just to please the reward model. Claude’s “constitutional AI” alignment before release is also an extension of RLHF, replacing part of the human feedback with AI feedback.

九、温度、Top-p 与采样策略:控制模型的”创造力” | Temperature, Top-p and Sampling: Controlling the Model’s Creativity

模型生成回复时并不是机械地选择概率最高的词,而是通过”采样”(sampling)从概率分布中抽取下一个词,这让输出具有多样性和随机性。采样过程受几个关键参数控制。温度(temperature)是最常用的参数:温度越低,模型越倾向于选择高概率的词,输出越确定、越保守;温度越高,低概率的词也有机会被选中,输出越多样、越有创造力。温度等于 0 时模型退化为贪心解码,每次都选概率最高的词。

When generating a reply, the model does not mechanically choose the word with the highest probability; instead, it samples the next word from the probability distribution, which gives the output diversity and randomness. The sampling process is controlled by several key parameters. Temperature is the most common: the lower the temperature, the more the model tends to choose high-probability words, making the output more deterministic and conservative; the higher the temperature, the more chance low-probability words get selected, making the output more diverse and creative. When temperature equals 0, the model degenerates into greedy decoding, always picking the most probable word.

另一个重要参数是 Top-p(核采样,nucleus sampling):模型只从累积概率达到 p 的最小词集合中采样。例如 p=0.9 表示只考虑累积概率占 90% 的那部分词,过滤掉长尾的极低概率词,在保持多样性的同时避免输出胡言乱语。实践中,聊天场景常用温度 0.7 左右、Top-p 0.9 左右;而数学计算、代码生成等需要精确性的任务,则把温度调低到 0.1 甚至 0。考试常考”解释温度参数的作用””比较贪心解码与采样解码”等题目。

ability reaches p. For example, p=0.9 means only considering the words that account for 90% . In practice, chat scenarios often use a temperature around 0.7 and Top-p around 0.9; while tasks requiring precision such as mathematical calculation and code generation lower the temperature to 0.1 or even 0. Exams often ask students to “explain the role of the temperature parameter” or “compare greedy decoding with sampling decoding”.

十、幻觉与局限性:模型为什么会犯错 | Hallucination and Limitations: Why Models Make Mistakes

尽管大语言模型能力强大,它仍然存在明显的局限性,其中”幻觉”(hallucination)是最受关注的问题。幻觉指模型生成看似合理但实际上错误或虚构的内容,比如编造不存在的论文、错误的日期或虚假的引用。幻觉的根源在于:模型的目标是”预测下一个最可能的词”,而不是”检索事实”。它没有内置的事实数据库,所有知识都以参数形式模糊存储,因此当模型不确定时,它倾向于”编造一个听起来合理的答案”而不是承认不知道。

Although large language models are powerful, they still have obvious limitations, and “hallucination” is the most discussed problem. Hallucination refers to the model generating content that seems reasonable but is actually wrong or fabricated, such as inventing non-existent papers, wrong dates or fake citations. The root cause is that the model’s objective is “predict the most likely next word”, not “retrieve facts”. It has no built-in fact database; all knowledge is stored vaguely in the form of parameters, so when the model is uncertain, it tends to “fabricate a plausible-sounding answer” rather than admit it does not know.

其他常见局限性包括:第一,知识截止问题,模型只知道训练数据截止日期之前的信息,对时事可能过时;第二,推理能力不稳定,大模型在简单算术或逻辑推理上仍可能犯错,尤其是需要多步精确计算的题目;第三,上下文长度限制,超出上下文窗口的内容会被截断或遗忘;第四,偏见问题,训练数据中的社会偏见可能被模型放大。针对这些问题,业界发展出检索增强生成(RAG)、联网搜索、工具调用等解决方案。考试中常考”列举大模型的三个局限性并提出改进方法”这类开放题。

Other common limitations include: first, the knowledge cutoff problem, where the model only knows information before its training data cutoff date and may be outdated on current events; second, unstable reasoning, as large models can still make mistakes in simple arithmetic or logical reasoning, especially multi-step precise calculations; third, context length limits, where content beyond the context window is truncated or forgotten; fourth, bias issues, where social biases in training data may be amplified by the model. To address these problems, the industry has developed solutions such as Retrieval-Augmented Generation (RAG), web search, and tool calling. Exams often ask open questions such as “list three limitations of large models and propose improvements”.

十一、考点总结:常见题型与答题框架 | Exam Topics: Common Question Types and Answer Frameworks

在 GCSE 和 A-Level 计算机科学考试中,大语言模型相关题目通常围绕五个方向:一是概念辨析题,要求解释 token、嵌入、注意力等术语;二是架构分析题,要求描述 Transformer 的组成部分及其作用;三是训练流程题,要求说明预训练、SFT、RLHF 的步骤与目的;四是参数作用题,要求分析温度、Top-p 对输出的影响;五是局限与伦理题,要求讨论幻觉、偏见、隐私等问题及应对措施。

In GCSE and A-Level Computer Science exams, questions about large language models usually focus on five directions: first, concept discrimination questions requiring explanations of terms such as token, embedding and attention; second, architecture analysis questions requiring descriptions of the components of the Transformer and their roles; third, training process questions requiring explanations of the steps and purposes of pre-training, SFT and RLHF; fourth, parameter effect questions requiring analysis of how temperature and Top-p affect output; fifth, limitation and ethics questions requiring discussion of hallucination, bias, privacy and countermeasures.

答题时推荐使用”三步框架”:第一步,给出准确定义,例如”自注意力是一种让模型在处理每个词时同时关注句中所有其他词并分配权重的机制”;第二步,说明原理或流程,按步骤展开,例如 BPE 分词的合并过程、RLHF 的三阶段流程;第三步,结合实际举例或说明意义,例如”温度调低适合代码生成,因为需要确定性”。这样的答案结构完整、要点清晰,容易获得高分。掌握本文的十一节内容,就基本覆盖了大语言模型考点的核心范围。

When answering, a “three-step framework” is recommended: first, give a precise definition, for example “self-attention is a mechanism that lets the model attend to all other words in the sentence and assign weights when processing each word”; second, explain the principle or process step by step, such as the merging process of BPE tokenization or the three-stage RLHF pipeline; third, give a practical example or explain the significance, for example “a low temperature suits code generation because determinism is required”. Such an answer is well-structured with clear key points and earns high marks. Mastering the eleven sections of this article covers the core scope of LLM exam topics.

Summary | 总结

本文系统讲解了大语言模型的核心原理。我们从 token 化和词嵌入出发,理解模型如何把文本转化为向量;接着剖析了 Transformer 架构,重点掌握自注意力机制、多头注意力和位置编码;然后沿着训练流水线,学习了预训练的下一词预测任务、规模定律、监督微调与 RLHF 对齐;最后探讨了温度与 Top-p 采样参数,以及幻觉等局限性和对应的考试答题框架。

This article systematically explains the core principles of large language models. Starting from tokenization and word embeddings, we understood how models convert text into vectors; then we analyzed the Transformer architecture, focusing on self-attention, multi-head attention and positional encoding; next, following the training pipeline, we learned about the next-token prediction task of pre-training, scaling laws, supervised fine-tuning and RLHF alignment; finally, we discussed the temperature and Top-p sampling parameters, as well as limitations such as hallucination and the corresponding exam answer framework.

大语言模型正处于飞速发展之中,但无论模型如何迭代,其底层原理都建立在这套稳定的知识体系之上:概率建模、向量表示、注意力机制与规模化训练。理解这些原理,不仅是为了应对考试,更是为了在人工智能时代建立正确的技术认知。希望本文能帮助你在考试中取得好成绩,也期待你继续探索人工智能的广阔世界。

Large language models are evolving rapidly, but no matter how models iterate, their underlying principles rest on this stable body of knowledge: probabilistic modeling, vector representations, attention mechanisms and scaled-up training. Understanding these principles is not only for passing exams, but also for building correct technical cognition in the age of artificial intelligence. We hope this article helps you achieve good exam results, and we look forward to you continuing to explore the vast world of artificial intelligence.

更多咨询请联系16621398022(同微信)

广告 / Sponsored
[保证正版]2025音基教材中央音乐学院音基初级教材全套儿童音乐理论基础知识教程乐理常识视唱练耳分册全国等级考试考级书籍
音乐 备考教辅 · 正版现货 · 学习备考通用
查看详情 / View on Taobao参考价 ¥193.4
广告 / Sponsored
高中地理教育与地理教材国际比较/浙江省普通本科高校“十四五”重点立项建设教材/马仁锋李伟芳骆海军吴芳周颖刘慧吕小璇邓青
地理 备考教辅 · 正版现货 · 学习备考通用
查看详情 / View on Taobao参考价 ¥55.6

更多咨询请联系16621398022(同微信)

备考资讯每日更新,关注不错过
考纲变化 · 科目分析 · 学习方法
扫码关注公众号 tutorhao
在微信里长按二维码识别关注
或截图后用「扫一扫 → 相册」选择本图
公众号:tutorhao