Skip to content

Add Padding Strategy to DataCollatorForLanguageModeling #40032

@rjgleaton

Description

@rjgleaton

Feature request

Add the ability to specify a padding strategy when using DataCollatorForLanguageModeling

Motivation

This is a minor QOL enhancement that makes the collator more consistent with others in the library. The main use case would probably be padding to max length to make memory usage more stable during training.

Your contribution

I'll submit a PR in just a bit to add this :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions