candle-layer-norm

Crates.iocandle-layer-norm
lib.rscandle-layer-norm
version0.0.1
created_at2025-04-15 10:25:33.627577+00
updated_at2025-04-15 10:25:33.627577+00
descriptionLayer Norm layer for the candle ML framework.
homepagehttps://github.com/huggingface/candle-extensions/candle-layer-norm/
repository
max_upload_size
id1634257
size137,550
Nicolas Patry (Narsil)

documentation

https://docs.rs/candle-layer-norm

README

Candle Cuda Layer Norm

Layer Norm fused operation for the Candle ML framework.

This Layer was adapted from https://github.com/Dao-AILab/flash-attention/tree/main/csrc/layer_norm.

It implements fused dropout + residual + LayerNorm, building on Apex's FastLayerNorm.

Major changes:

  • Add residual.
  • Make it work for both pre-norm and post-norm architecture.
  • Support more hidden dimensions (all dimensions divisible by 8, up to 8192).
  • Implement RMSNorm as an option.
Commit count: 0

cargo fmt