Skip to content

Bug in processing of self.args.parallelism_config inside Trainer #42661

@quic-meetkuma

Description

@quic-meetkuma

System Info

transformers version: 5.0.0.dev0 (Added backend specific code only)
Platform: Linux-6.8.0-41-generic-x86_64-with-glibc2.39
Python version: 3.10.19
Huggingface_hub version: 1.0.0.rc6
Safetensors version: 0.6.2
Accelerate version: 1.10.1
Accelerate config: not found
DeepSpeed version: not installed
PyTorch version (accelerator?): 2.7.0+cpu (NA)
Using distributed or parallel set-up in script?: Not needed

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

No steps needed. It is a visible bug.

Expected behavior

When using accelerate>=1.10.1 with Trainer, the parallelism_config object inside self.args.parallelism_config is being overwritten during TP-only training. This behavior is incorrect because any user-provided values should take precedence and remain unchanged if they are explicitly set.

Reference:

if is_accelerate_available("1.10.1"):

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