candle icon indicating copy to clipboard operation
candle copied to clipboard

candle-onnx: Implement layer normalization operator

Open BrunoSienkiewicz opened this issue 8 months ago • 4 comments

Added Layer Normalization operator with tests. Related issue: https://github.com/huggingface/candle/issues/2849

BrunoSienkiewicz avatar Apr 24 '25 15:04 BrunoSienkiewicz

Why not using LayerNorm from candle-nn ?

Or that is a different thing ? (I'm not that familiar with ml things)

A2va avatar Apr 24 '25 19:04 A2va

Why not using LayerNorm from candle-nn ?

Or that is a different thing ? (I'm not that familiar with ml things)

Thank you for your comment. Honestly I didn't see the implementation in candle-nn, maybe it can be used in this case. However I see difference in ONNX version of LayerNorm, that is additional axis parameter. I will mark this PR as draft until i clear this out.

BrunoSienkiewicz avatar Apr 24 '25 20:04 BrunoSienkiewicz

I have changed the implementation to use built-in candle-nn layer normalization. All tests are passing so I think everything should be alright with this approach.

BrunoSienkiewicz avatar Apr 26 '25 19:04 BrunoSienkiewicz

Curious if there are any updates here; I just ran into this issue when trying to integrate candle-onnx into my application.

vorporeal avatar Jul 29 '25 19:07 vorporeal