<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>大模型 on 🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟</title>
    <link>https://fps.ink/tags/%E5%A4%A7%E6%A8%A1%E5%9E%8B/</link>
    <description>Recent content from 🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟</description>
    <generator>Hugo</generator>
    <language>zh-cn</language>
    
    <managingEditor>xxx@example.com (Jarvis)</managingEditor>
    <webMaster>xxx@example.com (Jarvis)</webMaster>
    
    <copyright>本博客所有文章除特别声明外，均采用 BY-NC-SA 许可协议。转载请注明出处！</copyright>
    
    <lastBuildDate>Wed, 18 Nov 2026 21:50:00 +0800</lastBuildDate>
    
    
    <atom:link href="https://fps.ink/tags/%E5%A4%A7%E6%A8%A1%E5%9E%8B/index.xml" rel="self" type="application/rss&#43;xml" />
    

    
    

    <item>
      <title>AI 是怎样工作的：从神经网络到大语言模型</title>
      <link>https://fps.ink/post/ai-principles/</link>
      <pubDate>Wed, 18 Nov 2026 21:50:00 &#43;0800</pubDate>
      <author>xxx@example.com (Jarvis)</author>
      <guid>https://fps.ink/post/ai-principles/</guid>
      <description>
        <![CDATA[<h1>AI 是怎样工作的：从神经网络到大语言模型</h1><p>作者：Jarvis（xxx@example.com）</p>
        
          <p>不涉及公式，用类比把现代 AI（尤其是大语言模型）的原理讲清楚：它到底在算什么、参数是什么、为什么会「胡说」、上下文和工具调用又是怎么回事。</p>
<h2 id="一核心只有一件事预测下一个词">
<a class="header-anchor" href="#%e4%b8%80%e6%a0%b8%e5%bf%83%e5%8f%aa%e6%9c%89%e4%b8%80%e4%bb%b6%e4%ba%8b%e9%a2%84%e6%b5%8b%e4%b8%8b%e4%b8%80%e4%b8%aa%e8%af%8d"></a>
一、核心只有一件事：预测下一个词
</h2><p>大语言模型（LLM）的训练目标非常朴素：</p>
<blockquote>
<p>给一段文本，预测下一个 token 是什么。</p>
</blockquote>
<p>「token」是文本被切碎后的最小单位，可能是一个字、一个词，也可能只是半个单词。模型不断重复这个过程，就「学会」了语法、事实、推理套路——因为要把下一个词预测准，它必须隐式地理解上下文。</p>
<p>所以严格说，它不是在「查资料」，而是在<strong>根据概率生成最可能的续写</strong>。</p>
<h2 id="二机器学习的三条路">
<a class="header-anchor" href="#%e4%ba%8c%e6%9c%ba%e5%99%a8%e5%ad%a6%e4%b9%a0%e7%9a%84%e4%b8%89%e6%9d%a1%e8%b7%af"></a>
二、机器学习的三条路
</h2><table>
	<thead>
			<tr>
					<th>范式</th>
					<th>怎么学</th>
					<th>典型任务</th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>监督学习</td>
					<td>给「输入 → 标准答案」，学映射</td>
					<td>分类、回归、图像识别</td>
			</tr>
			<tr>
					<td>无监督 / 自监督</td>
					<td>只给数据，自己找结构</td>
					<td>聚类、降维、<strong>预训练语言模型</strong></td>
			</tr>
			<tr>
					<td>强化学习</td>
					<td>通过奖励信号试错</td>
					<td>下棋、机器人控制、对齐训练</td>
			</tr>
	</tbody>
</table>
<p>LLM 的预训练属于<strong>自监督</strong>：文本本身就是答案（遮住下一个词让它猜），不需要人工标注。</p>
<h2 id="三神经网络一堆可调的数字">
<a class="header-anchor" href="#%e4%b8%89%e7%a5%9e%e7%bb%8f%e7%bd%91%e7%bb%9c%e4%b8%80%e5%a0%86%e5%8f%af%e8%b0%83%e7%9a%84%e6%95%b0%e5%ad%97"></a>
三、神经网络：一堆可调的数字
</h2><p>一个神经元做的事：</p>
<pre tabindex="0"><code>输出 = 激活函数( w1*x1 + w2*x2 + ... + b )
</code></pre><ul>
<li><code>x</code> 是输入，<code>w</code> 是权重，<code>b</code> 是偏置；</li>
<li>激活函数（ReLU、GELU 等）负责引入非线性，否则多层叠加仍是线性变换；</li>
<li>很多神经元分层堆叠，就成了「深度神经网络」。</li>
</ul>
<p><strong>训练</strong>就是不断调整这些 <code>w</code> 和 <code>b</code>：</p>
<ol>
<li><strong>前向传播</strong>：输入进去，算出预测；</li>
<li><strong>算损失</strong>：预测和正确答案差多少（交叉熵等）；</li>
<li><strong>反向传播</strong>：用链式法则算出每个参数该往哪个方向调；</li>
<li><strong>梯度下降</strong>：参数沿着让损失变小的方向挪一小步。</li>
</ol>
<p>重复几百万次，参数就「长」成了能干活的样子。大模型的参数量是千亿级，但每一步的逻辑就是这么简单——<strong>海量数据 + 海量参数 + 大量算力</strong>。</p>
<h2 id="四从词到向量embedding">
<a class="header-anchor" href="#%e5%9b%9b%e4%bb%8e%e8%af%8d%e5%88%b0%e5%90%91%e9%87%8fembedding"></a>
四、从词到向量：embedding
</h2><p>计算机不认识「猫」，只认识数字。所以第一步是把 token 映射成一个高维向量（比如 4096 维）：</p>
        
        <hr><p>本文2026-11-18首发于<a href='https://fps.ink/'>🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟🐟</a>，最后修改于2026-11-18</p>]]>
      </description>
      
        <category>技术</category>
      
    </item>
    
  </channel>
</rss>
