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

[gpt2pre 3] Preprocessor Layer #7794

Merged
merged 13 commits into from
Jul 18, 2023
Merged

Conversation

pforderique
Copy link
Contributor

@pforderique pforderique commented Jun 30, 2023

Implements the base layer for processor layers, such as the GPT2 Preprocessor layer.

Update:
Some methods were left unimplemented and are pending discussion
Based on discussion with @mattsoulanille, presets was removed, and fromConfig and getConfig was implemented instead.

Copy link
Member

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, but can we have a simple test for this where it loads either a fake tokenizer (which you define and register in the test code) or the BytePairTokenizer? The reason for this is because it has a non-trivial fromConfig function that initializes an additional layer.

Copy link
Member

@mattsoulanille mattsoulanille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@Linchenn Linchenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pforderique pforderique merged commit 91d07ba into tensorflow:master Jul 18, 2023
2 checks passed
@pforderique pforderique deleted the preprocessor branch July 18, 2023 18:51
Dedongala added a commit that referenced this pull request Jul 18, 2023
* [gpt2pre 3] Preprocessor Layer (#7794)

* Add Preprocessor layer

* Remove uneeded args

* Use LayerArgs

* Remove import from src

* Add fromConfig method

* Serialize tokenizer properly

* Add test cases for preprocessor

* Preprocessor tests with no set tokenizer

---------

Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>

* Remove npm proxy for @tensorflow scoped packages

See #7557

---------

Co-authored-by: Piero F Orderique <45519489+pforderique@users.noreply.github.com>
Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
Co-authored-by: Matthew Soulanille <msoulanille@google.com>
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

3 participants