Skip to content

Tokenizer clean_up_tokenization_spaces #65

@Nickwiz

Description

@Nickwiz

FYI

Changes in transformers tokenizer gives deprecation warning.

/xxx/dltranslate/lib/python3.12/site-packages/transformers/tokenization_utils_base.py:1601:
FutureWarning: clean_up_tokenization_spaces was not set. It will be set
to True by default. This behavior will be depracted in transformers
v4.45, and will be then set to False by default. For more details check
this issue: huggingface/transformers#31884

Something like this can be used:

mt = dlt.TranslationModel(
        tokenizer_options = {
            "clean_up_tokenization_spaces": True # Add this
        }
)

Have not found any difference in result by using True vs False, but then again I just started looking at this project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions