Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely refactor injection code #16

Merged
merged 1 commit into from
Oct 12, 2023
Merged

Completely refactor injection code #16

merged 1 commit into from
Oct 12, 2023

Conversation

tomaarsen
Copy link
Owner

Hello!

Pull Request overview

  • Completely refactor injection code

Details

The injection is now done at the end of the regular from_pretrained call, and is even possible on the AutoModel... classes. This was not possible before, and was the big motivation for this refactor. With this change implemented, architectures that require trust_remote_code=True can also benefit from attention_sinks, such as Qwen.

This also helps a decent bit with code duplication.

  • Tom Aarsen

@tomaarsen tomaarsen merged commit e0ab568 into main Oct 12, 2023
@tomaarsen tomaarsen deleted the refactor/injection branch October 12, 2023 12:33
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.

None yet

1 participant