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

de-en model needs a lot more memory than de-cs #69

Open
erickrf opened this issue Oct 18, 2022 · 2 comments
Open

de-en model needs a lot more memory than de-cs #69

erickrf opened this issue Oct 18, 2022 · 2 comments

Comments

@erickrf
Copy link

erickrf commented Oct 18, 2022

I have been using the de-en and de-cs model on the same dataset (a few hundred thousand texts), and noticed that the English model needs a lot more memory than the Czech one. I'm running on an A100 GPU (40 GB memory).

In practice, I ended up with a batch size for English smaller than half of the Czech batch, even though the model config says they are roughly the same size - the only difference being that actually the de-cs vocabulary is slightly larger.

On top of that, the English model gets the repeating nonsense subsequence issue a lot more often. I approximated that by a type to token ratio below 0.15, which gives 20 texts to Czech and around 70k in English. I don't see how this might relate to memory consumption but maybe there's something.

@jorgtied
Copy link
Member

What specific models were you using? Could it be that they have different parameter sizes, vocab sizes or something like that?

@erickrf
Copy link
Author

erickrf commented Jan 30, 2023

I loaded them with the transformers library. For Czech it was Helsinki-NLP/opus-mt-de-cs and for English Helsinki-NLP/opus-mt-de-en.

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

No branches or pull requests

2 participants