Skip to content

NLLB punctuation normalization stops after an out-of-memory retry #387

Description

@ddaspit

HuggingFaceNmtEngine stops normalizing punctuation for NLLB models after it recovers from a CUDA out-of-memory error. It happens when translation runs out of memory and oom_batch_size_backoff_mult is below 1. Every segment the engine translates after that skips Moses punctuation normalization.

Affected: HuggingFaceNmtEngine.translate_n_batch in machine/translation/huggingface/hugging_face_nmt_engine.py.

Versions: main and #363.

Expected: the rebuilt pipeline normalizes punctuation the same way as the original one.

Actual: the rebuilt pipeline has no MosesPunctNormalizer.

Cause: the constructor passes mpn=self._mpn to the pipeline. The pipeline rebuilt after an out-of-memory error does not.

Test: no test covers the out-of-memory rebuild.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions