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

[gpt2bb spec] TransformerDecoder #7842

Merged
merged 15 commits into from
Jul 24, 2023

Conversation

pforderique
Copy link
Contributor

@pforderique pforderique commented Jul 13, 2023

Adds the spec for the TransformerDecoder including any dependent layers.

  • Add spec for EinsumDense
  • Add spec for multi-head attention
  • Add spec for cached multi-head attention
  • Add spec for TransformerDecoder

@pforderique pforderique marked this pull request as ready for review July 14, 2023 01:06
tfjs-layers/src/layers/nlp/einsum_dense.ts Outdated Show resolved Hide resolved
/**
* Query `Tensor` of shape `(B, T, dim)`.
*/

Copy link
Member

Choose a reason for hiding this comment

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

Missing query?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review! This was done purposely since I'm using query as technically the first argument in call (just renamed inputs to query here), but wanted to add this spec about it somewhere. This pattern happens in other layers too. Is there another way I can include this query doc?

I didn't want to include query here and then just have an unused first parameter to call. Let me know what you think - thanks!

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

@mattsoulanille
Copy link
Member

@Linchenn Please take a look when you get a chance. Thanks!

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 97ba3ed into tensorflow:master Jul 24, 2023
2 checks passed
@pforderique pforderique deleted the spec-transformer branch July 24, 2023 14:08
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