定义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代表复数的实部和虚部。 在函数内部实现旋转位置嵌入的逻辑: 首先...
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX. - Fix bug in apply_rotary_pos_emb_flashatt: in Qwen2-5-VL (#36065) · huggingface/transformers@014047e
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...
key = self.apply_rotary_pos_emb(query, key, freqs_cos, freqs_sin, batch_valid_length) ^ (See file '/data/jenkins_workspace/TDT_deployment/MindFormers_Test/cases/llama2/13b/infer/test_mf_llama2_13b_infer_alpaca_batch_incremental_1p_0001/rank_0/om/analyze_fail.ir' for more details. Ge...
void apply_rope_pos_ids(torch::Tensor q, torch::Tensor k, torch::Tensor q_rope, torch::Tensor k_rope, torch::Tensor pos_ids, bool interleave, float rope_scale, float rope_theta); torch::Tensor k_rope, torch::Tensor pos_ids, unsigned int rotary_dim, bool interleave, float rope_scal...
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 & ...