Tweak how we avoid memoisation in token generation