Skip to content

Add Swiglu activation#634

Open
seanmor5 wants to merge 2 commits into
mainfrom
sm-swiglu
Open

Add Swiglu activation#634
seanmor5 wants to merge 2 commits into
mainfrom
sm-swiglu

Conversation

@seanmor5

Copy link
Copy Markdown
Contributor

This is fairly common in transformer implementations

Comment thread lib/axon/activations.ex
defn swiglu(x, opts \\ []) do
opts = keyword!(opts, axis: -1)
{a, b} = split_halves(x, opts[:axis])
silu(a) * b

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seanmor5 how about adding our first Nx.block here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants