an>
<span class="sd">        model (nn.Module): Huggingface pre-trained transformer model</span>
<span class="sd">        mp_group (Any): process group for model parallelism</span>
<span class="sd">        fp16: (bool): Whether use FP16 or not.</span>
<span class="sd">        num_gpus (int): number of GPUs</span>
<span class="sd">        custom_policies (Union[Policy, List[Policy]]): custom policy object (default=None)</span>
<span class="sd">    &quot;&quot;&quot;</span>

    <span class="k">def</span> <sp