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

opus-mt-en-zh does not respect the end token #1694

Open
l3utterfly opened this issue May 11, 2024 · 0 comments
Open

opus-mt-en-zh does not respect the end token #1694

l3utterfly opened this issue May 11, 2024 · 0 comments

Comments

@l3utterfly
Copy link

Using the code here (but in c++): https://opennmt.net/CTranslate2/guides/opus_mt.html

auto translationOptions = ctranslate2::TranslationOptions();
translationOptions.beam_size = 1;
translationOptions.return_scores = false;

const std::vector<std::vector<std::string>> batch = {pieces};
const std::vector<ctranslate2::TranslationResult> results = translators[modelPathStr]->translate_batch(batch, translationOptions);

Translating something simple like "Hello", gives the chinese characters "你好" again and again (up to 256 times), which I believe is the max sequence length. Interestingly, translating "Hello, World!" gives the expected result.

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

1 participant