↓ 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
examples/qualcomm/oss_scripts/llama/model/static_llama.py:34
↓ 4 callersFunctionsmart_mask_updater(
n_updates: int,
atten_mask: AttentionMask,
pos,
k_caches,
v_caches,
new_k_caches,
examples/qualcomm/oss_scripts/llama/decoder_utils.py:340