I found that when I build a model like
    model = nn.Sequential(*[nn.Linear(2000, 2000).to(rank) for _ in range(20)])
    torch.cuda.synchronize()
    print_peak_memory("Max memory allocated after creating local model", rank)

    # construct DDP model
    ddp_model = DDP(model, device_ids=[rank])
    print_peak_memory("Max memory allocated after creating DDP", rank)

the memory will definitely double. And this is quite unacceptable when training a large-scale model. Are there any solutions to help with this?
PS: the code is from ZeRO 2