Hugging Face Forums
Problem in dynamicCache: index -1 is out of bounds for dimension 0 with size 0 in cache_position[-1]
🤗Transformers
John6666
February 22, 2025, 2:22pm
2
It seems to also happen with StaticCache(). It’s similar to the following issue…
show post in topic
Related topics
Topic
Replies
Views
Activity
IndexError: index -1 is out of bounds for dimension 0 with size 0
🤗Transformers
3
58
November 7, 2025
Why i can't use or can't pass past_key_values = DynamicCache() into Llama 3 model
Intermediate
1
354
October 8, 2024
Outputs change if re-using KVCache (past_key_values) for model.forward and generation
🤗Transformers
5
408
January 22, 2025
Provide examples to model before inferencing and how to cache the examples
Beginners
0
24
March 5, 2025
How to cache common instruction prompt
🤗Transformers
16
2971
October 31, 2024