Or more like,
x = tokenize(input)
i = 0
do {
finish, x = layers(x)
} while(!finish && i++ < t_max);
output = lm_head(x)