{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {
      "id": "text-0001",
      "type": "text",
      "x": 80,
      "y": 40,
      "width": 1540,
      "height": 44,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19000,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "KV Cache 量化总览",
      "fontSize": 30,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "KV Cache 量化总览",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "text-0002",
      "type": "text",
      "x": 80,
      "y": 90,
      "width": 1540,
      "height": 32,
      "angle": 0,
      "strokeColor": "#64748b",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19097,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "从内存公式、读写路径、量化轴到工程选型，一张图建立心智模型",
      "fontSize": 17,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "从内存公式、读写路径、量化轴到工程选型，一张图建立心智模型",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "arrow-0003",
      "type": "arrow",
      "x": 90,
      "y": 132,
      "width": 1520,
      "height": 0,
      "angle": 0,
      "strokeColor": "#94a3b8",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "dashed",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19194,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          1520,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": null
    },
    {
      "id": "text-0004",
      "type": "text",
      "x": 90,
      "y": 165,
      "width": 260,
      "height": 40,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19291,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "1  生成链路",
      "fontSize": 22,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "1  生成链路",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0005",
      "type": "rectangle",
      "x": 90,
      "y": 220,
      "width": 245,
      "height": 105,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#bfdbfe",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 19388,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0006",
      "type": "text",
      "x": 102,
      "y": 230,
      "width": 221,
      "height": 85,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19485,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "Prompt tokens\n输入序列",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "Prompt tokens\n输入序列",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "arrow-0007",
      "type": "arrow",
      "x": 335,
      "y": 272,
      "width": 60,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19582,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          60,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "rectangle-0008",
      "type": "rectangle",
      "x": 395,
      "y": 220,
      "width": 245,
      "height": 105,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#99f6e4",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 19679,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0009",
      "type": "text",
      "x": 407,
      "y": 230,
      "width": 221,
      "height": 85,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19776,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "Prefill\n并行算全量 Q K V",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "Prefill\n并行算全量 Q K V",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "arrow-0010",
      "type": "arrow",
      "x": 640,
      "y": 272,
      "width": 60,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 19873,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          60,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "rectangle-0011",
      "type": "rectangle",
      "x": 700,
      "y": 220,
      "width": 245,
      "height": 105,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#bbf7d0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 19970,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0012",
      "type": "text",
      "x": 712,
      "y": 230,
      "width": 221,
      "height": 85,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20067,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "KV Cache\n逐层保存历史 K V",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "KV Cache\n逐层保存历史 K V",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "arrow-0013",
      "type": "arrow",
      "x": 945,
      "y": 272,
      "width": 60,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20164,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          60,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "rectangle-0014",
      "type": "rectangle",
      "x": 1005,
      "y": 220,
      "width": 245,
      "height": 105,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#ddd6fe",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 20261,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0015",
      "type": "text",
      "x": 1017,
      "y": 230,
      "width": 221,
      "height": 85,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20358,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "Decode step\n新 token 查询所有历史 K",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "Decode step\n新 token 查询所有历史 K",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "arrow-0016",
      "type": "arrow",
      "x": 1250,
      "y": 272,
      "width": 60,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20455,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          60,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "rectangle-0017",
      "type": "rectangle",
      "x": 1310,
      "y": 220,
      "width": 245,
      "height": 105,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#fed7aa",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 20552,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0018",
      "type": "text",
      "x": 1322,
      "y": 230,
      "width": 221,
      "height": 85,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20649,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "Output token\n追加到上下文",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "Output token\n追加到上下文",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "text-0019",
      "type": "text",
      "x": 90,
      "y": 385,
      "width": 360,
      "height": 40,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20746,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "2  KV cache 内存公式",
      "fontSize": 22,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "2  KV cache 内存公式",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0020",
      "type": "rectangle",
      "x": 90,
      "y": 435,
      "width": 690,
      "height": 110,
      "angle": 0,
      "strokeColor": "#d97706",
      "backgroundColor": "#fef3c7",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 20843,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0021",
      "type": "text",
      "x": 102,
      "y": 445,
      "width": 666,
      "height": 90,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 20940,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "KV bytes = 2 * layers * batch * tokens * kv_heads * head_dim * bytes_per_elem\n2 表示 K 和 V；GQA/MQA 主要通过减少 kv_heads 降低 cache 体积",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "KV bytes = 2 * layers * batch * tokens * kv_heads * head_dim * bytes_per_elem\n2 表示 K 和 V；GQA/MQA 主要通过减少 kv_heads 降低 cache 体积",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0022",
      "type": "rectangle",
      "x": 830,
      "y": 435,
      "width": 720,
      "height": 110,
      "angle": 0,
      "strokeColor": "#dc2626",
      "backgroundColor": "#fecaca",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 21037,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0023",
      "type": "text",
      "x": 842,
      "y": 445,
      "width": 696,
      "height": 90,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 21134,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "为什么 decode 容易 memory-bound\n每生成 1 个 token，都要读过去所有 token 的 K/V\n长上下文和大 batch 会让 HBM 读流量线性增长",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "为什么 decode 容易 memory-bound\n每生成 1 个 token，都要读过去所有 token 的 K/V\n长上下文和大 batch 会让 HBM 读流量线性增长",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "text-0024",
      "type": "text",
      "x": 90,
      "y": 605,
      "width": 420,
      "height": 40,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 21231,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "3  量化可以插入的位置",
      "fontSize": 22,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "3  量化可以插入的位置",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0025",
      "type": "rectangle",
      "x": 95,
      "y": 665,
      "width": 360,
      "height": 125,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#bfdbfe",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 21328,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0026",
      "type": "text",
      "x": 107,
      "y": 675,
      "width": 336,
      "height": 105,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 21425,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "写入 cache 前\nK/V 从 FP16/BF16 转为低比特\n需要 scale、zero point 或 codebook",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "写入 cache 前\nK/V 从 FP16/BF16 转为低比特\n需要 scale、zero point 或 codebook",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0027",
      "type": "rectangle",
      "x": 500,
      "y": 665,
      "width": 360,
      "height": 125,
      "angle": 0,
      "strokeColor": "#16a34a",
      "backgroundColor": "#bbf7d0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 21522,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0028",
      "type": "text",
      "x": 512,
      "y": 675,
      "width": 336,
      "height": 105,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 21619,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "存储形态\nFP8 / INT8 / INT4 / 2bit\npacked layout 决定真实压缩率",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "存储形态\nFP8 / INT8 / INT4 / 2bit\npacked layout 决定真实压缩率",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0029",
      "type": "rectangle",
      "x": 905,
      "y": 665,
      "width": 360,
      "height": 125,
      "angle": 0,
      "strokeColor": "#7c3aed",
      "backgroundColor": "#ddd6fe",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 21716,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0030",
      "type": "text",
      "x": 917,
      "y": 675,
      "width": 336,
      "height": 105,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 21813,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "读取 cache 时\n反量化到计算域\n或在 FP8/INT8 域内直接 attention",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "读取 cache 时\n反量化到计算域\n或在 FP8/INT8 域内直接 attention",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0031",
      "type": "rectangle",
      "x": 1310,
      "y": 665,
      "width": 285,
      "height": 125,
      "angle": 0,
      "strokeColor": "#ea580c",
      "backgroundColor": "#fed7aa",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 21910,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0032",
      "type": "text",
      "x": 1322,
      "y": 675,
      "width": 261,
      "height": 105,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22007,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "残差窗口\n最近 token 保持高精度\n减少短程依赖损伤",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "残差窗口\n最近 token 保持高精度\n减少短程依赖损伤",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "arrow-0033",
      "type": "arrow",
      "x": 455,
      "y": 727,
      "width": 45,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22104,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          45,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "arrow-0034",
      "type": "arrow",
      "x": 860,
      "y": 727,
      "width": 45,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22201,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          45,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "arrow-0035",
      "type": "arrow",
      "x": 1265,
      "y": 727,
      "width": 45,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22298,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          45,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "text-0036",
      "type": "text",
      "x": 90,
      "y": 855,
      "width": 300,
      "height": 40,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22395,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "4  四个常见误区",
      "fontSize": 22,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "4  四个常见误区",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0037",
      "type": "rectangle",
      "x": 95,
      "y": 915,
      "width": 330,
      "height": 120,
      "angle": 0,
      "strokeColor": "#64748b",
      "backgroundColor": "#e2e8f0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 22492,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0038",
      "type": "text",
      "x": 107,
      "y": 925,
      "width": 306,
      "height": 100,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22589,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "只看 bit 数\n忽略 scale 与 metadata 开销",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "只看 bit 数\n忽略 scale 与 metadata 开销",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0039",
      "type": "rectangle",
      "x": 485,
      "y": 915,
      "width": 330,
      "height": 120,
      "angle": 0,
      "strokeColor": "#64748b",
      "backgroundColor": "#e2e8f0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 22686,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0040",
      "type": "text",
      "x": 497,
      "y": 925,
      "width": 306,
      "height": 100,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22783,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "短上下文启用量化\n可能省显存但拖慢延迟",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "短上下文启用量化\n可能省显存但拖慢延迟",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0041",
      "type": "rectangle",
      "x": 875,
      "y": 915,
      "width": 330,
      "height": 120,
      "angle": 0,
      "strokeColor": "#64748b",
      "backgroundColor": "#e2e8f0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 22880,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0042",
      "type": "text",
      "x": 887,
      "y": 925,
      "width": 306,
      "height": 100,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 22977,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "把权重量化当 KV 量化\nAWQ/GPTQ 不自动压 KV",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "把权重量化当 KV 量化\nAWQ/GPTQ 不自动压 KV",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0043",
      "type": "rectangle",
      "x": 1265,
      "y": 915,
      "width": 330,
      "height": 120,
      "angle": 0,
      "strokeColor": "#64748b",
      "backgroundColor": "#e2e8f0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 23074,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0044",
      "type": "text",
      "x": 1277,
      "y": 925,
      "width": 306,
      "height": 100,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 23171,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "只测困惑度\n长检索与推理任务更能暴露损伤",
      "fontSize": 18,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "只测困惑度\n长检索与推理任务更能暴露损伤",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "rectangle-0045",
      "type": "rectangle",
      "x": 260,
      "y": 1075,
      "width": 1180,
      "height": 75,
      "angle": 0,
      "strokeColor": "#0f766e",
      "backgroundColor": "#99f6e4",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "roundness": {
        "type": 3
      },
      "seed": 23268,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false
    },
    {
      "id": "text-0046",
      "type": "text",
      "x": 272,
      "y": 1085,
      "width": 1156,
      "height": 55,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 23365,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "选型口诀\n先 FP8，再看是否真的被 KV 显存卡住；需要 4bit/3bit 时必须用目标模型、上下文长度、采样参数和业务任务做 A/B。",
      "fontSize": 20,
      "fontFamily": 5,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": null,
      "originalText": "选型口诀\n先 FP8，再看是否真的被 KV 显存卡住；需要 4bit/3bit 时必须用目标模型、上下文长度、采样参数和业务任务做 A/B。",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "practice-interview-panel-00-kvcache-quant-overview-bg",
      "type": "rectangle",
      "x": 80,
      "y": 1230.0,
      "width": 1540.0,
      "height": 300,
      "angle": 0,
      "strokeColor": "#64748b",
      "backgroundColor": "#e2e8f0",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 70,
      "groupIds": [],
      "seed": 93001,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "roundness": {
        "type": 3
      }
    },
    {
      "id": "practice-interview-panel-00-kvcache-quant-overview-title",
      "type": "text",
      "x": 108,
      "y": 1252.0,
      "width": 1484.0,
      "height": 38,
      "angle": 0,
      "strokeColor": "#1e40af",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 91001,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "练习题与面试题补充：KV cache 量化",
      "fontSize": 24,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "练习题与面试题补充：KV cache 量化",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "practice-interview-panel-00-kvcache-quant-overview-practice-box",
      "type": "rectangle",
      "x": 108,
      "y": 1308.0,
      "width": 728.0,
      "height": 190,
      "angle": 0,
      "strokeColor": "#2563eb",
      "backgroundColor": "#bfdbfe",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 93002,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "roundness": {
        "type": 3
      }
    },
    {
      "id": "practice-interview-panel-00-kvcache-quant-overview-practice-text",
      "type": "text",
      "x": 130,
      "y": 1328.0,
      "width": 705.0,
      "height": 150,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 91001,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "练习题\n1. 计算不同 batch/context/kv_heads 下的 KV cache 显存\n2. 对比 FP8、INT4、2bit 在显存、质量、kernel 复杂度上的取舍\n3. 设计一套长上下文 needle 评测协议验证量化退化",
      "fontSize": 17,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "练习题\n1. 计算不同 batch/context/kv_heads 下的 KV cache 显存\n2. 对比 FP8、INT4、2bit 在显存、质量、kernel 复杂度上的取舍\n3. 设计一套长上下文 needle 评测协议验证量化退化",
      "autoResize": false,
      "lineHeight": 1.25
    },
    {
      "id": "practice-interview-panel-00-kvcache-quant-overview-interview-box",
      "type": "rectangle",
      "x": 864.0,
      "y": 1308.0,
      "width": 728.0,
      "height": 190,
      "angle": 0,
      "strokeColor": "#7c3aed",
      "backgroundColor": "#ddd6fe",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 93003,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "roundness": {
        "type": 3
      }
    },
    {
      "id": "practice-interview-panel-00-kvcache-quant-overview-interview-text",
      "type": "text",
      "x": 886.0,
      "y": 1328.0,
      "width": 705.0,
      "height": 150,
      "angle": 0,
      "strokeColor": "#243042",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 1,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "seed": 91001,
      "version": 1,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1,
      "link": null,
      "locked": false,
      "text": "面试题\n1. 为什么 K 和 V 的量化敏感性不同\n2. FP8 为什么常是工程默认首选而不是最低 bit\n3. TurboQuant 的旋转和 inner-product bias 目标解决什么问题",
      "fontSize": 17,
      "fontFamily": 5,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "面试题\n1. 为什么 K 和 V 的量化敏感性不同\n2. FP8 为什么常是工程默认首选而不是最低 bit\n3. TurboQuant 的旋转和 inner-product bias 目标解决什么问题",
      "autoResize": false,
      "lineHeight": 1.25
    }
  ],
  "appState": {
    "gridSize": null,
    "viewBackgroundColor": "#ffffff"
  },
  "files": {}
}