{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {
      "id": "el1",
      "x": 150,
      "y": 8,
      "width": 699.6,
      "height": 27.5,
      "angle": 0,
      "strokeColor": "#1f2933",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1001,
      "version": 1,
      "versionNonce": 5001,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "Context Parallel (CP) / Ring Attention：按序列切 attention",
      "originalText": "Context Parallel (CP) / Ring Attention：按序列切 attention",
      "fontSize": 22,
      "fontFamily": 2,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "lineHeight": 1.25,
      "baseline": 22
    },
    {
      "id": "el2",
      "x": 110,
      "y": 40,
      "width": 335.4,
      "height": 16.25,
      "angle": 0,
      "strokeColor": "#868e96",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1002,
      "version": 1,
      "versionNonce": 5002,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "长上下文：Q/K/V 沿序列维切到多卡；K/V 在环上轮转，每卡算自己 Q 对全局 K",
      "originalText": "长上下文：Q/K/V 沿序列维切到多卡；K/V 在环上轮转，每卡算自己 Q 对全局 K",
      "fontSize": 13,
      "fontFamily": 2,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "lineHeight": 1.25,
      "baseline": 13
    },
    {
      "id": "el3",
      "x": 40,
      "y": 120,
      "width": 170,
      "height": 90,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "#b2f2bb",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 3
      },
      "seed": 1003,
      "version": 1,
      "versionNonce": 5003,
      "isDeleted": false,
      "boundElements": [
        {
          "type": "text",
          "id": "el4"
        }
      ],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "rectangle"
    },
    {
      "id": "el4",
      "x": 45,
      "y": 148.75,
      "width": 160,
      "height": 32.5,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1004,
      "version": 1,
      "versionNonce": 5004,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "GPU0\nQ/K/V 序列块 0",
      "originalText": "GPU0\nQ/K/V 序列块 0",
      "fontSize": 13,
      "fontFamily": 2,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": "el3",
      "lineHeight": 1.25,
      "baseline": 13
    },
    {
      "id": "el5",
      "x": 235,
      "y": 120,
      "width": 170,
      "height": 90,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "#b2f2bb",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 3
      },
      "seed": 1005,
      "version": 1,
      "versionNonce": 5005,
      "isDeleted": false,
      "boundElements": [
        {
          "type": "text",
          "id": "el6"
        }
      ],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "rectangle"
    },
    {
      "id": "el6",
      "x": 240,
      "y": 148.75,
      "width": 160,
      "height": 32.5,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1006,
      "version": 1,
      "versionNonce": 5006,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "GPU1\nQ/K/V 序列块 1",
      "originalText": "GPU1\nQ/K/V 序列块 1",
      "fontSize": 13,
      "fontFamily": 2,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": "el5",
      "lineHeight": 1.25,
      "baseline": 13
    },
    {
      "id": "el7",
      "x": 430,
      "y": 120,
      "width": 170,
      "height": 90,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "#b2f2bb",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 3
      },
      "seed": 1007,
      "version": 1,
      "versionNonce": 5007,
      "isDeleted": false,
      "boundElements": [
        {
          "type": "text",
          "id": "el8"
        }
      ],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "rectangle"
    },
    {
      "id": "el8",
      "x": 435,
      "y": 148.75,
      "width": 160,
      "height": 32.5,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1008,
      "version": 1,
      "versionNonce": 5008,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "GPU2\nQ/K/V 序列块 2",
      "originalText": "GPU2\nQ/K/V 序列块 2",
      "fontSize": 13,
      "fontFamily": 2,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": "el7",
      "lineHeight": 1.25,
      "baseline": 13
    },
    {
      "id": "el9",
      "x": 625,
      "y": 120,
      "width": 170,
      "height": 90,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "#b2f2bb",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 3
      },
      "seed": 1009,
      "version": 1,
      "versionNonce": 5009,
      "isDeleted": false,
      "boundElements": [
        {
          "type": "text",
          "id": "el10"
        }
      ],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "rectangle"
    },
    {
      "id": "el10",
      "x": 630,
      "y": 148.75,
      "width": 160,
      "height": 32.5,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1010,
      "version": 1,
      "versionNonce": 5010,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "GPU3\nQ/K/V 序列块 3",
      "originalText": "GPU3\nQ/K/V 序列块 3",
      "fontSize": 13,
      "fontFamily": 2,
      "textAlign": "center",
      "verticalAlign": "middle",
      "containerId": "el9",
      "lineHeight": 1.25,
      "baseline": 13
    },
    {
      "id": "el11",
      "x": 210,
      "y": 150,
      "width": 25,
      "height": 0,
      "angle": 0,
      "strokeColor": "#e8590c",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 2
      },
      "seed": 1011,
      "version": 1,
      "versionNonce": 5011,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "arrow",
      "points": [
        [
          0,
          0
        ],
        [
          25,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "el12",
      "x": 405,
      "y": 150,
      "width": 25,
      "height": 0,
      "angle": 0,
      "strokeColor": "#e8590c",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 2
      },
      "seed": 1012,
      "version": 1,
      "versionNonce": 5012,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "arrow",
      "points": [
        [
          0,
          0
        ],
        [
          25,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "el13",
      "x": 600,
      "y": 150,
      "width": 25,
      "height": 0,
      "angle": 0,
      "strokeColor": "#e8590c",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 2
      },
      "seed": 1013,
      "version": 1,
      "versionNonce": 5013,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "arrow",
      "points": [
        [
          0,
          0
        ],
        [
          25,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "el14",
      "x": 330,
      "y": 96,
      "width": 108.0,
      "height": 15.0,
      "angle": 0,
      "strokeColor": "#e8590c",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1014,
      "version": 1,
      "versionNonce": 5014,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "K/V 环形轮转（ring）→",
      "originalText": "K/V 环形轮转（ring）→",
      "fontSize": 12,
      "fontFamily": 2,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "lineHeight": 1.25,
      "baseline": 12
    },
    {
      "id": "el15",
      "x": 710,
      "y": 210,
      "width": 585,
      "height": 0,
      "angle": 0,
      "strokeColor": "#e8590c",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "dashed",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": {
        "type": 2
      },
      "seed": 1015,
      "version": 1,
      "versionNonce": 5015,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "arrow",
      "points": [
        [
          0,
          0
        ],
        [
          -585,
          0
        ]
      ],
      "lastCommittedPoint": null,
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": "arrow"
    },
    {
      "id": "el16",
      "x": 330,
      "y": 215,
      "width": 145.2,
      "height": 13.75,
      "angle": 0,
      "strokeColor": "#e8590c",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1016,
      "version": 1,
      "versionNonce": 5016,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "… 绕回，最后每个 Q 块都见过所有 K/V",
      "originalText": "… 绕回，最后每个 Q 块都见过所有 K/V",
      "fontSize": 11,
      "fontFamily": 2,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "lineHeight": 1.25,
      "baseline": 11
    },
    {
      "id": "el17",
      "x": 40,
      "y": 250,
      "width": 453.59999999999997,
      "height": 15.0,
      "angle": 0,
      "strokeColor": "#868e96",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "roundness": null,
      "seed": 1017,
      "version": 1,
      "versionNonce": 5017,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1700000000000,
      "link": null,
      "locked": false,
      "type": "text",
      "text": "每卡只存 1/N 序列的激活；K/V 轮转与本地 attention 计算重叠。详见 Packed-Sequence × CP",
      "originalText": "每卡只存 1/N 序列的激活；K/V 轮转与本地 attention 计算重叠。详见 Packed-Sequence × CP",
      "fontSize": 12,
      "fontFamily": 2,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "lineHeight": 1.25,
      "baseline": 12
    }
  ],
  "appState": {
    "gridSize": null,
    "viewBackgroundColor": "#ffffff"
  },
  "files": {}
}