wcode-block" id="TensorReplacer"><a class="viewcode-back" href="../../../parallel/Replacing.html#parallelformers.parallel.replacing.TensorReplacer">[docs]</a><span class="k">class</span> <span class="nc">TensorReplacer</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
    <span class="sa">r</span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Replace original Huggingface&#39;s layer into Megatron tensor sliced layer.</span>

<span class="sd">    Args:</sp