lmflow.utils.position_interpolation.llama_rope_scaled_monkey_patch#

Classes#

Functions#

replace_llama_with_condense(pi_ratio, ntk_ratio)

Module Contents#

class lmflow.utils.position_interpolation.llama_rope_scaled_monkey_patch.CondenseRotaryEmbedding(dim, pi_ratio, ntk_ratio, max_position_embeddings=2048, base=10000, device=None)[source]#

Bases: torch.nn.Module

ntk_ratio[source]#
pi_ratio[source]#
max_seq_len_cached[source]#
forward(x, seq_len=None)[source]#
lmflow.utils.position_interpolation.llama_rope_scaled_monkey_patch.replace_llama_with_condense(pi_ratio, ntk_ratio)[source]#