Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add support for length label smoothing #1308

Closed
wants to merge 1 commit into from

Conversation

AkshatSh
Copy link

@AkshatSh AkshatSh commented Apr 8, 2020

Summary:
Adding support for length label smoothing, which from prior experiments improves NAR performance (reducing overfitting on the length prediction task).

This diff however runs into an interesting issue with CUDA OOM and throwing an exception here https://fburl.com/diffusion/akkh752n.

I believe this is because with label smoothing and length beam size of 5, there is a chance that max target length is the predicted length size, which can cause OOM issues. Reducing max target lengths is critical to helping with this.

Another issue is the exception being thrown. This is because of an off by one issue in conv_encoder.max_target_lengths vs conv_decoder.max_target_lengths. Instead of enforcing consistency this updates to make sure the predicted lengths (conv_encoder) are less than or equal to the (conv_decoder) ones.

Reviewed By: arbabu123

Differential Revision: D20865186

Summary:
Adding support for length label smoothing, which from prior experiments improves NAR performance (reducing overfitting on the length prediction task).

This diff however runs into an interesting issue with CUDA OOM and throwing an exception here https://fburl.com/diffusion/akkh752n.

I believe this is because with label smoothing and length beam size of 5, there is a chance that max target length is the predicted length size, which can cause OOM issues. Reducing max target lengths is critical to helping with this.

Another issue is the exception being thrown. This is because of an off by one issue in conv_encoder.max_target_lengths vs conv_decoder.max_target_lengths. Instead of enforcing consistency this updates to make sure the predicted lengths (conv_encoder) are less than or equal to the (conv_decoder) ones.

Reviewed By: arbabu123

Differential Revision: D20865186

fbshipit-source-id: dc8e5816c4b31d1adf123179b08cac3667655989
@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels Apr 8, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D20865186

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 9548c94.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants