↓ 10 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
SpinQuant/eval_utils/modeling_llama.py:360
↓ 5 callersMethodconfigure(
self,
bits, perchannel=False, sym=True,
mse=False, norm=2.4, grid=100, maxshrink=
FlatQuant/flatquant/quant_utils.py:133
↓ 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
SpinQuant/train_utils/modeling_llama_quant.py:355
↓ 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)`,
SpinQuant/eval_utils/modeling_llama.py:59
↓ 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)`,
SpinQuant/train_utils/modeling_llama_quant.py:61