Skip to content

Multi-GPU DDP support for FastSentenceTransformer? #4680

Closed

Description

@asingh-star

Hi team! 🦥

I'm fine-tuning embeddinggemma-300m with LoRA using FastSentenceTransformer on 8x H200 GPUs with torchrun (DDP).
Training fails with a "parameter marked as ready twice" error related to gradient checkpointing + DDP.

I saw the recent multi-GPU DDP docs - does DDP support extend to FastSentenceTransformer as well, or is it currently limited to language models? If not yet supported, is there a timeline for multi-GPU support for sentence transformer fine-tuning?

Thanks!

Activity

  1. rolandtannous commented on Mar 28, 2026

    @rolandtannous
    Contributor

    @Etherll any thoughts on this ? thanks

  2. danielhanchen commented on Oct 13, 2026

    @danielhanchen
    Member

    Fixed! Sorry on the delay. Under DDP, gradient checkpointing for EmbeddingGemma still ran in re-entrant mode, so each LoRA weight's gradient hook fired twice per step and DDP raised "marked as ready twice". This was fixed in #4240, and EmbeddingGemma LoRA with use_gradient_checkpointing = "unsloth" now trains under torchrun (checked on 2x B200 and Kaggle 2x T4). The same fix for encoder models such as all-mpnet-base-v2 is in #13639.
    To update: uv pip install --upgrade unsloth unsloth_zoo --force-reinstall --no-cache-dir (if it's not in the current release yet it'll be in the next one). Reopen if it still happens.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions