File size: 2,691 Bytes
3d3ae36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
{
  "task": {
    "id": "case_15",
    "name": "double_minus_index",
    "summary": "Returns each token multiplied by two and subtracted by its index.",
    "examples": [
      {
        "input": [
          "BOS",
          2,
          4,
          3,
          2
        ],
        "output": [
          "BOS",
          4,
          7,
          4,
          1
        ]
      },
      {
        "input": [
          "BOS",
          4,
          1,
          3,
          1
        ],
        "output": [
          "BOS",
          8,
          1,
          4,
          -1
        ]
      },
      {
        "input": [
          "BOS",
          3,
          4,
          2,
          4
        ],
        "output": [
          "BOS",
          6,
          7,
          2,
          5
        ]
      },
      {
        "input": [
          "BOS",
          3,
          4,
          0,
          3
        ],
        "output": [
          "BOS",
          6,
          7,
          -2,
          3
        ]
      },
      {
        "input": [
          "BOS",
          4,
          1,
          2,
          2
        ],
        "output": [
          "BOS",
          8,
          1,
          2,
          1
        ]
      }
    ],
    "is_categorical": true
  },
  "program": "values, *sops = sops; for sop in sops: values = rasp.SequenceMap(lambda x, y: (*x, y) if isinstance(x, tuple) else (x, y), values, sop); return rasp.Map(lambda args: f(*args), values)",
  "components": [
    {
      "id": "L0_MLP",
      "hook": "blocks.0.mlp.hook_post",
      "role": {
        "tag": "COMBINER",
        "note": "Builds an intermediate representation that packages multiple per-position inputs together so they can be processed as a single combined object downstream."
      },
      "rasp_vars": [
        "values_tuple_stage_1"
      ],
      "labels": [
        "sequence_map_3"
      ]
    },
    {
      "id": "L1_MLP",
      "hook": "blocks.1.mlp.hook_post",
      "role": {
        "tag": "COMBINER",
        "note": "Extends the combined per-position representation by incorporating the position index, forming the final set of arguments needed for the arithmetic step."
      },
      "rasp_vars": [
        "values_tuple_stage_2"
      ],
      "labels": [
        "sequence_map_2"
      ]
    },
    {
      "id": "L2_MLP",
      "hook": "blocks.2.mlp.hook_post",
      "role": {
        "tag": "MAPPER",
        "note": "Computes the final per-position arithmetic from the bundled arguments (equivalent to doubling the token value and subtracting the index)."
      },
      "rasp_vars": [
        "output"
      ],
      "labels": [
        "map_1"
      ]
    }
  ]
}