Skip to content

A little code modify to support newer version of transformer #15

@sysuyy

Description

@sysuyy

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
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions