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

Simplify the wrapper API: Move all non-tensor arguments from forward to begin_forward #443

Closed

Conversation

merrymercy
Copy link

Currently, there is duplication in the arguments of forward and begin_forward. This PR moves all non-tensor arguments from forward to begin_forward. The arguments will be cached in the wrapper and reused for all later forward.

This PR only changes decode.py. If it looks good, I will proceed to update prefill.py.
I think it might be better to handle this on the C++ side, but I will limit this PR to Python.

@merrymercy merrymercy marked this pull request as draft August 13, 2024 11:00
@merrymercy merrymercy changed the title Simplify wrapper API Simplify the wrapper API: Move all non-tensor arguments from forward to begin_forward Aug 13, 2024
@merrymercy
Copy link
Author

It seems #466 already fixed this. I will close this .

@merrymercy merrymercy closed this Aug 25, 2024
@merrymercy merrymercy deleted the pr-simplify-wrapper-api branch August 25, 2024 17:09
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.

1 participant