Skip to content

[QnA]: Why cos and sin is expected to be hdim, not hdim//2? #844

@tjtanaa

Description

@tjtanaa

I have a question regarding to the qwen2_vl MRope. From my understanding is as follows:

full_cos = torch.cat([cos_halfdim, cos_halfdim], dim=-1)
full_sin = torch.cat([sin_halfdim, sin_halfdim], dim=-1)

However from the unit tests and the code here,

def _triton_qwen2vl_mrope(

the cos and sin are full_cos and full_sin instead. Is there a reason to not just pass half of the cos and sin to save memory movement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions