{
  "id": "bert-base",
  "name": "BERT Base",
  "components": [
    {
      "id": "input-ids",
      "type": "input",
      "name": "input_ids",
      "position": { "x": 220, "y": 50 },
      "params": { "shape": [1, 512] },
      "inputs": [], "outputs": []
    },
    {
      "id": "embedding-tok",
      "type": "embedding",
      "name": "word_embed",
      "scope": "embeddings",
      "position": { "x": 220, "y": 220 },
      "params": { "numEmbeddings": 30522, "embeddingDim": 768 },
      "inputs": [], "outputs": []
    },
    {
      "id": "positionalEncoding-1",
      "type": "positionalEncoding",
      "name": "pos_embed",
      "scope": "embeddings",
      "position": { "x": 220, "y": 390 },
      "params": { "maxLen": 512, "embedDim": 768 },
      "inputs": [], "outputs": []
    },
    {
      "id": "layerNorm-emb",
      "type": "layerNorm",
      "name": "embed_norm",
      "scope": "embeddings",
      "position": { "x": 220, "y": 560 },
      "params": { "normalizedShape": 768 },
      "inputs": [], "outputs": []
    },
    {
      "id": "dropout-emb",
      "type": "dropout",
      "name": "embed_drop",
      "scope": "embeddings",
      "position": { "x": 220, "y": 730 },
      "params": { "p": 0.1 },
      "inputs": [], "outputs": []
    },
    {
      "id": "mha-1",
      "type": "multiHeadAttention",
      "name": "self_attn",
      "scope": "encoder.layer.0.attention",
      "position": { "x": 220, "y": 900 },
      "params": { "embedDim": 768, "numHeads": 12 },
      "inputs": [], "outputs": []
    },
    {
      "id": "layerNorm-1",
      "type": "layerNorm",
      "name": "norm",
      "scope": "encoder.layer.0.attention",
      "position": { "x": 220, "y": 1070 },
      "params": { "normalizedShape": 768 },
      "inputs": [], "outputs": []
    },
    {
      "id": "feedForward-1",
      "type": "feedForward",
      "name": "dense",
      "scope": "encoder.layer.0.ffn",
      "position": { "x": 220, "y": 1240 },
      "params": { "embedDim": 768, "ffDim": 3072 },
      "inputs": [], "outputs": []
    },
    {
      "id": "layerNorm-2",
      "type": "layerNorm",
      "name": "norm",
      "scope": "encoder.layer.0.ffn",
      "position": { "x": 220, "y": 1410 },
      "params": { "normalizedShape": 768 },
      "inputs": [], "outputs": []
    },
    {
      "id": "linear-pool",
      "type": "linear",
      "name": "dense",
      "scope": "pooler",
      "position": { "x": 220, "y": 1580 },
      "params": { "inFeatures": 768, "outFeatures": 768 },
      "inputs": [], "outputs": []
    },
    {
      "id": "output-1",
      "type": "output",
      "name": "cls_embedding",
      "position": { "x": 220, "y": 1750 },
      "params": {},
      "inputs": [], "outputs": []
    }
  ],
  "connections": [
    { "id": "c1",  "from": "input-ids",         "to": "embedding-tok" },
    { "id": "c2",  "from": "embedding-tok",      "to": "positionalEncoding-1" },
    { "id": "c3",  "from": "positionalEncoding-1","to": "layerNorm-emb" },
    { "id": "c4",  "from": "layerNorm-emb",      "to": "dropout-emb" },
    { "id": "c5",  "from": "dropout-emb",        "to": "mha-1" },
    { "id": "c6",  "from": "mha-1",              "to": "layerNorm-1" },
    { "id": "c7",  "from": "layerNorm-1",        "to": "feedForward-1" },
    { "id": "c8",  "from": "feedForward-1",      "to": "layerNorm-2" },
    { "id": "c9",  "from": "layerNorm-2",        "to": "linear-pool" },
    { "id": "c10", "from": "linear-pool",        "to": "output-1" }
  ]
}
