 class="nn">torch.nn</span> <span class="k">as</span> <span class="nn">nn</span>
<span class="kn">from</span> <span class="nn">torch</span> <span class="kn">import</span> <span class="n">Size</span><span class="p">,</span> <span class="n">Tensor</span>

<span class="kn">from</span> <span class="nn">parallelformers.parallel.slicing</span> <span class="kn">import</span> <span class="n">TensorSlicer</span>
<span class="kn">from</span> <span class="nn">parallelformers.policies.base</span> <span class="kn">impor