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

Can this project support num-beams in opus-mt model ? #1

Closed
svjack opened this issue Jan 27, 2021 · 5 comments
Closed

Can this project support num-beams in opus-mt model ? #1

svjack opened this issue Jan 27, 2021 · 5 comments

Comments

@svjack
Copy link

svjack commented Jan 27, 2021

I find similar project called ktrain support this.
located in
https://github.com/amaiya/ktrain/blob/5c9c6b333115be44433639c4bc4c091bd79ab65c/ktrain/text/translation/core.py
and have some accuracy measurement output to summarize the conclusion will more interesting.
Can multilingual sentence embedding can do some help ?

@nreimers
Copy link
Member

nreimers commented Jan 27, 2021

Yes, beam search is supported, by setting the beam_size parameter in the translate method:
https://colab.research.google.com/drive/1X47vgSiOphpxS5w_LPtjQgJmiSTNfRNC?usp=sharing#scrollTo=KNPWMo8rJ3Ws

By default, it uses a beam size of 5.

Accuracy measurements are on the way: I first need to create a good test set, on which the models were not trained. And then find a way to present the results in an efficient way.

@svjack
Copy link
Author

svjack commented Jan 27, 2021

Yes, beam search is supported, by setting the beam_size parameter in the translate method:
https://colab.research.google.com/drive/1X47vgSiOphpxS5w_LPtjQgJmiSTNfRNC?usp=sharing#scrollTo=KNPWMo8rJ3Ws

By default, it uses a beam size of 5.

Accuracy measurements are on the way: I first need to create a good test set, on which the models were not trained. And then find a way to present the results in an efficient way.

I find some framework provide lexicon validation on different beam search conclusion
to filter on conclusion , will this support in the future?

@nreimers
Copy link
Member

Is this implemented in huggingface transformers? Then I could add it.

I currently have no direct plan to add this feature. But pull requests adding this feature would be welcome :)

@svjack
Copy link
Author

svjack commented Jan 27, 2021

Is this implemented in huggingface transformers? Then I could add it.

I currently have no direct plan to add this feature. But pull requests adding this feature would be welcome :)

I think sockeye’s N-best translations(use reranker) and Lexical constraints may help with above discussion.
https://awslabs.github.io/sockeye/inference.html

@nreimers
Copy link
Member

nreimers commented Mar 17, 2021

All the options that huggingface is providing for the generate method can now be passed to the translate method (in the recent v1.1.0 release).

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