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

Two changes to reduce the sequence length passed to genienlp #692

Merged
merged 2 commits into from
Jul 15, 2021

Conversation

gcampax
Copy link
Contributor

@gcampax gcampax commented Jul 14, 2021

The recently approved movie skill returns the full list of actors to all movies it returns. This can be quite a long list, and it's too long to encode to BART, even if every actor is a single GENERIC_ENTITY_org.themoviedb:actor_<n> token (which is split into ENTITY actor <n> before BART tokenization).

To avoid that, we reduce the number of history items encoded in the context (which also helps the model by giving a stronger recency bias) and we cut the length of array values in the result.

This was caught in the staging environment which keeps going down (stanford-oval/genienlp#174)

@gcampax gcampax added bug Something isn't working dialogue-agent Issues with the dialogue agent at runtime (not state machine related) training Issues with dataset generation, augmentation, training labels Jul 14, 2021
@gcampax gcampax requested a review from s-jse July 14, 2021 21:43
If an API returns a very long array, we need to trim it before
passing it to the model, or we'll exceed the maximum sequence length.
Copy link
Member

@s-jse s-jse left a comment

Choose a reason for hiding this comment

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

Looks good to me.
Would be interesting to see the difference (if any) this makes in terms of accuracy as well.

@gcampax gcampax force-pushed the wip/reduce-sequence-length branch from 1723c64 to b1b2b41 Compare July 15, 2021 00:32
@gcampax gcampax merged commit 4ab3aa6 into master Jul 15, 2021
@gcampax gcampax deleted the wip/reduce-sequence-length branch July 18, 2021 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dialogue-agent Issues with the dialogue agent at runtime (not state machine related) training Issues with dataset generation, augmentation, training
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants