There is an error that results from the usage of both tuples and DynamicCaches:
line 62, in _forward_with_kvcache
self._past_key_values = self._past_key_values + (outputs.past_key_values,)
TypeError: unsupported operand type(s) for +: 'DynamicCache' and 'tuple'
This error occurs when using Llama2 models from HuggingFace, but is resolved with the pull request I've made.