Antik Khan
Add annotations
3d3ae36
Raw
History Blame Contribute Delete
2.33 kB
{
"task": {
"id": "case_46",
"name": "decrement_by_1",
"summary": "Decrements each element in the sequence by 1.",
"examples": [
{
"input": [
"BOS",
2,
4,
2,
6,
4,
8,
6,
1,
3
],
"output": [
"BOS",
1,
3,
1,
5,
3,
7,
5,
0,
2
]
},
{
"input": [
"BOS",
4,
1,
7,
5,
1,
4,
0,
9,
5
],
"output": [
"BOS",
3,
0,
6,
4,
0,
3,
-1,
8,
4
]
},
{
"input": [
"BOS",
10,
10,
7,
4,
3,
7,
7,
2,
5
],
"output": [
"BOS",
9,
9,
6,
3,
2,
6,
6,
1,
4
]
},
{
"input": [
"BOS",
8,
0,
10,
10,
9,
2,
6,
3,
8
],
"output": [
"BOS",
7,
-1,
9,
9,
8,
1,
5,
2,
7
]
},
{
"input": [
"BOS",
6,
3,
10,
7,
4,
6,
9,
2,
6
],
"output": [
"BOS",
5,
2,
9,
6,
3,
5,
8,
1,
5
]
}
],
"is_categorical": true
},
"program": "return rasp.Map(lambda x: x - 1, rasp.tokens).named('decrement')",
"components": [
{
"id": "L0_MLP",
"hook": "blocks.0.mlp.hook_post",
"role": {
"tag": "MAPPER",
"note": "Adjusts each value by a fixed amount (subtracting 1) across the entire sequence."
},
"rasp_vars": [
"decrement"
],
"labels": [
"decrement_1"
]
}
]
}