Skip to content

Conversation

@marksgraham
Copy link
Contributor

Towards #6676 .

Description

Adds a simple decoder-only transformer architecture.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
@marksgraham marksgraham self-assigned this Dec 7, 2023
@marksgraham marksgraham requested review from KumoLiu and Nic-Ma December 7, 2023 13:21
Copy link
Contributor

@KumoLiu KumoLiu left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! Overall looks good to me.

Could you please help add more test?
Similarly like this, multiple loops cover the most of the situation. This makes it easier to find bugs later on when refactoring. At the moment, it appears that there is only one hardcoded case.

for dropout_rate in np.linspace(0, 1, 4):
for hidden_size in [360, 480, 600, 768]:
for num_heads in [4, 6, 8, 12]:
test_case = [
{"hidden_size": hidden_size, "num_heads": num_heads, "dropout_rate": dropout_rate},
(2, 512, hidden_size),
(2, 512, hidden_size),
]

Signed-off-by: Mark Graham <markgraham539@gmail.com>
Signed-off-by: Mark Graham <markgraham539@gmail.com>
@KumoLiu
Copy link
Contributor

KumoLiu commented Dec 11, 2023

/build

@atbenmurray
Copy link
Contributor

Taking a look today

@marksgraham marksgraham merged commit c61c6ac into Project-MONAI:gen-ai-dev Dec 11, 2023
marksgraham added a commit to marksgraham/MONAI that referenced this pull request Jan 30, 2024
Towards Project-MONAI#6676  .

### Description

Adds a simple decoder-only transformer architecture.

### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.

---------

Signed-off-by: Mark Graham <markgraham539@gmail.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.

4 participants