|
layer.self_attn.rotary_emb = rope_class(**layer_rope_args) |
add the following two lines can adapt the code to newer version of transformer
if model.model.rotary_emb is not None:
model.model.rotary_emb = rope_class(**rope_args)
Due to changes in the organization of the file: modeling_llama.py

LongRoPE/rope/__init__.py
Line 49 in c9e56aa
add the following two lines can adapt the code to newer version of transformer
if model.model.rotary_emb is not None:
model.model.rotary_emb = rope_class(**rope_args)
Due to changes in the organization of the file: modeling_llama.py
