Update Transformers.js example code

#4
by Xenova HF staff - opened
No description provided.
Nomic AI org
edited Feb 14

I think we need a F.layer_norm equivalent before the slicing and norming. Is that possible in js?

Oh yes, good catch! It is possible in JS, but I would need to update the library to add the Tensor.layer_norm function.

I'll make a PR tonight for it, but it might be worth merging in the meantime (since the results are not dramatically different and the previous code snippet is still using v1).

Nomic AI org

Will do, please open that PR once you do have the update :)

zpn changed pull request status to merged

Sounds good!

Transformers.js PR is here, and I will open a follow-up PR once we release the next version.

Nomic AI org

awesome!!

Sign up or log in to comment