Skip to content

add StaticLayer.crop() to match DynamicLayer API#44893

Open
ai-man-codes wants to merge 2 commits intohuggingface:mainfrom
ai-man-codes:fix/static-layer-crop
Open

add StaticLayer.crop() to match DynamicLayer API#44893
ai-man-codes wants to merge 2 commits intohuggingface:mainfrom
ai-man-codes:fix/static-layer-crop

Conversation

@ai-man-codes
Copy link

What does this PR do?

Fixes #43011

StaticLayer was missing a .crop(max_length) method, so implemented that according to the discussion of the issue.

Added StaticLayer.crop(max_length) to match the API of StaticCache with the DynamicCache

Before submitting

@ai-man-codes
Copy link
Author

@zucchini-nlp I implemented StaticLayer.crop() method, can you review if this is implemented correctly? Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StaticLayer cache layer to implement .crop(seq_len) to match API of DynamicLayer

1 participant