output = apply_rotary_emb(tensor_, cos, sin).type_as(tensor) return output4 changes: 2 additions & 2 deletions 4 src/transformers/models/qwen2_5_vl/modular_qwen2_5_vl.py Original file line numberDiff line numberDiff line change
定义apply_rotary_pos_emb函数: 该函数接受两个参数:query_layer和rotary_pos_emb。 query_layer的形状通常为[seq_len, batch_size, num_heads, head_dim]。 rotary_pos_emb的形状通常为[seq_len, num_heads, head_dim // 2, 2],其中2代表复数的实部和虚部。 在函数内部实现旋转位置嵌入的逻辑: 首先...
torch.onnx.export (dynamo=False) fails with uninformative error when exporting apply_rotary_pos_emb/repeat_interleave #147296 Sign in to view logs Summary Jobs assign Run details Usage Workflow file Triggered via issue February 11, 2025 20:13 xenova commented on #145100 664550e Status Succ...
Fix NameError and typo in ApplyRotaryEmbQKV_ (Dao-AILab#569) Browse files main crowsonkb committed Sep 25, 2023 Verified 1 parent 0a1d03c commit 4c8ff91 Showing 1 changed file with 3 additions and 3 deletions. Whitespace Ignore whitespace Split Unified 6 changes: 3 additions & ...