mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-02 04:15:26 +00:00
* [chatgpt]fix train_rm bug with lora * [chatgpt]support colossalai strategy to train rm * fix pre-commit * fix pre-commit 2 * [chatgpt]fix rm eval typo * fix rm eval * fix pre commit
6 lines
121 B
Python
6 lines
121 B
Python
import torch.distributed as dist
|
|
|
|
|
|
def is_rank_0() -> bool:
|
|
return not dist.is_initialized() or dist.get_rank() == 0
|