<mxfile host="app.diagrams.net">
  <diagram name="第 1 页" id="hhq-quJWCt1d2Jpgyxkm">
    <mxGraphModel dx="1672" dy="1768" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-39" edge="1" parent="1" source="ciX8XhrnRAHqsr6kn6pZ-2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" target="ciX8XhrnRAHqsr6kn6pZ-20" value="">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;" value="LLM" vertex="1">
          <mxGeometry height="100" width="520" x="120" y="160" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-3" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_start&amp;gt;&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="120" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-4" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;user&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="180" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-5" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;\n&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="240" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-6" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;什么&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="300" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-38" edge="1" parent="1" source="ciX8XhrnRAHqsr6kn6pZ-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" target="ciX8XhrnRAHqsr6kn6pZ-2" value="">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-7" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;...&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="360" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-8" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_end&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="420" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-9" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_start&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="480" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-10" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;assistant&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="540" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-11" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;,,,&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="600" y="290" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-13" parent="1" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;flipH=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;legacyAnchorPoints=0;direction=north;" value="" vertex="1">
          <mxGeometry height="20" width="480" x="140" y="340" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-14" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="input_ids:训练时输入的文本转换成的token，包含完整的assistant的回答" vertex="1">
          <mxGeometry height="30" width="246" x="266.5" y="361" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-16" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="120" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-17" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="180" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-18" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="240" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-19" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;...&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="300" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-20" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="360" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-21" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="420" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-22" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="480" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-23" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="540" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-24" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="600" y="100" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-25" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;user&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="120" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-26" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;\n&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="180" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-27" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;什么&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="240" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-28" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;...&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="300" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-29" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_end&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="360" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-30" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_start&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="420" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-31" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;assistant&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="480" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-32" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;,,,&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="540" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-33" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_end&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="600" y="-10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-34" parent="1" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;direction=south;" value="" vertex="1">
          <mxGeometry height="20" width="480" x="140" y="-40" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-35" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="labels:通过输入文本构造而得的答案 token，构造方式为input_ids左移一位" vertex="1">
          <mxGeometry height="30" width="210" x="280" y="-71" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-36" edge="1" parent="1" style="edgeStyle=elbowEdgeStyle;elbow=vertical;endArrow=classic;html=1;curved=0;rounded=0;endSize=8;startSize=8;" value="">
          <mxGeometry height="50" relative="1" width="50" as="geometry">
            <mxPoint x="260" y="-10" as="sourcePoint" />
            <mxPoint x="170" y="-100" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-37" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="这个答案表示的意思：在给定这个token前面的上下文时，模型最应该预测这个token" vertex="1">
          <mxGeometry height="30" width="270" x="54" y="-140" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-40" parent="1" style="shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;direction=north;" value="" vertex="1">
          <mxGeometry height="80" width="40" x="54" y="170" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-41" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="模型计算的方向" vertex="1">
          <mxGeometry height="30" width="60" x="-6" y="210" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-42" parent="1" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;direction=south;" value="" vertex="1">
          <mxGeometry height="20" width="480" x="140" y="70" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-43" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="模型对不同的上下文，输出的不同的概率分布" vertex="1">
          <mxGeometry height="30" width="265" x="247.5" y="40" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-44" parent="1" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;" value="" vertex="1">
          <mxGeometry height="120" width="20" x="90" y="10" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-45" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="模型输出的概率分布，逐个token和实际答案之间做计算（交叉熵），继而得出之间的差距有多大，基于该差距，训练过程会不停调整模型参数" vertex="1">
          <mxGeometry height="30" width="220" x="-140" y="60" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-96" edge="1" parent="1" source="ciX8XhrnRAHqsr6kn6pZ-48" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="350" y="830" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-48" parent="1" style="rounded=0;whiteSpace=wrap;html=1;" value="LLM" vertex="1">
          <mxGeometry height="100" width="460" x="120" y="850" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-49" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_start&amp;gt;&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="120" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-50" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;user&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="180" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-51" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 8px;&quot;&gt;\n&lt;/font&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="240" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-52" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;什么&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="300" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-54" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;...&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="360" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-55" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_end&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="420" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-56" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;&amp;lt;im_start&amp;gt;&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="480" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-57" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;assistant&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="540" y="980" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-59" parent="1" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;flipH=1;labelPosition=right;verticalLabelPosition=middle;align=left;verticalAlign=middle;legacyAnchorPoints=0;direction=north;" value="" vertex="1">
          <mxGeometry height="20" width="580" x="140" y="1030" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-60" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="input_ids:用户输入的问题，或者是多轮对话，通过调用和训练时相同的chat template，分词而得。&lt;div&gt;最后没有完整的assistant的回答，只有&amp;lt;im_start&amp;gt;assistant 这两个token结尾，模型经过训练，就知道此时该基于前文回答用户问题&lt;/div&gt;" vertex="1">
          <mxGeometry height="30" width="246" x="227" y="1090" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-61" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="120" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-62" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="180" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-63" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="240" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-64" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="&lt;span style=&quot;font-size: 8px;&quot;&gt;...&lt;/span&gt;" vertex="1">
          <mxGeometry height="40" width="40" x="300" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-65" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="360" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-66" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="420" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-67" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="480" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-94" edge="1" parent="1" source="ciX8XhrnRAHqsr6kn6pZ-68" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" target="ciX8XhrnRAHqsr6kn6pZ-93">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-68" parent="1" style="whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="540" y="790" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-83" parent="1" style="shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;direction=north;" value="" vertex="1">
          <mxGeometry height="80" width="40" x="54" y="860" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-84" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="模型计算的方向" vertex="1">
          <mxGeometry height="30" width="60" x="-6" y="900" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-89" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 30px;&quot;&gt;训练时&lt;/font&gt;" vertex="1">
          <mxGeometry height="60" width="510" x="120" y="-240" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-90" parent="1" style="whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="&lt;font style=&quot;font-size: 30px;&quot;&gt;推理时&lt;/font&gt;" vertex="1">
          <mxGeometry height="60" width="510" x="130" y="455" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-91" parent="1" style="shape=curlyBracket;whiteSpace=wrap;html=1;rounded=1;labelPosition=left;verticalLabelPosition=middle;align=right;verticalAlign=middle;direction=south;" value="" vertex="1">
          <mxGeometry height="20" width="410" x="140" y="760" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-92" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="模型对不同的上下文，输出的不同的概率分布" vertex="1">
          <mxGeometry height="30" width="265" x="208" y="730" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-93" parent="1" style="whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="540" y="670" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-95" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="基于最后一个token的概率分布，采样获取到下一个token" vertex="1">
          <mxGeometry height="30" width="150" x="590" y="675" as="geometry" />
        </mxCell>
        <mxCell id="ciX8XhrnRAHqsr6kn6pZ-97" edge="1" parent="1" style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;rounded=0;entryX=0.392;entryY=1.033;entryDx=0;entryDy=0;entryPerimeter=0;" value="">
          <mxGeometry relative="1" width="100" as="geometry">
            <Array as="points" />
            <mxPoint x="348" y="970" as="sourcePoint" />
            <mxPoint x="348.32000000000016" y="953.3000000000002" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-1" parent="1" style="whiteSpace=wrap;html=1;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="80" y="1310" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-2" parent="1" style="whiteSpace=wrap;html=1;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="120" y="1310" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-4" parent="1" style="whiteSpace=wrap;html=1;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="160" y="1310" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-5" parent="1" style="whiteSpace=wrap;html=1;" value="" vertex="1">
          <mxGeometry height="40" width="40" x="200" y="1310" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-6" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="4bit" vertex="1">
          <mxGeometry height="30" width="60" x="70" y="1260" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-7" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="4bit可以表示16个数字：" vertex="1">
          <mxGeometry height="30" width="155" x="75" y="1390" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-8" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="94" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-9" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="134" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-10" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="174" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-11" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="214" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-12" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="第一个数字:0" vertex="1">
          <mxGeometry height="30" width="86" x="84" y="1420" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-13" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="290" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-14" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="330" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-15" parent="1" style="whiteSpace=wrap;html=1;" value="0" vertex="1">
          <mxGeometry height="40" width="40" x="370" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-16" parent="1" style="whiteSpace=wrap;html=1;" value="1" vertex="1">
          <mxGeometry height="40" width="40" x="410" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-17" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="第二个数字:1" vertex="1">
          <mxGeometry height="30" width="86" x="280" y="1420" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-18" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="。。。" vertex="1">
          <mxGeometry height="30" width="60" x="500" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-19" parent="1" style="whiteSpace=wrap;html=1;" value="1" vertex="1">
          <mxGeometry height="40" width="40" x="570" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-20" parent="1" style="whiteSpace=wrap;html=1;" value="1" vertex="1">
          <mxGeometry height="40" width="40" x="610" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-21" parent="1" style="whiteSpace=wrap;html=1;" value="1" vertex="1">
          <mxGeometry height="40" width="40" x="650" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-22" parent="1" style="whiteSpace=wrap;html=1;" value="1" vertex="1">
          <mxGeometry height="40" width="40" x="690" y="1450" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-23" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="最后一个数字:15" vertex="1">
          <mxGeometry height="30" width="120" x="560" y="1420" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-24" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="[-1,1] 分成的16个数据：-1, -1+2/15,-1+4/15,... 1" vertex="1">
          <mxGeometry height="30" width="300" x="120" y="1570" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-25" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="拿0-15这16个数字，和-1到1这16个数字，做一个映射关系：&lt;div&gt;0：-1&lt;/div&gt;&lt;div&gt;1：-1+2/15&lt;/div&gt;&lt;div&gt;...&lt;/div&gt;&lt;div&gt;15: 1&lt;/div&gt;" vertex="1">
          <mxGeometry height="30" width="330" x="134" y="1660" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-26" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="原始的参数，经过绝对值归一化之后，范围也是在-1到1之间：&lt;div&gt;对每一个归一化之后的参数，找到前面把-1到1等分之后的16个数字里面，和它最接近的。&lt;/div&gt;&lt;div&gt;举个例子，归一化的某个权重的值是0.18，前面的16个数字当中，和0.18最接近的就是0.2&lt;/div&gt;" vertex="1">
          <mxGeometry height="30" width="340" x="140" y="1840" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-27" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="接下来，找到0.2映射到0到15当中的哪个数字：" vertex="1">
          <mxGeometry height="30" width="276" x="161" y="1920" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-28" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="由于-1+9 * 2/15=0.2，所以0.2就映射到了9" vertex="1">
          <mxGeometry height="30" width="130" x="240" y="1950" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-33" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="1、输出层，首先输出一个，词表维度大小的一个向量x：[-1.5, 0.3, 99, 108, -20]" vertex="1">
          <mxGeometry height="30" width="460" x="40" y="2210" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-34" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="2、为了将这些数据，转换成概率分布（让这些数据加起来等于1，而且每个数据的大小，还要大于0,每个数的大小，还要小于1），所以，需要使用softmax公式" vertex="1">
          <mxGeometry height="30" width="770" x="57" y="2270" as="geometry" />
        </mxCell>
        <mxCell id="jQnAtK3IdEO_liS3xRGk-35" parent="1" style="text;html=1;whiteSpace=wrap;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;rounded=0;" value="3、使用softmax之后，得到了每一个索引位置处的值了:[0.19,0.1,0.3,0.4,0.01]" vertex="1">
          <mxGeometry height="30" width="770" x="-120" y="2360" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
