[Perf] Reduce peak memory usage of llama (#10339)
Signed-off-by: andoorve <37849411+andoorve@users.noreply.github.com>
This commit is contained in:
parent
4a18fd14ba
commit
b2e0ad3b59
@ -90,8 +90,8 @@ class LlamaMLP(nn.Module):
|
|||||||
self.act_fn = SiluAndMul()
|
self.act_fn = SiluAndMul()
|
||||||
|
|
||||||
def forward(self, x):
|
def forward(self, x):
|
||||||
gate_up, _ = self.gate_up_proj(x)
|
x, _ = self.gate_up_proj(x)
|
||||||
x = self.act_fn(gate_up)
|
x = self.act_fn(x)
|
||||||
x, _ = self.down_proj(x)
|
x, _ = self.down_proj(x)
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user