danieldk HF Staff commited on
Commit
a9726ec
·
verified ·
1 Parent(s): 114beff

Build uploaded using `kernels`.

Browse files
Files changed (22) hide show
  1. .gitattributes +3 -0
  2. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__init__.py +14 -0
  3. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__pycache__/__init__.cpython-313.pyc +0 -0
  4. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__pycache__/_ops.cpython-313.pyc +0 -0
  5. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__pycache__/layers.cpython-313.pyc +0 -0
  6. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/_ops.py +9 -0
  7. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so +3 -0
  8. build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/layers.py +36 -0
  9. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__init__.py +14 -0
  10. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__pycache__/__init__.cpython-313.pyc +0 -0
  11. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__pycache__/_ops.cpython-313.pyc +0 -0
  12. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__pycache__/layers.cpython-313.pyc +0 -0
  13. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/_ops.py +9 -0
  14. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so +3 -0
  15. build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/layers.py +36 -0
  16. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__init__.py +14 -0
  17. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__pycache__/__init__.cpython-313.pyc +0 -0
  18. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__pycache__/_ops.cpython-313.pyc +0 -0
  19. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__pycache__/layers.cpython-313.pyc +0 -0
  20. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/_ops.py +9 -0
  21. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so +3 -0
  22. build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/layers.py +36 -0
.gitattributes CHANGED
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so filter=lfs diff=lfs merge=lfs -text
37
+ build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so filter=lfs diff=lfs merge=lfs -text
38
+ build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so filter=lfs diff=lfs merge=lfs -text
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__init__.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from . import layers
2
+
3
+ from ._ops import ops
4
+
5
+
6
+ def apply_rms_norm(input, weight, eps):
7
+ return ops.apply_rms_norm(
8
+ input,
9
+ weight,
10
+ eps,
11
+ )
12
+
13
+ __all__ = ["layers", "apply_rms_norm"]
14
+
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__pycache__/__init__.cpython-313.pyc ADDED
Binary file (491 Bytes). View file
 
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__pycache__/_ops.cpython-313.pyc ADDED
Binary file (520 Bytes). View file
 
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/__pycache__/layers.cpython-313.pyc ADDED
Binary file (1.68 kB). View file
 
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/_ops.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from . import _rmsnorm_0d12ee5
3
+ ops = torch.ops._rmsnorm_0d12ee5
4
+
5
+ def add_op_namespace_prefix(op_name: str):
6
+ """
7
+ Prefix op by namespace.
8
+ """
9
+ return f"_rmsnorm_0d12ee5::{op_name}"
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79eb24cb07a24a3f829ce1d210bd0cbd79badd0cc236710a84e83c15575ddf04
3
+ size 100963504
build/torch27-cxx11-xpu20250-x86_64-linux/rmsnorm/layers.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from ._ops import ops
3
+
4
+ class RMSNorm(torch.nn.Module):
5
+ """
6
+ RMSNorm module that uses the optimized LigerRMSNormFunction.
7
+
8
+ Args:
9
+ hidden_size (int): The size of the hidden dimension.
10
+ eps (float, optional): The epsilon value for numerical stability. Defaults to 1e-6.
11
+ offset (float, optional): Offset value to shift the weight tensor. Defaults to 0.0.
12
+ casting_mode (str, optional): The casting mode to use. Defaults to "llama".
13
+ in_place (bool, optional): Whether to modify dY in-place to store dX during backward. Defaults to True.
14
+ """
15
+
16
+
17
+ weight: torch.Tensor
18
+ variance_epsilon: float
19
+
20
+ def forward(self, hidden_states):
21
+ """
22
+ Apply RMS normalization to the input tensor.
23
+
24
+ Args:
25
+ hidden_states (torch.Tensor): Input tensor of shape (B, T, H) or (BxT, H)
26
+
27
+ Returns:
28
+ torch.Tensor: Normalized tensor of the same shape as input
29
+ """
30
+ return ops.apply_rms_norm(
31
+ hidden_states,
32
+ self.weight,
33
+ self.variance_epsilon,
34
+ )
35
+
36
+ __all__ = ["RMSNorm"]
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__init__.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from . import layers
2
+
3
+ from ._ops import ops
4
+
5
+
6
+ def apply_rms_norm(input, weight, eps):
7
+ return ops.apply_rms_norm(
8
+ input,
9
+ weight,
10
+ eps,
11
+ )
12
+
13
+ __all__ = ["layers", "apply_rms_norm"]
14
+
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__pycache__/__init__.cpython-313.pyc ADDED
Binary file (491 Bytes). View file
 
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__pycache__/_ops.cpython-313.pyc ADDED
Binary file (520 Bytes). View file
 
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/__pycache__/layers.cpython-313.pyc ADDED
Binary file (1.68 kB). View file
 
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/_ops.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from . import _rmsnorm_0d12ee5
3
+ ops = torch.ops._rmsnorm_0d12ee5
4
+
5
+ def add_op_namespace_prefix(op_name: str):
6
+ """
7
+ Prefix op by namespace.
8
+ """
9
+ return f"_rmsnorm_0d12ee5::{op_name}"
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0b10d6efd62c187242ff110bfb3a2278bb076c053d50aa63354f34d1353a931
3
+ size 103943040
build/torch28-cxx11-xpu20251-x86_64-linux/rmsnorm/layers.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from ._ops import ops
3
+
4
+ class RMSNorm(torch.nn.Module):
5
+ """
6
+ RMSNorm module that uses the optimized LigerRMSNormFunction.
7
+
8
+ Args:
9
+ hidden_size (int): The size of the hidden dimension.
10
+ eps (float, optional): The epsilon value for numerical stability. Defaults to 1e-6.
11
+ offset (float, optional): Offset value to shift the weight tensor. Defaults to 0.0.
12
+ casting_mode (str, optional): The casting mode to use. Defaults to "llama".
13
+ in_place (bool, optional): Whether to modify dY in-place to store dX during backward. Defaults to True.
14
+ """
15
+
16
+
17
+ weight: torch.Tensor
18
+ variance_epsilon: float
19
+
20
+ def forward(self, hidden_states):
21
+ """
22
+ Apply RMS normalization to the input tensor.
23
+
24
+ Args:
25
+ hidden_states (torch.Tensor): Input tensor of shape (B, T, H) or (BxT, H)
26
+
27
+ Returns:
28
+ torch.Tensor: Normalized tensor of the same shape as input
29
+ """
30
+ return ops.apply_rms_norm(
31
+ hidden_states,
32
+ self.weight,
33
+ self.variance_epsilon,
34
+ )
35
+
36
+ __all__ = ["RMSNorm"]
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__init__.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from . import layers
2
+
3
+ from ._ops import ops
4
+
5
+
6
+ def apply_rms_norm(input, weight, eps):
7
+ return ops.apply_rms_norm(
8
+ input,
9
+ weight,
10
+ eps,
11
+ )
12
+
13
+ __all__ = ["layers", "apply_rms_norm"]
14
+
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__pycache__/__init__.cpython-313.pyc ADDED
Binary file (491 Bytes). View file
 
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__pycache__/_ops.cpython-313.pyc ADDED
Binary file (520 Bytes). View file
 
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/__pycache__/layers.cpython-313.pyc ADDED
Binary file (1.68 kB). View file
 
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/_ops.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from . import _rmsnorm_0d12ee5
3
+ ops = torch.ops._rmsnorm_0d12ee5
4
+
5
+ def add_op_namespace_prefix(op_name: str):
6
+ """
7
+ Prefix op by namespace.
8
+ """
9
+ return f"_rmsnorm_0d12ee5::{op_name}"
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/_rmsnorm_0d12ee5.abi3.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee351d25752fbbd5e05c23a5a15445f1576ec58978fe0e8126f649384cf998aa
3
+ size 102416296
build/torch29-cxx11-xpu20252-x86_64-linux/rmsnorm/layers.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from ._ops import ops
3
+
4
+ class RMSNorm(torch.nn.Module):
5
+ """
6
+ RMSNorm module that uses the optimized LigerRMSNormFunction.
7
+
8
+ Args:
9
+ hidden_size (int): The size of the hidden dimension.
10
+ eps (float, optional): The epsilon value for numerical stability. Defaults to 1e-6.
11
+ offset (float, optional): Offset value to shift the weight tensor. Defaults to 0.0.
12
+ casting_mode (str, optional): The casting mode to use. Defaults to "llama".
13
+ in_place (bool, optional): Whether to modify dY in-place to store dX during backward. Defaults to True.
14
+ """
15
+
16
+
17
+ weight: torch.Tensor
18
+ variance_epsilon: float
19
+
20
+ def forward(self, hidden_states):
21
+ """
22
+ Apply RMS normalization to the input tensor.
23
+
24
+ Args:
25
+ hidden_states (torch.Tensor): Input tensor of shape (B, T, H) or (BxT, H)
26
+
27
+ Returns:
28
+ torch.Tensor: Normalized tensor of the same shape as input
29
+ """
30
+ return ops.apply_rms_norm(
31
+ hidden_states,
32
+ self.weight,
33
+ self.variance_epsilon,
34
+ )
35
+
36
+ __all__ = ["RMSNorm"]