↓ 1 callersMethodpost_process_result(self, query: Union[str, list], result_list, score_list, num)
tool/FlashRAG/flashrag/retriever/retriever.py:731
↓ 1 callersFunctionprepare_4d_attention_maskr""" Expands the attention mask with indices from (batch_size, seq_len) to (batch_size, 1, seq_len, seq_len), while handles packed sequences a
train/LLaMA-Factory/src/llamafactory/data/collator.py:40
↓ 1 callersMethodreorder batch_search: original result like: [[bm25-q1-d1, bm25-q1-d2],[bm25-q2-d1, bm25-q2-d2], [e5-q1-d1, e5-q1-d2], [e5-q2-d1, e5-q2-d2]]
tool/FlashRAG/flashrag/retriever/retriever.py:705
↓ 1 callersFunctionreset_ring_attn_position_ids Calculate position ids for packed_seq_ids[start:end]. For example, if the packed_seq_lens is [3, 2, 4, 1], start=2, end=8, the position i
train/R3RAG_OpenRLHF/openrlhf/models/ring_attn_utils.py:18