Cache the hidden_input value for massive speed improvements with a large number of tokens