Skip to content

improvement of PositionEmbeddingPosition #2192

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

Closed
wants to merge 8 commits into from

Conversation

pass-lin
Copy link
Contributor

@pass-lin pass-lin commented Apr 2, 2025

PositionEmbedding is widely used in many models in keras_hub.
But he has a problem, which is that it will limit the input length. And in actual use, it seems to be a very troublesome thing to want to change this length. I hope it can be improved.
Specifically, I hope to add a calculation method. When the input length is greater than the preset sequence_length, the calculation method is as follows:

Image

With proper handling, this is lossless. The part less than sequence_length length is exactly the same as the original

@pass-lin pass-lin closed this Apr 3, 2025
@pass-lin pass-lin reopened this Apr 3, 2025
@pass-lin
Copy link
Contributor Author

@mattdangerw May you take a review?

@divyashreepathihalli divyashreepathihalli added the kokoro:force-run Runs Tests on GPU label Apr 15, 2025
@kokoro-team kokoro-team removed the kokoro:force-run Runs Tests on GPU label Apr 15, 2025
@pass-lin
Copy link
Contributor Author

pass-lin commented Apr 15, 2025

@divyashreepathihalli It seems to have run out of time.
How to solve this problem

@pass-lin
Copy link
Contributor Author

@divyashreepathihalli
Could you please help me check what's going on?

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.

3 participants