↓ 7 callersFunctionrepeat_kv This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
src/custom/custom_modeling_mistral.py:165
↓ 4 callersFunctionrepeat_kv This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
src/custom/custom_modeling_llama.py:329
↓ 2 callersFunction_prepare_4d_causal_attention_mask_with_cache_position Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_length)`,
src/custom/custom_modeling_llama.py:73
↓ 1 callersMethodget_sorted_docs(self, query, retrieval_doc_pool, return_per_doc_results=False, prompt_prefix='', order='desc')
src/in_context_reranker.py:304