Skip to content

Convert gradient accumulation with Accelerate #179

@cridin1

Description

@cridin1

In the train function, inside run.py:

            if args.gradient_accumulation_steps > 1:
                loss = loss / args.gradient_accumulation_steps

For details see the link:
https://huggingface.co/docs/accelerate/v0.11.0/en/gradient_accumulation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions