You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multi-GPU DDP support for FastSentenceTransformer? #4680
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?
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.
Activity
rolandtannous commentedon Mar 28, 2026
@Etherll any thoughts on this ? thanks
danielhanchen commentedon Oct 13, 2026
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.FastSentenceTransformer: non-reentrant gradient checkpointing under D…