{
 "type": "excalidraw",
 "version": 2,
 "source": "https://excalidraw.com",
 "elements": [
  {
   "id": "q5-serving-internals-badge",
   "type": "rectangle",
   "x": 0,
   "y": 0,
   "width": 1500,
   "height": 300,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#ffc078",
   "fillStyle": "solid",
   "strokeWidth": 4,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 265236939,
   "version": 1,
   "versionNonce": 1400082662,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-badge-t"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-badge-t",
   "type": "text",
   "x": 20,
   "y": 25,
   "width": 1460,
   "height": 250,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 2072265938,
   "version": 1,
   "versionNonce": 455736474,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Q5 Serve",
   "originalText": "Q5 Serve",
   "fontSize": 200,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-badge",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-title",
   "type": "text",
   "x": 0,
   "y": 330,
   "width": 1400,
   "height": 40,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 244051093,
   "version": 1,
   "versionNonce": 1067275002,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Q5 Inside the serving stack: batching, KV cache, prefix routing, prefill/decode split",
   "originalText": "Q5 Inside the serving stack: batching, KV cache, prefix routing, prefill/decode split",
   "fontSize": 32,
   "fontFamily": 5,
   "textAlign": "left",
   "verticalAlign": "middle",
   "containerId": null,
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-rt",
   "type": "rectangle",
   "x": 0,
   "y": 550,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#fff4e6",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 821653593,
   "version": 1,
   "versionNonce": 1189349777,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-rt-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e0"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e4"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-rt-t",
   "type": "text",
   "x": 10,
   "y": 556.0,
   "width": 160,
   "height": 60,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 181242850,
   "version": 1,
   "versionNonce": 419812754,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Cache-aware router\n(hash of prompt prefix\n-> replica)",
   "originalText": "Cache-aware router\n(hash of prompt prefix\n-> replica)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-rt",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-pf",
   "type": "rectangle",
   "x": 330,
   "y": 400,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#ebfbee",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 1942080813,
   "version": 1,
   "versionNonce": 119682499,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-pf-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e0"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e1"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-pf-t",
   "type": "text",
   "x": 340,
   "y": 406.0,
   "width": 160,
   "height": 60,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 272167094,
   "version": 1,
   "versionNonce": 1903737355,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Prefill workers\n(compute bound,\nbig GPUs)",
   "originalText": "Prefill workers\n(compute bound,\nbig GPUs)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-pf",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-kv",
   "type": "rectangle",
   "x": 660,
   "y": 400,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#fff9db",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 1398499908,
   "version": 1,
   "versionNonce": 856430244,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-kv-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e1"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e2"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-kv-t",
   "type": "text",
   "x": 670,
   "y": 416.0,
   "width": 160,
   "height": 40,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 1190502837,
   "version": 1,
   "versionNonce": 1942810372,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "KV cache transfer\n(RDMA / NVLink)",
   "originalText": "KV cache transfer\n(RDMA / NVLink)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-kv",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-dc",
   "type": "rectangle",
   "x": 990,
   "y": 400,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#ebfbee",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 2053150340,
   "version": 1,
   "versionNonce": 1063673567,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-dc-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e2"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e3"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-dc-t",
   "type": "text",
   "x": 1000,
   "y": 406.0,
   "width": 160,
   "height": 60,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 1114940396,
   "version": 1,
   "versionNonce": 870111104,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Decode workers\n(memory-bandwidth bound,\ne.g. d-Matrix / GPUs)",
   "originalText": "Decode workers\n(memory-bandwidth bound,\ne.g. d-Matrix / GPUs)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-dc",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-eng",
   "type": "rectangle",
   "x": 330,
   "y": 700,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#e6fcf5",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 1922119102,
   "version": 1,
   "versionNonce": 588987925,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-eng-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e4"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e5"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e6"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-eng-t",
   "type": "text",
   "x": 340,
   "y": 706.0,
   "width": 160,
   "height": 60,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 1789442529,
   "version": 1,
   "versionNonce": 522362321,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Engine loop\n(continuous batching,\npaged KV blocks)",
   "originalText": "Engine loop\n(continuous batching,\npaged KV blocks)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-eng",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-pc",
   "type": "rectangle",
   "x": 660,
   "y": 700,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#f3f0ff",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 1685192165,
   "version": 1,
   "versionNonce": 1898882740,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-pc-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e5"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-pc-t",
   "type": "text",
   "x": 670,
   "y": 706.0,
   "width": 160,
   "height": 60,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 1357122901,
   "version": 1,
   "versionNonce": 311583110,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Prefix cache\n(shared system prompts,\nLRU evict)",
   "originalText": "Prefix cache\n(shared system prompts,\nLRU evict)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-pc",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-sd",
   "type": "rectangle",
   "x": 990,
   "y": 700,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#ebfbee",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 3
   },
   "seed": 1033535610,
   "version": 1,
   "versionNonce": 1839700616,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-sd-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e6"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-sd-t",
   "type": "text",
   "x": 1000,
   "y": 706.0,
   "width": 160,
   "height": 60,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 314051310,
   "version": 1,
   "versionNonce": 913495727,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Speculative decoding\n(draft model proposes,\ntarget verifies)",
   "originalText": "Speculative decoding\n(draft model proposes,\ntarget verifies)",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-sd",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-cl",
   "type": "ellipse",
   "x": 1320,
   "y": 550,
   "width": 180,
   "height": 72,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "#e7f5ff",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 1300430509,
   "version": 1,
   "versionNonce": 525488742,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-cl-t"
    },
    {
     "type": "arrow",
     "id": "q5-serving-internals-e3"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-cl-t",
   "type": "text",
   "x": 1330,
   "y": 566.0,
   "width": 160,
   "height": 40,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 663343194,
   "version": 1,
   "versionNonce": 1572745252,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Streamed tokens\nto client",
   "originalText": "Streamed tokens\nto client",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-cl",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-e0",
   "type": "arrow",
   "x": 169.2,
   "y": 550.0,
   "width": 171.60000000000002,
   "height": 78.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 614090117,
   "version": 1,
   "versionNonce": 1087089873,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-e0-t"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     171.60000000000002,
     -78.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-rt",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-pf",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-e0-t",
   "type": "text",
   "x": 215.0,
   "y": 501.0,
   "width": 80,
   "height": 20,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 589504031,
   "version": 1,
   "versionNonce": 2008910112,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "new prompt",
   "originalText": "new prompt",
   "fontSize": 14,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-e0",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-e1",
   "type": "arrow",
   "x": 510.0,
   "y": 436.0,
   "width": 150.0,
   "height": 0.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 943122534,
   "version": 1,
   "versionNonce": 404265717,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     150.0,
     0.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-pf",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-kv",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-e2",
   "type": "arrow",
   "x": 840.0,
   "y": 436.0,
   "width": 150.0,
   "height": 0.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 1710500231,
   "version": 1,
   "versionNonce": 2092769115,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     150.0,
     0.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-kv",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-dc",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-e3",
   "type": "arrow",
   "x": 1159.2,
   "y": 472.0,
   "width": 171.5999999999999,
   "height": 78.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 699199910,
   "version": 1,
   "versionNonce": 960836460,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-e3-t"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     171.5999999999999,
     78.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-dc",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-cl",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-e3-t",
   "type": "text",
   "x": 1221.0,
   "y": 501.0,
   "width": 48,
   "height": 20,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 693491441,
   "version": 1,
   "versionNonce": 1853372069,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "tokens",
   "originalText": "tokens",
   "fontSize": 14,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-e3",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-e4",
   "type": "arrow",
   "x": 169.2,
   "y": 622.0,
   "width": 171.60000000000002,
   "height": 78.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "dashed",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 1734349672,
   "version": 1,
   "versionNonce": 1456492750,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-e4-t"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     171.60000000000002,
     78.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-rt",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-eng",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-e4-t",
   "type": "text",
   "x": 199.0,
   "y": 651.0,
   "width": 112,
   "height": 20,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 1809368695,
   "version": 1,
   "versionNonce": 840716951,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "colocated mode",
   "originalText": "colocated mode",
   "fontSize": 14,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-e4",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-e5",
   "type": "arrow",
   "x": 510.0,
   "y": 736.0,
   "width": 150.0,
   "height": 0.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "dashed",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 1531648886,
   "version": 1,
   "versionNonce": 1368056915,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-e5-t"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     150.0,
     0.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-eng",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-pc",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-e5-t",
   "type": "text",
   "x": 537.0,
   "y": 726.0,
   "width": 96,
   "height": 20,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 395970335,
   "version": 1,
   "versionNonce": 1571754094,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "reuse blocks",
   "originalText": "reuse blocks",
   "fontSize": 14,
   "fontFamily": 5,
   "textAlign": "center",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-e5",
   "lineHeight": 1.25,
   "autoResize": true
  },
  {
   "id": "q5-serving-internals-e6",
   "type": "arrow",
   "x": 510.0,
   "y": 736.0,
   "width": 480.0,
   "height": 0.0,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "dashed",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": {
    "type": 2
   },
   "seed": 83678550,
   "version": 1,
   "versionNonce": 1451611685,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "points": [
    [
     0,
     0
    ],
    [
     480.0,
     0.0
    ]
   ],
   "lastCommittedPoint": null,
   "startBinding": {
    "elementId": "q5-serving-internals-eng",
    "focus": 0,
    "gap": 4
   },
   "endBinding": {
    "elementId": "q5-serving-internals-sd",
    "focus": 0,
    "gap": 4
   },
   "startArrowhead": null,
   "endArrowhead": "arrow",
   "elbowed": false
  },
  {
   "id": "q5-serving-internals-notes",
   "type": "rectangle",
   "x": 0,
   "y": 850,
   "width": 420,
   "height": 202,
   "angle": 0,
   "strokeColor": "#e67700",
   "backgroundColor": "#ffec99",
   "fillStyle": "solid",
   "strokeWidth": 1,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 1969975946,
   "version": 1,
   "versionNonce": 1891753122,
   "isDeleted": false,
   "boundElements": [
    {
     "type": "text",
     "id": "q5-serving-internals-notes-t"
    }
   ],
   "updated": 1,
   "link": null,
   "locked": false
  },
  {
   "id": "q5-serving-internals-notes-t",
   "type": "text",
   "x": 12,
   "y": 860,
   "width": 396,
   "height": 182,
   "angle": 0,
   "strokeColor": "#1e1e1e",
   "backgroundColor": "transparent",
   "fillStyle": "solid",
   "strokeWidth": 2,
   "strokeStyle": "solid",
   "roughness": 1,
   "opacity": 100,
   "groupIds": [],
   "frameId": null,
   "roundness": null,
   "seed": 77661512,
   "version": 1,
   "versionNonce": 1650747323,
   "isDeleted": false,
   "boundElements": [],
   "updated": 1,
   "link": null,
   "locked": false,
   "text": "Trade-offs to raise\n\u2022 TTFT ~ prefill; TPOT ~ decode\n\u2022 KV per token ~320 KB (70B fp16, GQA)\n\u2022 Batch more = higher throughput, worse latency\n\u2022 Prefix reuse cuts TTFT and cost\n\u2022 Disaggregate when prompts are long\n\u2022 Preempt / swap sequences when KV fills",
   "originalText": "Trade-offs to raise\n\u2022 TTFT ~ prefill; TPOT ~ decode\n\u2022 KV per token ~320 KB (70B fp16, GQA)\n\u2022 Batch more = higher throughput, worse latency\n\u2022 Prefix reuse cuts TTFT and cost\n\u2022 Disaggregate when prompts are long\n\u2022 Preempt / swap sequences when KV fills",
   "fontSize": 16,
   "fontFamily": 5,
   "textAlign": "left",
   "verticalAlign": "middle",
   "containerId": "q5-serving-internals-notes",
   "lineHeight": 1.25,
   "autoResize": true
  }
 ],
 "appState": {
  "viewBackgroundColor": "#ffffff",
  "gridSize": 20
 },
 "files": {}
}