There is a minor bug where the cache does not check if is_eos is set, so the score for some text can already be set when _get_lm_score with is_eos=True is called. This leads to the score not including any other scoring logic for is_eos=True. This PR makes the LM cache use the text and the value of is_eos in the key to avoid this issue.
There is a minor bug where the cache does not check if is_eos is set, so the score for some text can already be set when _get_lm_score with is_eos=True is called. This leads to the score not including any other scoring logic for is_eos=True. This PR makes the LM cache use the text and the value of is_eos in the key to avoid this issue.