types.py 434 B

123456789101112131415161718192021222324252627
  1. # Copyright (c) Microsoft Corporation.
  2. # SPDX-License-Identifier: Apache-2.0
  3. # DeepSpeed Team
  4. from enum import IntEnum
  5. class ActivationFuncType(IntEnum):
  6. UNKNOWN = 0
  7. GELU = 1
  8. ReLU = 2
  9. GATED_GELU = 3
  10. GATED_SILU = 4
  11. GATED_ACTIVATION_TYPES = [
  12. ActivationFuncType.GATED_GELU,
  13. ActivationFuncType.GATED_SILU,
  14. ]
  15. class NormType(IntEnum):
  16. UNKNOWN = 0
  17. LayerNorm = 1
  18. GroupNorm = 2
  19. RMSNorm = 3