MCPcopy Create free account
hub / github.com/THUDM/LongWriter / swiglu

Method swiglu

train/patch/modeling_chatglm.py:391–393  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

389 )
390
391 def swiglu(x):
392 x = torch.chunk(x, 2, dim=-1)
393 return F.silu(x[0]) * x[1]
394
395 self.activation_func = swiglu
396

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected