DeepSpeed icon indicating copy to clipboard operation
DeepSpeed copied to clipboard

llama2-13b-tp8 long sentence input error.[BUG]

Open Jasen2201 opened this issue 2 years ago • 2 comments

import mii path = "path/to/llama2_13b_huggingface_path" pipe = mii.pipeline(path, max_length=133120) prompt = "test "*10000 response = pipe(prompt, max_new_tokens=512, max_length=133120, do_sample=False)

python3.9/site-packages/deepspeed/inference/v2/ragged/sequence_descriptor.py", line 258, in extend_kv_cache shadow_alloc_group[cur_blocks:cur_blocks + new_blocks].copy_(new_group_ids) RuntimeError: The size of tensor a (8) must match the size of tensor b (12) at non-singleton dimension 0 I gebug the code find: len(shadow_alloc_group) = 32 len(new_group_ids) = 12 cur_blocks = 24 new_blocks = 12

Jasen2201 avatar Dec 21 '23 03:12 Jasen2201

Hi @zhyajie I'm wondering if this is a problem with the prompt length. If you run with just a prompt of "test" does that succeed?

mrwyattii avatar Dec 21 '23 18:12 mrwyattii

Hi @zhyajie I'm wondering if this is a problem with the prompt length. If you run with just a prompt of "test" does that succeed?

Yes, I found that when the prompt length is less than 8192, the inference process is OK, but when it exceeds 8192, the above error will occur.

Jasen2201 avatar Dec 22 '23 02:12 Jasen2201