Qwen
Qwen copied to clipboard
position_ids not used
Hi,why the var position_ids calculated but not used :
if position_ids is None:
| position_ids = torch.arange( | past_length, | input_shape[-1] + past_length, | dtype=torch.long, | device=device, | ) | position_ids = position_ids.unsqueeze(0).view(-1, input_shape[-1])
Thanks!
I wanted to ask just the same question)
For example, in Llama and Falcon, position_ids
is used in apply_rotary_pos_emb function.
However, Qwen uses another version of apply_rotary_pos_emb, which is without position_ids
...
Hello, I think it should be safe to remove that part of code. position_ids
is no longer needed for this implementation.
We are in the process of cleaning up code that does not seem meaningful anymore. But as you know, it is a tricky job... so no time guarantee.
Best,