Skip to content

TypeError: forward() got an unexpected keyword argument 'cache_position' #525

@sanderland

Description

@sanderland

🐛 Describe the bug

When using generate, the above error is raised. In the source I can indeed see that forward() does not take such an argument or ignore unexpected extra args.

Versions

Python 3.9.2
ai2-olmo==0.2.5
transformers==4.39.1
torch==2.2.1
(etc)

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugAn issue about a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions