未验证 提交 b7e1010b 编写于 作者: C Connor Holmes 提交者: GitHub

Missing strided copy for gated MLP (#3788)

Co-authored-by: NAmmar Ahmad Awan <ammar.awan@microsoft.com>
Co-authored-by: NJeff Rasley <jerasley@microsoft.com>
Co-authored-by: NLogan Adams <114770087+loadams@users.noreply.github.com>
上级 b4a2c0af
......@@ -48,7 +48,14 @@ class HybridGatedMLPContainer(HybridEngineContainer):
int8=reversed_dim,
allocate_tensor=reversed_dim) if src is not None else None
else:
super().mlp_inter_mp(mp_replace)
self.module.mlp.inter_w = mp_replace.strided_copy(self.module.mlp.inter_w,
self._h4h_w,
num_splits=2,
int8=reversed_dim)
self.module.mlp.inter_b = mp_replace.strided_copy(self.module.mlp.inter_b,
self._h4h_b,
num_splits=2,
int8=reversed_dim)
def release_mlp(self):
super().release_mlp()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册