2022-12-09 07:40:13 +08:00
|
|
|
This CUDA extension implements fused dropout + residual + LayerNorm, building on
|
2022-11-14 13:52:00 +08:00
|
|
|
Apex's [FastLayerNorm](https://github.com/NVIDIA/apex/tree/master/apex/contrib/layer_norm).
|
2023-03-30 06:59:36 +08:00
|
|
|
Major changes:
|
|
|
|
|
- Add dropout and 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.
|
|
|
|
|
- Support layer norm with parallel residual (e.g., GPT-J, GPT-NeoX, PaLM).
|
2022-11-15 23:10:25 +08:00
|
|
|
|
2023-03-30 06:59:36 +08:00
|
|
|
If you want to use it for dimensions larger than 8k, please file an issue.
|
2022-11-29 09:31:19 +08:00
|
|
|
|
2022-12-09 07:40:13 +08:00
|
|
|
This extension has only been tested on A100s.
|
2022-11-15 23:10:25 +08:00
|
|
|
|
2022-11-14 13:52:00 +08:00
|
|
|
```sh
|
|
|
|
|
cd csrc/layer_norm && pip install .
|
|
|
|
|
```
|