{
  "format": "tensorviz.graph",
  "version": 3,
  "exportedAt": "2026-09-17T06:32:41.318529+00:00",
  "status": "static",
  "warningCount": 0,
  "document": {
    "schemaVersion": 2,
    "semantic": {
      "graph_id": "snapshot",
      "name": "AdditiveDecoderStep",
      "revision": 0,
      "nodes": [
        {
          "node_id": "input",
          "kind": "input",
          "op": "Input",
          "params": {
            "shape": "1,8"
          },
          "in_ports": [],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "input",
              "name": "Input",
              "displayName": "Input",
              "description": "Model input node",
              "icon": "ArrowRight",
              "category": "io",
              "parameters": [
                {
                  "name": "shape",
                  "type": "string",
                  "defaultValue": "1,3,224,224",
                  "required": true,
                  "description": "Input tensor shape (comma-separated, e.g., 1,3,224,224)"
                },
                {
                  "name": "name",
                  "type": "string",
                  "defaultValue": "input",
                  "required": false,
                  "description": "Name for this input"
                }
              ]
            }
          }
        },
        {
          "node_id": "source_embedding",
          "kind": "layer",
          "op": "Embedding",
          "params": {
            "num_embeddings": 16,
            "embedding_dim": 4
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "embedding",
              "name": "Embedding",
              "displayName": "Embedding",
              "description": "Lookup table for dense vector embeddings",
              "icon": "Hash",
              "category": "embedding",
              "parameters": [
                {
                  "name": "num_embeddings",
                  "type": "number",
                  "defaultValue": 10000,
                  "required": true,
                  "description": "Size of the dictionary of embeddings",
                  "min": 1
                },
                {
                  "name": "embedding_dim",
                  "type": "number",
                  "defaultValue": 128,
                  "required": true,
                  "description": "Size of each embedding vector",
                  "min": 1
                },
                {
                  "name": "padding_idx",
                  "type": "number",
                  "defaultValue": 0,
                  "required": false,
                  "description": "Pad output with zeros at this index",
                  "min": 0
                },
                {
                  "name": "max_norm",
                  "type": "number",
                  "defaultValue": 0,
                  "required": false,
                  "description": "If > 0, re-normalizes embeddings with norm > max_norm",
                  "min": 0
                },
                {
                  "name": "sparse",
                  "type": "boolean",
                  "defaultValue": false,
                  "required": false,
                  "description": "If True, gradient w.r.t. weight is sparse"
                }
              ]
            }
          }
        },
        {
          "node_id": "encoder",
          "kind": "layer",
          "op": "GRU",
          "params": {
            "input_size": 4,
            "hidden_size": 4,
            "batch_first": true,
            "bidirectional": true
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "gru",
              "name": "GRU",
              "displayName": "GRU",
              "description": "Gated Recurrent Unit network",
              "icon": "RefreshCw",
              "category": "recurrent",
              "parameters": [
                {
                  "name": "input_size",
                  "type": "number",
                  "defaultValue": 128,
                  "required": true,
                  "description": "Number of input features",
                  "min": 1
                },
                {
                  "name": "hidden_size",
                  "type": "number",
                  "defaultValue": 256,
                  "required": true,
                  "description": "Number of features in the hidden state",
                  "min": 1
                },
                {
                  "name": "num_layers",
                  "type": "number",
                  "defaultValue": 1,
                  "required": false,
                  "description": "Number of recurrent layers",
                  "min": 1
                },
                {
                  "name": "bias",
                  "type": "boolean",
                  "defaultValue": true,
                  "required": false,
                  "description": "If False, no bias weights"
                },
                {
                  "name": "batch_first",
                  "type": "boolean",
                  "defaultValue": false,
                  "required": false,
                  "description": "If True, input is (batch, seq, feature)"
                },
                {
                  "name": "dropout",
                  "type": "number",
                  "defaultValue": 0,
                  "required": false,
                  "description": "Dropout probability between layers",
                  "min": 0,
                  "max": 1
                },
                {
                  "name": "bidirectional",
                  "type": "boolean",
                  "defaultValue": false,
                  "required": false,
                  "description": "If True, bidirectional GRU"
                }
              ]
            }
          }
        },
        {
          "node_id": "alignment",
          "kind": "module",
          "op": "Module",
          "params": {},
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "module",
              "name": "Module",
              "displayName": "Module",
              "description": "Custom module group (nn.Module)",
              "icon": "Package",
              "category": "module",
              "parameters": [
                {
                  "name": "name",
                  "type": "string",
                  "defaultValue": "CustomModule",
                  "required": true,
                  "description": "Module class name"
                },
                {
                  "name": "description",
                  "type": "string",
                  "defaultValue": "",
                  "required": false,
                  "description": "Module description"
                }
              ]
            },
            "moduleInstanceId": "alignment",
            "moduleTemplateId": "model::AdditiveAttention",
            "isGroup": true,
            "moduleMembers": [
              "alignment.annotation_projection",
              "alignment.state_projection",
              "add@alignment#0",
              "alignment.tanh",
              "alignment.score",
              "alignment.softmax",
              "mul@alignment#0",
              "python@alignment#0"
            ],
            "moduleLayerCount": 8
          }
        },
        {
          "node_id": "target_embedding",
          "kind": "layer",
          "op": "Embedding",
          "params": {
            "num_embeddings": 16,
            "embedding_dim": 4
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "embedding",
              "name": "Embedding",
              "displayName": "Embedding",
              "description": "Lookup table for dense vector embeddings",
              "icon": "Hash",
              "category": "embedding",
              "parameters": [
                {
                  "name": "num_embeddings",
                  "type": "number",
                  "defaultValue": 10000,
                  "required": true,
                  "description": "Size of the dictionary of embeddings",
                  "min": 1
                },
                {
                  "name": "embedding_dim",
                  "type": "number",
                  "defaultValue": 128,
                  "required": true,
                  "description": "Size of each embedding vector",
                  "min": 1
                },
                {
                  "name": "padding_idx",
                  "type": "number",
                  "defaultValue": 0,
                  "required": false,
                  "description": "Pad output with zeros at this index",
                  "min": 0
                },
                {
                  "name": "max_norm",
                  "type": "number",
                  "defaultValue": 0,
                  "required": false,
                  "description": "If > 0, re-normalizes embeddings with norm > max_norm",
                  "min": 0
                },
                {
                  "name": "sparse",
                  "type": "boolean",
                  "defaultValue": false,
                  "required": false,
                  "description": "If True, gradient w.r.t. weight is sparse"
                }
              ]
            }
          }
        },
        {
          "node_id": "cat@AdditiveDecoderStep#0",
          "kind": "layer",
          "op": "torch.cat",
          "params": {
            "dim": -1
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "cat",
              "name": "torch.cat",
              "displayName": "torch.cat",
              "description": "PyTorch cat operation",
              "icon": "Activity",
              "category": "tensor",
              "parameters": [
                {
                  "name": "dim",
                  "type": "string",
                  "defaultValue": "",
                  "required": false,
                  "description": "Dimension(s) to apply the operation on"
                }
              ]
            }
          }
        },
        {
          "node_id": "decoder",
          "kind": "layer",
          "op": "GRUCell",
          "params": {
            "input_size": 12,
            "hidden_size": 8
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "grucell",
              "name": "GRUCell",
              "displayName": "GRUCell",
              "description": "Single GRU cell",
              "icon": "RefreshCcw",
              "category": "recurrent",
              "parameters": [
                {
                  "name": "input_size",
                  "type": "number",
                  "defaultValue": 128,
                  "required": true,
                  "description": "Number of input features",
                  "min": 1
                },
                {
                  "name": "hidden_size",
                  "type": "number",
                  "defaultValue": 256,
                  "required": true,
                  "description": "Number of features in the hidden state",
                  "min": 1
                },
                {
                  "name": "bias",
                  "type": "boolean",
                  "defaultValue": true,
                  "required": false,
                  "description": "If False, no bias weights"
                }
              ]
            }
          }
        },
        {
          "node_id": "output_head",
          "kind": "layer",
          "op": "Linear",
          "params": {
            "in_features": 8,
            "out_features": 16
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "linear",
              "name": "Linear",
              "displayName": "Linear",
              "description": "Fully Connected Layer",
              "icon": "Minus",
              "category": "linear",
              "parameters": [
                {
                  "name": "in_features",
                  "type": "number",
                  "defaultValue": 512,
                  "required": true,
                  "description": "Size of input features",
                  "min": 1
                },
                {
                  "name": "out_features",
                  "type": "number",
                  "defaultValue": 256,
                  "required": true,
                  "description": "Size of output features",
                  "min": 1
                },
                {
                  "name": "bias",
                  "type": "boolean",
                  "defaultValue": true,
                  "required": false,
                  "description": "If set to False, the layer will not learn an additive bias"
                }
              ]
            }
          }
        },
        {
          "node_id": "output",
          "kind": "output",
          "op": "Output",
          "params": {},
          "in_ports": [
            "x"
          ],
          "out_ports": [],
          "metadata": {
            "layerType": {
              "id": "output",
              "name": "Output",
              "displayName": "Output",
              "description": "Model output node",
              "icon": "ArrowLeft",
              "category": "io",
              "parameters": [
                {
                  "name": "name",
                  "type": "string",
                  "defaultValue": "output",
                  "required": false,
                  "description": "Name for this output"
                }
              ]
            }
          }
        },
        {
          "node_id": "alignment.annotation_projection",
          "kind": "layer",
          "op": "Linear",
          "params": {
            "in_features": 8,
            "out_features": 8,
            "bias": false
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "linear",
              "name": "Linear",
              "displayName": "Linear",
              "description": "Fully Connected Layer",
              "icon": "Minus",
              "category": "linear",
              "parameters": [
                {
                  "name": "in_features",
                  "type": "number",
                  "defaultValue": 512,
                  "required": true,
                  "description": "Size of input features",
                  "min": 1
                },
                {
                  "name": "out_features",
                  "type": "number",
                  "defaultValue": 256,
                  "required": true,
                  "description": "Size of output features",
                  "min": 1
                },
                {
                  "name": "bias",
                  "type": "boolean",
                  "defaultValue": true,
                  "required": false,
                  "description": "If set to False, the layer will not learn an additive bias"
                }
              ]
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "alignment.state_projection",
          "kind": "layer",
          "op": "Linear",
          "params": {
            "in_features": 8,
            "out_features": 8,
            "bias": false
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "linear",
              "name": "Linear",
              "displayName": "Linear",
              "description": "Fully Connected Layer",
              "icon": "Minus",
              "category": "linear",
              "parameters": [
                {
                  "name": "in_features",
                  "type": "number",
                  "defaultValue": 512,
                  "required": true,
                  "description": "Size of input features",
                  "min": 1
                },
                {
                  "name": "out_features",
                  "type": "number",
                  "defaultValue": 256,
                  "required": true,
                  "description": "Size of output features",
                  "min": 1
                },
                {
                  "name": "bias",
                  "type": "boolean",
                  "defaultValue": true,
                  "required": false,
                  "description": "If set to False, the layer will not learn an additive bias"
                }
              ]
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "add@alignment#0",
          "kind": "layer",
          "op": "torch.add",
          "params": {},
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "add",
              "name": "torch.add",
              "displayName": "torch.add",
              "description": "PyTorch add operation",
              "icon": "Activity",
              "category": "tensor",
              "parameters": [
                {
                  "name": "dim",
                  "type": "string",
                  "defaultValue": "",
                  "required": false,
                  "description": "Dimension(s) to apply the operation on"
                }
              ]
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "alignment.tanh",
          "kind": "layer",
          "op": "Tanh",
          "params": {},
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "tanh",
              "name": "Tanh",
              "displayName": "Tanh",
              "description": "Hyperbolic tangent activation",
              "icon": "TrendingUp",
              "category": "activation",
              "parameters": []
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "alignment.score",
          "kind": "layer",
          "op": "Linear",
          "params": {
            "in_features": 8,
            "out_features": 1,
            "bias": false
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "linear",
              "name": "Linear",
              "displayName": "Linear",
              "description": "Fully Connected Layer",
              "icon": "Minus",
              "category": "linear",
              "parameters": [
                {
                  "name": "in_features",
                  "type": "number",
                  "defaultValue": 512,
                  "required": true,
                  "description": "Size of input features",
                  "min": 1
                },
                {
                  "name": "out_features",
                  "type": "number",
                  "defaultValue": 256,
                  "required": true,
                  "description": "Size of output features",
                  "min": 1
                },
                {
                  "name": "bias",
                  "type": "boolean",
                  "defaultValue": true,
                  "required": false,
                  "description": "If set to False, the layer will not learn an additive bias"
                }
              ]
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "alignment.softmax",
          "kind": "layer",
          "op": "Softmax",
          "params": {
            "dim": 1
          },
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "softmax",
              "name": "Softmax",
              "displayName": "Softmax",
              "description": "Softmax over a dimension",
              "icon": "TrendingUp",
              "category": "activation",
              "parameters": [
                {
                  "name": "dim",
                  "type": "number",
                  "defaultValue": 1,
                  "required": true,
                  "description": "Dimension along which Softmax is computed"
                }
              ]
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "mul@alignment#0",
          "kind": "layer",
          "op": "torch.mul",
          "params": {},
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "mul",
              "name": "torch.mul",
              "displayName": "torch.mul",
              "description": "PyTorch mul operation",
              "icon": "Activity",
              "category": "tensor",
              "parameters": [
                {
                  "name": "dim",
                  "type": "string",
                  "defaultValue": "",
                  "required": false,
                  "description": "Dimension(s) to apply the operation on"
                }
              ]
            },
            "parentId": "alignment"
          }
        },
        {
          "node_id": "python@alignment#0",
          "kind": "layer",
          "op": "Python",
          "params": {},
          "in_ports": [
            "x"
          ],
          "out_ports": [
            "y"
          ],
          "metadata": {
            "layerType": {
              "id": "python",
              "name": "Python",
              "displayName": "Python",
              "description": "A statement from the source file that has no graph equivalent. Its code is kept verbatim and its shape is unknown until the model is traced.",
              "icon": "Hash",
              "category": "misc",
              "parameters": []
            },
            "parentId": "alignment"
          }
        }
      ],
      "edges": [
        {
          "edge_id": "edge-1",
          "source_node_id": "alignment.annotation_projection",
          "target_node_id": "add@alignment#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-2",
          "source_node_id": "alignment.state_projection",
          "target_node_id": "add@alignment#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-3",
          "source_node_id": "add@alignment#0",
          "target_node_id": "alignment.tanh",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-4",
          "source_node_id": "alignment.tanh",
          "target_node_id": "alignment.score",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-5",
          "source_node_id": "alignment.score",
          "target_node_id": "alignment.softmax",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-6",
          "source_node_id": "alignment.softmax",
          "target_node_id": "mul@alignment#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-7",
          "source_node_id": "mul@alignment#0",
          "target_node_id": "python@alignment#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-8",
          "source_node_id": "input",
          "target_node_id": "source_embedding",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-9",
          "source_node_id": "source_embedding",
          "target_node_id": "encoder",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-10",
          "source_node_id": "encoder",
          "target_node_id": "alignment.annotation_projection",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-11",
          "source_node_id": "encoder",
          "target_node_id": "alignment.state_projection",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-12",
          "source_node_id": "encoder",
          "target_node_id": "mul@alignment#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-13",
          "source_node_id": "encoder",
          "target_node_id": "alignment",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-14",
          "source_node_id": "input",
          "target_node_id": "alignment.annotation_projection",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-15",
          "source_node_id": "input",
          "target_node_id": "alignment.state_projection",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-16",
          "source_node_id": "input",
          "target_node_id": "mul@alignment#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-17",
          "source_node_id": "input",
          "target_node_id": "alignment",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-18",
          "source_node_id": "input",
          "target_node_id": "target_embedding",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-19",
          "source_node_id": "target_embedding",
          "target_node_id": "cat@AdditiveDecoderStep#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-20",
          "source_node_id": "python@alignment#0",
          "target_node_id": "cat@AdditiveDecoderStep#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-21",
          "source_node_id": "alignment",
          "target_node_id": "cat@AdditiveDecoderStep#0",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-22",
          "source_node_id": "cat@AdditiveDecoderStep#0",
          "target_node_id": "decoder",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-23",
          "source_node_id": "input",
          "target_node_id": "decoder",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-24",
          "source_node_id": "decoder",
          "target_node_id": "output_head",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        },
        {
          "edge_id": "edge-25",
          "source_node_id": "output_head",
          "target_node_id": "output",
          "source_port": "y",
          "target_port": "x",
          "metadata": {}
        }
      ],
      "inputs": [],
      "modules": [],
      "operations": [],
      "metadata": {}
    },
    "view": {
      "graph_id": "snapshot",
      "node_positions": {
        "input": {
          "x": 0,
          "y": 160
        },
        "source_embedding": {
          "x": 340,
          "y": 160
        },
        "encoder": {
          "x": 680,
          "y": 160
        },
        "alignment": {
          "x": 1020,
          "y": 160
        },
        "target_embedding": {
          "x": 1360,
          "y": 160
        },
        "cat@AdditiveDecoderStep#0": {
          "x": 1700,
          "y": 160
        },
        "decoder": {
          "x": 2040,
          "y": 160
        },
        "output_head": {
          "x": 2380,
          "y": 160
        },
        "output": {
          "x": 2720,
          "y": 160
        },
        "alignment.annotation_projection": {
          "x": 24,
          "y": 214
        },
        "alignment.state_projection": {
          "x": 24,
          "y": 364
        },
        "add@alignment#0": {
          "x": 24,
          "y": 514
        },
        "alignment.tanh": {
          "x": 24,
          "y": 664
        },
        "alignment.score": {
          "x": 24,
          "y": 814
        },
        "alignment.softmax": {
          "x": 24,
          "y": 964
        },
        "mul@alignment#0": {
          "x": 24,
          "y": 1114
        },
        "python@alignment#0": {
          "x": 24,
          "y": 1264
        }
      },
      "collapsed_modules": [
        "alignment"
      ],
      "selection": [],
      "layout": {}
    }
  },
  "snapshotId": "snapshot-a7d39cda25443c5c",
  "collaboration": {
    "walkthrough": {
      "title": "Choose source context for the next decoder step",
      "steps": [
        {
          "id": "encode",
          "title": "Keep an annotation for every source position",
          "note": "Forward and backward GRUs produce four features each, giving an eight-feature annotation at each of five positions. The decoder can consult this entire sequence instead of relying on one fixed summary.",
          "view": {
            "camera": {
              "x": -347.5,
              "y": 46.5,
              "z": 1.25
            },
            "nodePositions": {
              "input": {
                "x": 0,
                "y": 160
              },
              "source_embedding": {
                "x": 340,
                "y": 160
              },
              "encoder": {
                "x": 680,
                "y": 160
              },
              "alignment": {
                "x": 1020,
                "y": 160
              },
              "target_embedding": {
                "x": 1360,
                "y": 160
              },
              "cat@AdditiveDecoderStep#0": {
                "x": 1700,
                "y": 160
              },
              "decoder": {
                "x": 2040,
                "y": 160
              },
              "output_head": {
                "x": 2380,
                "y": 160
              },
              "output": {
                "x": 2720,
                "y": 160
              },
              "alignment.annotation_projection": {
                "x": 24,
                "y": 214
              },
              "alignment.state_projection": {
                "x": 24,
                "y": 364
              },
              "add@alignment#0": {
                "x": 24,
                "y": 514
              },
              "alignment.tanh": {
                "x": 24,
                "y": 664
              },
              "alignment.score": {
                "x": 24,
                "y": 814
              },
              "alignment.softmax": {
                "x": 24,
                "y": 964
              },
              "mul@alignment#0": {
                "x": 24,
                "y": 1114
              },
              "python@alignment#0": {
                "x": 24,
                "y": 1264
              }
            },
            "expandedModuleIds": [],
            "selectedNodeIds": [
              "encoder"
            ],
            "viewport": {
              "width": 1100,
              "height": 700
            }
          },
          "anchors": [
            {
              "target": {
                "kind": "node",
                "nodeId": "encoder"
              },
              "snapshotId": "snapshot-a7d39cda25443c5c",
              "exportedAt": "2026-09-17T06:32:41.318529+00:00",
              "modelName": "AdditiveDecoderStep",
              "context": "{\"connections\":[\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"encoder\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"encoder\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.annotation_projection\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"encoder\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.state_projection\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"encoder\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"mul@alignment#0\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"source_embedding\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"encoder\\\",\\\"targetPort\\\":\\\"x\\\"}\"],\"contents\":[],\"node\":{\"id\":\"encoder\",\"kind\":\"layer\",\"op\":\"GRU\",\"params\":{\"batch_first\":true,\"bidirectional\":true,\"hidden_size\":4,\"input_size\":4}}}"
            }
          ]
        },
        {
          "id": "align",
          "title": "Combine source annotations with the previous state",
          "note": "Learned projections of each annotation and the previous decoder state are added before tanh. A learned scalar projection turns these joint features into an alignment score.",
          "view": {
            "camera": {
              "x": 308.5,
              "y": -444,
              "z": 1.25
            },
            "nodePositions": {
              "input": {
                "x": 0,
                "y": 160
              },
              "source_embedding": {
                "x": 340,
                "y": 160
              },
              "encoder": {
                "x": 680,
                "y": 160
              },
              "alignment": {
                "x": 1020,
                "y": 160
              },
              "target_embedding": {
                "x": 1360,
                "y": 160
              },
              "cat@AdditiveDecoderStep#0": {
                "x": 1700,
                "y": 160
              },
              "decoder": {
                "x": 2040,
                "y": 160
              },
              "output_head": {
                "x": 2380,
                "y": 160
              },
              "output": {
                "x": 2720,
                "y": 160
              },
              "alignment.annotation_projection": {
                "x": 24,
                "y": 214
              },
              "alignment.state_projection": {
                "x": 24,
                "y": 364
              },
              "add@alignment#0": {
                "x": 24,
                "y": 514
              },
              "alignment.tanh": {
                "x": 24,
                "y": 664
              },
              "alignment.score": {
                "x": 24,
                "y": 814
              },
              "alignment.softmax": {
                "x": 24,
                "y": 964
              },
              "mul@alignment#0": {
                "x": 24,
                "y": 1114
              },
              "python@alignment#0": {
                "x": 24,
                "y": 1264
              }
            },
            "expandedModuleIds": [
              "alignment"
            ],
            "selectedNodeIds": [
              "alignment.tanh"
            ],
            "viewport": {
              "width": 1100,
              "height": 700
            }
          },
          "anchors": [
            {
              "target": {
                "kind": "node",
                "nodeId": "alignment.tanh"
              },
              "snapshotId": "snapshot-a7d39cda25443c5c",
              "exportedAt": "2026-09-17T06:32:41.318529+00:00",
              "modelName": "AdditiveDecoderStep",
              "context": "{\"connections\":[\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"add@alignment#0\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.tanh\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"alignment.tanh\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.score\\\",\\\"targetPort\\\":\\\"x\\\"}\"],\"contents\":[],\"node\":{\"id\":\"alignment.tanh\",\"kind\":\"layer\",\"op\":\"Tanh\",\"params\":{},\"parent\":\"alignment\"}}"
            }
          ]
        },
        {
          "id": "context",
          "title": "Normalize alignment and form a weighted context",
          "note": "Softmax normalizes the five scores across source positions. Their weighted annotation sum becomes an eight-feature context vector. The recorded comparison changes the previous decoder state while holding the source fixed.",
          "view": {
            "camera": {
              "x": 308.5,
              "y": -744,
              "z": 1.25
            },
            "nodePositions": {
              "input": {
                "x": 0,
                "y": 160
              },
              "source_embedding": {
                "x": 340,
                "y": 160
              },
              "encoder": {
                "x": 680,
                "y": 160
              },
              "alignment": {
                "x": 1020,
                "y": 160
              },
              "target_embedding": {
                "x": 1360,
                "y": 160
              },
              "cat@AdditiveDecoderStep#0": {
                "x": 1700,
                "y": 160
              },
              "decoder": {
                "x": 2040,
                "y": 160
              },
              "output_head": {
                "x": 2380,
                "y": 160
              },
              "output": {
                "x": 2720,
                "y": 160
              },
              "alignment.annotation_projection": {
                "x": 24,
                "y": 214
              },
              "alignment.state_projection": {
                "x": 24,
                "y": 364
              },
              "add@alignment#0": {
                "x": 24,
                "y": 514
              },
              "alignment.tanh": {
                "x": 24,
                "y": 664
              },
              "alignment.score": {
                "x": 24,
                "y": 814
              },
              "alignment.softmax": {
                "x": 24,
                "y": 964
              },
              "mul@alignment#0": {
                "x": 24,
                "y": 1114
              },
              "python@alignment#0": {
                "x": 24,
                "y": 1264
              }
            },
            "expandedModuleIds": [
              "alignment"
            ],
            "selectedNodeIds": [
              "alignment.softmax"
            ],
            "viewport": {
              "width": 1100,
              "height": 700
            }
          },
          "anchors": [
            {
              "target": {
                "kind": "node",
                "nodeId": "alignment.softmax"
              },
              "snapshotId": "snapshot-a7d39cda25443c5c",
              "exportedAt": "2026-09-17T06:32:41.318529+00:00",
              "modelName": "AdditiveDecoderStep",
              "context": "{\"connections\":[\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"alignment.score\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.softmax\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"alignment.softmax\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"mul@alignment#0\\\",\\\"targetPort\\\":\\\"x\\\"}\"],\"contents\":[],\"node\":{\"id\":\"alignment.softmax\",\"kind\":\"layer\",\"op\":\"Softmax\",\"params\":{\"dim\":1},\"parent\":\"alignment\"}}"
            }
          ]
        },
        {
          "id": "decode",
          "title": "Use the context to update the decoder",
          "note": "The previous output-token embedding and the context are concatenated into twelve input features. A GRUCell updates the previous eight-feature state, and the output head produces sixteen next-token logits.",
          "view": {
            "camera": {
              "x": -1707.5,
              "y": 60,
              "z": 1.25
            },
            "nodePositions": {
              "input": {
                "x": 0,
                "y": 160
              },
              "source_embedding": {
                "x": 340,
                "y": 160
              },
              "encoder": {
                "x": 680,
                "y": 160
              },
              "alignment": {
                "x": 1020,
                "y": 160
              },
              "target_embedding": {
                "x": 1360,
                "y": 160
              },
              "cat@AdditiveDecoderStep#0": {
                "x": 1700,
                "y": 160
              },
              "decoder": {
                "x": 2040,
                "y": 160
              },
              "output_head": {
                "x": 2380,
                "y": 160
              },
              "output": {
                "x": 2720,
                "y": 160
              },
              "alignment.annotation_projection": {
                "x": 24,
                "y": 214
              },
              "alignment.state_projection": {
                "x": 24,
                "y": 364
              },
              "add@alignment#0": {
                "x": 24,
                "y": 514
              },
              "alignment.tanh": {
                "x": 24,
                "y": 664
              },
              "alignment.score": {
                "x": 24,
                "y": 814
              },
              "alignment.softmax": {
                "x": 24,
                "y": 964
              },
              "mul@alignment#0": {
                "x": 24,
                "y": 1114
              },
              "python@alignment#0": {
                "x": 24,
                "y": 1264
              }
            },
            "expandedModuleIds": [],
            "selectedNodeIds": [
              "decoder"
            ],
            "viewport": {
              "width": 1100,
              "height": 700
            }
          },
          "anchors": [
            {
              "target": {
                "kind": "node",
                "nodeId": "decoder"
              },
              "snapshotId": "snapshot-a7d39cda25443c5c",
              "exportedAt": "2026-09-17T06:32:41.318529+00:00",
              "modelName": "AdditiveDecoderStep",
              "context": "{\"connections\":[\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"cat@AdditiveDecoderStep#0\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"decoder\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"decoder\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"output_head\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"input\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"decoder\\\",\\\"targetPort\\\":\\\"x\\\"}\"],\"contents\":[],\"node\":{\"id\":\"decoder\",\"kind\":\"layer\",\"op\":\"GRUCell\",\"params\":{\"hidden_size\":8,\"input_size\":12}}}"
            }
          ]
        }
      ]
    },
    "threads": [],
    "savedViews": [
      {
        "id": "align",
        "title": "Combine source annotations with the previous state",
        "note": "Learned projections of each annotation and the previous decoder state are added before tanh. A learned scalar projection turns these joint features into an alignment score.",
        "view": {
          "camera": {
            "x": 308.5,
            "y": -444,
            "z": 1.25
          },
          "nodePositions": {
            "input": {
              "x": 0,
              "y": 160
            },
            "source_embedding": {
              "x": 340,
              "y": 160
            },
            "encoder": {
              "x": 680,
              "y": 160
            },
            "alignment": {
              "x": 1020,
              "y": 160
            },
            "target_embedding": {
              "x": 1360,
              "y": 160
            },
            "cat@AdditiveDecoderStep#0": {
              "x": 1700,
              "y": 160
            },
            "decoder": {
              "x": 2040,
              "y": 160
            },
            "output_head": {
              "x": 2380,
              "y": 160
            },
            "output": {
              "x": 2720,
              "y": 160
            },
            "alignment.annotation_projection": {
              "x": 24,
              "y": 214
            },
            "alignment.state_projection": {
              "x": 24,
              "y": 364
            },
            "add@alignment#0": {
              "x": 24,
              "y": 514
            },
            "alignment.tanh": {
              "x": 24,
              "y": 664
            },
            "alignment.score": {
              "x": 24,
              "y": 814
            },
            "alignment.softmax": {
              "x": 24,
              "y": 964
            },
            "mul@alignment#0": {
              "x": 24,
              "y": 1114
            },
            "python@alignment#0": {
              "x": 24,
              "y": 1264
            }
          },
          "expandedModuleIds": [
            "alignment"
          ],
          "selectedNodeIds": [
            "alignment.tanh"
          ],
          "viewport": {
            "width": 1100,
            "height": 700
          }
        },
        "anchors": [
          {
            "target": {
              "kind": "node",
              "nodeId": "alignment.tanh"
            },
            "snapshotId": "snapshot-a7d39cda25443c5c",
            "exportedAt": "2026-09-17T06:32:41.318529+00:00",
            "modelName": "AdditiveDecoderStep",
            "context": "{\"connections\":[\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"add@alignment#0\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.tanh\\\",\\\"targetPort\\\":\\\"x\\\"}\",\"{\\\"kind\\\":\\\"edge\\\",\\\"source\\\":\\\"alignment.tanh\\\",\\\"sourcePort\\\":\\\"y\\\",\\\"target\\\":\\\"alignment.score\\\",\\\"targetPort\\\":\\\"x\\\"}\"],\"contents\":[],\"node\":{\"id\":\"alignment.tanh\",\"kind\":\"layer\",\"op\":\"Tanh\",\"params\":{},\"parent\":\"alignment\"}}"
          }
        ]
      }
    ],
    "openingViewId": "align"
  }
}
