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

Add dropout to Transformer implementation #1

Open
5 tasks
iislucas opened this issue Jun 16, 2023 · 1 comment
Open
5 tasks

Add dropout to Transformer implementation #1

iislucas opened this issue Jun 16, 2023 · 1 comment
Labels
enhancement New feature or request project:TTP For the Tiny Transformer Playground

Comments

@iislucas
Copy link
Collaborator

Transformer implementation: https://github.com/PAIR-code/tiny-transformers/blob/main/animated-transformer/src/lib/transformer/transformer_gtensor.ts

Idea: provide a boolean configuration variable to enable/disable dropout.
e.g. like positional encodings: https://github.com/PAIR-code/tiny-transformers/blob/main/animated-transformer/src/lib/transformer/transformer_gtensor.ts#LL59C8-L59C27

TODOs:

  • identify what drop should be applied to in the transformer. (starting point: T5 implementation: https://arxiv.org/abs/1910.10683 and earlier attention is all you need paper: https://arxiv.org/pdf/1706.03762.pdf )
  • Add flags to control for dropout, set default values.
  • Make the flags turn on/off dropout.
  • Add a small test
  • See what happens when you apply it on models of a few different sizes.

Context:

@iislucas iislucas added enhancement New feature or request project:TTP For the Tiny Transformer Playground labels Jun 16, 2023
@1wheel 1wheel changed the title Add drop to Transformer implementation Add dropout to Transformer implementation Jun 16, 2023
@1wheel
Copy link
Collaborator

1wheel commented Jun 16, 2023

fwiw here's the haiku implementation that Asma and I have been working off of.

We've mostly been turning it off — I think it leads to redundancy/backup circuits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request project:TTP For the Tiny Transformer Playground
Projects
None yet
Development

No branches or pull requests

2 participants