Skip to content

Translations differ #546

Description

@anderleich

Hi,

I've recently realized that my converted OpenNMT-py model is not returning the same translation for a sentence when compared to the original OpenNMT-py model. Model architecture is the default base Transformer. I'm using Ctranslate2 version 1.18.1.

It seems Ctranslate2 model is merging different hypotheses into the final result, thus, inserting some word repetitions and synonyms in the translation.

Example result:

OpenNMT-py: 2013ko abuztutik aurrera, ikertzaile txinatarren zenbait taldek instalazioetan egindako CRISPR bidezko lehen edizio arrakastatsuak dokumentatu zituzten.

Ctranslate2: 2013ko abuztutik aurrera, Txinako zenbait ikertzailbatzuek instalazioetan egindako CRISPR bidezko lehen edizio genetiko arrakastatsuak dokumentatu zituzten.

In the second case it should be either zenbait ikertzailek or ikertzaile batzuek, but it is combining both of them, even truncating some words.

This is the configuration file for the server:

{
    "models_root": "/absolute/path/to/model/dir/",
    "models": [
        {
            "id": 100,
            "ct2_model": "BEST_MODEL.pt_ctrans",
            "model": "BEST_MODEL.pt",
            "timeout": 600,
            "on_timeout": "to_cpu",
            "load": true,
            "opt": {
                "gpu": 0,
                "batch_size": 64,
                "beam_size": 5,
                "max_length": 200
            },
            "tokenizer": {
                "type": "pyonmttok",
                "mode": "conservative",
                "params": {
                    "bpe_model_path": "/absolute/path/codes.bpe",
                    "joiner": "\uffed",
                    "joiner_annotate": true,
                    "case_markup": true
                }
            }
        }
    ]
}

Is this a known issue?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions