Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error happened #72

Open
ForrestPi opened this issue Dec 20, 2023 · 2 comments
Open

Error happened #72

ForrestPi opened this issue Dec 20, 2023 · 2 comments

Comments

@ForrestPi
Copy link

when CUDA_VISIBLE_DEVICES=0 python examples/run_streaming_llama.py --enable_streaming

File "/data0/XXX/nlp/streaming-llm/streaming_llm/pos_shift/modify_llama.py", line 87, in llama_pos_shift_attention_forward
kv_seq_len += past_key_value[0].shape[-2]
File "/home/XXX/anaconda3/envs/llm/lib/python3.9/site-packages/transformers/cache_utils.py", line 78, in getitem
raise KeyError(f"Cache only has {len(self)} layers, attempted to access layer with index {layer_idx}")
KeyError: 'Cache only has 0 layers, attempted to access layer with index 0'

@gjm441
Copy link

gjm441 commented Feb 3, 2024

same error. Have you solve it?

@gjm441
Copy link

gjm441 commented Feb 3, 2024

same error. Have you solve it?

I have mad it. Use transformers=4.33.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants