diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..81db5417b5bae152db944fee0450abeb3d25bbcb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,45 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +*.so filter=lfs diff=lfs merge=lfs -text +build/torch210-cu128-x86_64-windows/activation/_activation_e1b4b08.pyd filter=lfs diff=lfs merge=lfs -text +media/benches.gif filter=lfs diff=lfs merge=lfs -text +media/benches.mp4 filter=lfs diff=lfs merge=lfs -text +build/torch211-cu128-x86_64-windows/_activation_cuda_47d6ce5.pyd filter=lfs diff=lfs merge=lfs -text +build/torch211-cu128-x86_64-windows/_activation_cuda_edabc93.pyd filter=lfs diff=lfs merge=lfs -text +build/torch211-cu128-x86_64-windows/_activation_cuda_ce29f4e.pyd filter=lfs diff=lfs merge=lfs -text +build/torch211-cu128-x86_64-windows/_activation_cuda_615d0a2.pyd filter=lfs diff=lfs merge=lfs -text +build/torch211-cu128-x86_64-windows/_activation_cuda_b463b76.pyd filter=lfs diff=lfs merge=lfs -text +build/torch211-cu128-x86_64-windows/_activation_cuda_47eab20.pyd filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0bc29f7bd0856c0ed27fa4118025e4381ae8b026 --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +--- +library_name: kernels +license: apache-2.0 +--- + +This is the repository card of kernels-community/activation that has been pushed on the Hub. It was built to be used with the [`kernels` library](https://github.com/huggingface/kernels). This card was automatically generated. + +## How to use + +```python +# make sure `kernels` is installed: `pip install -U kernels` +from kernels import get_kernel + +kernel_module = get_kernel("kernels-community/activation", version=2) +silu_and_mul = kernel_module.silu_and_mul + +silu_and_mul(...) +``` + +## Available functions +- `silu_and_mul` +- `mul_and_silu` +- `gelu_and_mul` +- `gelu_tanh_and_mul` +- `fatrelu_and_mul` +- `gelu_fast` +- `gelu_new` +- `gelu_quick` +- `gelu_tanh` +- `silu` +- `gelu` + +## Available layers +- `SiluAndMul` +- `Silu` +- `Gelu` +- `GeluTanh` +- `MulAndSilu` +- `GeluAndMul` +- `GeluTanhAndMul` +- `FatreluAndMul` +- `FastGELU` +- `NewGELU` +- `QuickGELU` + +## Benchmarks + +Benchmarking script is available for this kernel. Run `kernels benchmark kernels-community/activation --version 2`. diff --git a/benchmarks/benchmark.py b/benchmarks/benchmark.py new file mode 100644 index 0000000000000000000000000000000000000000..b037e905b643ed4cf8b8e91026c7861ae977a3f9 --- /dev/null +++ b/benchmarks/benchmark.py @@ -0,0 +1,9 @@ +from kernels.benchmarks import SiluAndMulBenchmark + + +class SiluWorkloads(SiluAndMulBenchmark): + pass + + +class SiluWorkloadsGraph(SiluAndMulBenchmark): + cuda_graph = True diff --git a/build/torch210-cpu-x86_64-linux/__init__.py b/build/torch210-cpu-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfce59ba42c1f11608bb13f7da601812a79649a0 --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/__init__.py @@ -0,0 +1,75 @@ +import torch + +from ._ops import ops + +from . import layers + + +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu_and_mul(out, x) + return out + + +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.mul_and_silu(out, x) + return out + + +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_and_mul(out, x) + return out + + +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh_and_mul(out, x) + return out + + +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: + ops.fatrelu_and_mul(out, x, threshold) + return out + + +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu(out, x) + return out + +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu(out, x) + return out + + +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh(out, x) + return out + + +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_fast(out, x) + return out + + +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_new(out, x) + return out + + +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_quick(out, x) + return out + + +__all__ = [ + "silu_and_mul", + "mul_and_silu", + "gelu_and_mul", + "gelu_tanh_and_mul", + "fatrelu_and_mul", + "gelu_fast", + "gelu_new", + "gelu_quick", + "gelu_tanh", + "silu", + "gelu", + "layers", +] diff --git a/build/torch210-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so b/build/torch210-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..5b5d3d5a7eb98bb75975f6a40fa9e576615bb222 Binary files /dev/null and b/build/torch210-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so differ diff --git a/build/torch210-cpu-x86_64-linux/_autograd.py b/build/torch210-cpu-x86_64-linux/_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..381f3ceb9b971ce3fd24c79f7a1922af6f3c3325 --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/_autograd.py @@ -0,0 +1,52 @@ +import torch + +from ._ops import ops + + +def _output_shape(x, gated): + torch._check(x.ndim > 0) + if gated: + torch._check(x.shape[-1] % 2 == 0) + return x.shape[:-1] + (x.shape[-1] // 2,) + return x.shape + + +def _register(forward_op, backward_op, *, gated=False, threshold=False): + # Register against the C++ schema, not a second Python custom operator. + forward_op = forward_op.default + backward_op = backward_op.default + + def fake_forward(x, *args): + return x.new_empty(_output_shape(x, gated)) + + def fake_backward(grad_output, x, *args): + return x.new_empty(x.shape) + + def setup_context(ctx, inputs, output): + ctx.save_for_backward(inputs[0]) + if threshold: + ctx.threshold = inputs[1] + + def backward(ctx, grad_output): + (x,) = ctx.saved_tensors + if threshold: + return backward_op(grad_output, x, ctx.threshold), None + return backward_op(grad_output, x) + + torch.library.register_fake(forward_op, fake_forward) + torch.library.register_fake(backward_op, fake_backward) + torch.library.register_autograd(forward_op, backward, setup_context=setup_context) + + +def register_autograd(): + _register(ops.silu_forward, ops.silu_backward) + _register(ops.gelu_forward, ops.gelu_backward) + _register(ops.gelu_tanh_forward, ops.gelu_tanh_backward) + _register(ops.gelu_fast_forward, ops.gelu_fast_backward) + _register(ops.gelu_new_forward, ops.gelu_new_backward) + _register(ops.gelu_quick_forward, ops.gelu_quick_backward) + _register(ops.silu_and_mul_forward, ops.silu_and_mul_backward, gated=True) + _register(ops.mul_and_silu_forward, ops.mul_and_silu_backward, gated=True) + _register(ops.gelu_and_mul_forward, ops.gelu_and_mul_backward, gated=True) + _register(ops.gelu_tanh_and_mul_forward, ops.gelu_tanh_and_mul_backward, gated=True) + _register(ops.fatrelu_and_mul_forward, ops.fatrelu_and_mul_backward, gated=True, threshold=True) diff --git a/build/torch210-cpu-x86_64-linux/_ops.py b/build/torch210-cpu-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..f978ef7b0add9da34f4aef93c0fceb4713f05908 --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _activation_cpu_96f42ba +ops = torch.ops._activation_cpu_96f42ba + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_activation_cpu_96f42ba::{op_name}" diff --git a/build/torch210-cpu-x86_64-linux/layers.py b/build/torch210-cpu-x86_64-linux/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..07e57bd6a62336ba29de758220b94bbaedb16549 --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/layers.py @@ -0,0 +1,170 @@ + +import torch +import torch.nn as nn + +from ._autograd import register_autograd +from ._ops import ops + + +register_autograd() + + +class SiluAndMul(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_and_mul_forward(x) + + +class Silu(nn.Module): + """An activation function for SiLU. + + The function computes x -> silu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_forward(x) + + +class Gelu(nn.Module): + """An activation function for GELU. + + The function computes x -> gelu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_forward(x) + + +class GeluTanh(nn.Module): + """An activation function for GELU with `tanh` approximation. + + The function computes x -> gelu_tanh(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_forward(x) + + +class MulAndSilu(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.mul_and_silu_forward(x) + + +class GeluAndMul(nn.Module): + """An activation function for GeGLU. + + The function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d) + return: (batch_size, seq_len, d) or (num_tokens, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_and_mul_forward(x) + + +class GeluTanhAndMul(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_and_mul_forward(x) + + +class FatreluAndMul(nn.Module): + """An activation function for FATReLU. + + The function computes x -> FATReLU(x[:d]) * x[d:] where + d = x.shape[-1] // 2. + This is used in openbmb/MiniCPM-S-1B-sft. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def __init__(self, threshold: float = 0.0): + super().__init__() + self.threshold = threshold + + def forward(self, x: torch.Tensor): + return ops.fatrelu_and_mul_forward(x, self.threshold) + + +class FastGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_fast_forward(x) + + +class NewGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_new_forward(x) + + +class QuickGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_quick_forward(x) + + +__all__ = [ + "FastGELU", + "FatreluAndMul", + "Gelu", + "GeluAndMul", + "GeluTanh", + "GeluTanhAndMul", + "MulAndSilu", + "NewGELU", + "QuickGELU", + "Silu", + "SiluAndMul", +] diff --git a/build/torch210-cpu-x86_64-linux/metadata.json b/build/torch210-cpu-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..983a0203d7dcaf5309f3304a40129487bbb1be15 --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "activation", + "id": "_activation_cpu_96f42ba", + "version": 2, + "kernels-minver": "0.14.0", + "license": "Apache-2.0", + "python-depends": [], + "kernel-depends": [], + "backend": { + "type": "cpu" + }, + "digest": { + "algorithm": "sha256", + "files": { + "__init__.py": "NQdhY7p9BPoMw0NQodMKFTPSQXBlrsX3yUdP8MEHyH0=", + "_activation_cpu_96f42ba.abi3.so": "wpfEJ2B5cHnk0ULuk4OYg5ECvLDztCyGw1CmaRUhV7o=", + "_autograd.py": "zOE67V8Ix8QHmeO1XjvKYue1aIgGOa2BpuJ7ablYbMg=", + "_ops.py": "aPzZXtXSagtNkrKyqGh3dnwKQlGZTYr7wSpnP/f/FY4=", + "layers.py": "4hZUzmc68DwI9Ldg4vimZ61OlNu1KHTdTAzHgtIDZoY=", + "symbols.json": "ZKZtww/dcNUL0IncOFdRn1bXB5giYx0oGTMRURk2pLk=" + } + }, + "provenance": { + "kernel-builder": { + "version": "0.19.0-dev1", + "commit": "513f08bc6e20e6e59efcd2307851903b054746f3", + "dirty": false + }, + "kernel": { + "commit": "96f42ba3633a93208557a942762e52005952b21a", + "dirty": false + } + } +} \ No newline at end of file diff --git a/build/torch210-cpu-x86_64-linux/metadata.json.sigstore b/build/torch210-cpu-x86_64-linux/metadata.json.sigstore new file mode 100644 index 0000000000000000000000000000000000000000..549a7968408601aea79cd8820b46ae2bbea2f09e --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/metadata.json.sigstore @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUFrwpfYZza3mvhKt+XGcjvsKFDq8wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMjAyMTY1NzI0WhcNMjYxMjAyMTcwNzI0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEl+mDqoowV55TWbrjCyRhWQUdso399PWjb01R0s4jE0sHu/+qMfFXIc+e2nenUr39SUFGuGpde7kR87Yxl5EZE6OCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY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vd29ya2Zsb3dzL2J1aWxkLnlhbWxAcmVmcy9oZWFkcy9tYWluMDgGCisGAQQBg78wARMEKgwoOTZmNDJiYTM2MzNhOTMyMDg1NTdhOTQyNzYyZTUyMDA1OTUyYjIxYTAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80NjkyOTYyMDIyMy9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGiN7CBvQAABAMARzBFAiB7W9IhS/h4H5zbmzCWkX9YTzgnyg6KHYQVM9NDfPmm/gIhANDfX43syjWo99qhOVkO2lYFyEXih3mInJePzpp6seixMAoGCCqGSM49BAMDA2gAMGUCMQDOboFfP7J5xFruNq5d3fGMG6HFY0PXbdy9CcrLtrlCXVhckO4yPnlx027G/yg/N/UCMFw2mUoSIWUT5qKlo8W7+HbNRUmlkVq3AWCg8wsHRMFYf5iFWp3j5vjRVOmnqthEog=="},"tlogEntries":[{"logIndex":"4218961368","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1796230644","inclusionPromise":{"signedEntryTimestamp":"MEQCIFFXscdA62yQUT8VNkBt1VYDBp8neuI+6GqTNJXUNv7YAiA4KdASe4G1YhG4Fm+DjJCo1C2A8LswooueejFXv3/RgA=="},"inclusionProof":{"logIndex":"4097057106","rootHash":"v6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=","treeSize":"4097057108","hashes":["NcI0qDaS4K+EnkwSuNPkc2VLGNkwnmRg+61KGGUmp/Y=","yS2CpbzNNeNshAnoGxFggKbMOvjv7dsgxtekTiAcAT0=","pLkza4ANQRBlTzAP+GTpfwpNeckeaeMb0VdlZLNeQHI=","uwVMKVt9aI8muFOTlL5toxWeyZI3nNkduCbQ5vn9I1Q=","FARSYK4FYVunsRK6hTIQKvfuK8oeYWlC32Nl9EPnNY8=","uom17/iiE9LieTotrofLNZgMb2AuLliCqVQFh1RDKws=","iaX4lirwHM3JCSFZkPRv+y8Yr7OTDROBUCoMfzvv1nE=","ShM2Cmd6LdSuw16xoysIjs/Ifl1BHG6BV5Cy5BIFmTs=","cL8X8YtwDBpU5nSgm4Flig3QWi7jgwRaEJN6Dc9RAeE=","dPVUgsZ63CnVNIKEYIvFaPnDRf7T99m/S8kwoh8cX0c=","yznKUifjcNgdsio4X7Umz1O2L3z0M+cVcIDsnwwhJ/c=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n4097057108\nv6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=\n\n— rekor.sigstore.dev wNI9ajBFAiA+nhD5nO0Tiams0sch0JeVeDeX4nW1ePJ1CZzeC/PzAQIhAJW3oJ+5PrpTbCrYDTW5Egyi+BebJcDGPRvgFFNy9On1\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiJkZjUzZmRlNWJlYzEzNmM0MWJhZjc5YjE0NmYzNDc5Z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BGgwZgIxAPCoskcshBpjzx2cV5oWCnzN7r4tTmcuzzy/wiBQZFCv9+/Ip8OVgqq8563qEYh2qQIxAMuUyywAZvhNXKtadRWzkhX+PwMJbEMFBIfiJkQb6zy6MtJ9rg760ETYoCmNQTcIZg=="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"31P95b7BNsQbr3mxRvNHn4UpMIwSRoIKvAqXBJR1j+4="},"signature":"MEQCIDbZ75LJed8gcmZZ4TvkT/xt0VLwwI9/nsSgZRLhj873AiAGZXlEn1pk8quibml+1NjaaGrVEeIvVmpBslL53HUJ6w=="}} diff --git a/build/torch210-cpu-x86_64-linux/symbols.json b/build/torch210-cpu-x86_64-linux/symbols.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1d36d1cd058a0f4389783a7edc4b1aa5dc8f6c --- /dev/null +++ b/build/torch210-cpu-x86_64-linux/symbols.json @@ -0,0 +1,580 @@ +{ + "schema_version": 1, + "module": "_activation_cpu_96f42ba", + "functions": [ + { + "name": "silu_and_mul", + "qualname": "silu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "mul_and_silu", + "qualname": "mul_and_silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_and_mul", + "qualname": "gelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh_and_mul", + "qualname": "gelu_tanh_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "fatrelu_and_mul", + "qualname": "fatrelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_fast", + "qualname": "gelu_fast", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_new", + "qualname": "gelu_new", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_quick", + "qualname": "gelu_quick", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh", + "qualname": "gelu_tanh", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "silu", + "qualname": "silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu", + "qualname": "gelu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + } + ], + "layers": [ + { + "name": "FastGELU", + "qualname": "FastGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "FatreluAndMul", + "qualname": "FatreluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for FATReLU.\n\nThe function computes x -> FATReLU(x[:d]) * x[d:] where\nd = x.shape[-1] // 2.\nThis is used in openbmb/MiniCPM-S-1B-sft.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": null + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Gelu", + "qualname": "Gelu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU.\n\nThe function computes x -> gelu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluAndMul", + "qualname": "GeluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GeGLU.\n\nThe function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d)\n return: (batch_size, seq_len, d) or (num_tokens, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanh", + "qualname": "GeluTanh", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU with `tanh` approximation.\n\nThe function computes x -> gelu_tanh(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanhAndMul", + "qualname": "GeluTanhAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "MulAndSilu", + "qualname": "MulAndSilu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "NewGELU", + "qualname": "NewGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "QuickGELU", + "qualname": "QuickGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Silu", + "qualname": "Silu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SiLU.\n\nThe function computes x -> silu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "SiluAndMul", + "qualname": "SiluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + } + ] +} diff --git a/build/torch211-cpu-x86_64-linux/__init__.py b/build/torch211-cpu-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfce59ba42c1f11608bb13f7da601812a79649a0 --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/__init__.py @@ -0,0 +1,75 @@ +import torch + +from ._ops import ops + +from . import layers + + +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu_and_mul(out, x) + return out + + +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.mul_and_silu(out, x) + return out + + +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_and_mul(out, x) + return out + + +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh_and_mul(out, x) + return out + + +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: + ops.fatrelu_and_mul(out, x, threshold) + return out + + +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu(out, x) + return out + +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu(out, x) + return out + + +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh(out, x) + return out + + +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_fast(out, x) + return out + + +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_new(out, x) + return out + + +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_quick(out, x) + return out + + +__all__ = [ + "silu_and_mul", + "mul_and_silu", + "gelu_and_mul", + "gelu_tanh_and_mul", + "fatrelu_and_mul", + "gelu_fast", + "gelu_new", + "gelu_quick", + "gelu_tanh", + "silu", + "gelu", + "layers", +] diff --git a/build/torch211-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so b/build/torch211-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..2e721a5a3c59428d96ec159ad9eb379f808c3064 Binary files /dev/null and b/build/torch211-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so differ diff --git a/build/torch211-cpu-x86_64-linux/_autograd.py b/build/torch211-cpu-x86_64-linux/_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..381f3ceb9b971ce3fd24c79f7a1922af6f3c3325 --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/_autograd.py @@ -0,0 +1,52 @@ +import torch + +from ._ops import ops + + +def _output_shape(x, gated): + torch._check(x.ndim > 0) + if gated: + torch._check(x.shape[-1] % 2 == 0) + return x.shape[:-1] + (x.shape[-1] // 2,) + return x.shape + + +def _register(forward_op, backward_op, *, gated=False, threshold=False): + # Register against the C++ schema, not a second Python custom operator. + forward_op = forward_op.default + backward_op = backward_op.default + + def fake_forward(x, *args): + return x.new_empty(_output_shape(x, gated)) + + def fake_backward(grad_output, x, *args): + return x.new_empty(x.shape) + + def setup_context(ctx, inputs, output): + ctx.save_for_backward(inputs[0]) + if threshold: + ctx.threshold = inputs[1] + + def backward(ctx, grad_output): + (x,) = ctx.saved_tensors + if threshold: + return backward_op(grad_output, x, ctx.threshold), None + return backward_op(grad_output, x) + + torch.library.register_fake(forward_op, fake_forward) + torch.library.register_fake(backward_op, fake_backward) + torch.library.register_autograd(forward_op, backward, setup_context=setup_context) + + +def register_autograd(): + _register(ops.silu_forward, ops.silu_backward) + _register(ops.gelu_forward, ops.gelu_backward) + _register(ops.gelu_tanh_forward, ops.gelu_tanh_backward) + _register(ops.gelu_fast_forward, ops.gelu_fast_backward) + _register(ops.gelu_new_forward, ops.gelu_new_backward) + _register(ops.gelu_quick_forward, ops.gelu_quick_backward) + _register(ops.silu_and_mul_forward, ops.silu_and_mul_backward, gated=True) + _register(ops.mul_and_silu_forward, ops.mul_and_silu_backward, gated=True) + _register(ops.gelu_and_mul_forward, ops.gelu_and_mul_backward, gated=True) + _register(ops.gelu_tanh_and_mul_forward, ops.gelu_tanh_and_mul_backward, gated=True) + _register(ops.fatrelu_and_mul_forward, ops.fatrelu_and_mul_backward, gated=True, threshold=True) diff --git a/build/torch211-cpu-x86_64-linux/_ops.py b/build/torch211-cpu-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..f978ef7b0add9da34f4aef93c0fceb4713f05908 --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _activation_cpu_96f42ba +ops = torch.ops._activation_cpu_96f42ba + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_activation_cpu_96f42ba::{op_name}" diff --git a/build/torch211-cpu-x86_64-linux/layers.py b/build/torch211-cpu-x86_64-linux/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..07e57bd6a62336ba29de758220b94bbaedb16549 --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/layers.py @@ -0,0 +1,170 @@ + +import torch +import torch.nn as nn + +from ._autograd import register_autograd +from ._ops import ops + + +register_autograd() + + +class SiluAndMul(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_and_mul_forward(x) + + +class Silu(nn.Module): + """An activation function for SiLU. + + The function computes x -> silu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_forward(x) + + +class Gelu(nn.Module): + """An activation function for GELU. + + The function computes x -> gelu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_forward(x) + + +class GeluTanh(nn.Module): + """An activation function for GELU with `tanh` approximation. + + The function computes x -> gelu_tanh(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_forward(x) + + +class MulAndSilu(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.mul_and_silu_forward(x) + + +class GeluAndMul(nn.Module): + """An activation function for GeGLU. + + The function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d) + return: (batch_size, seq_len, d) or (num_tokens, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_and_mul_forward(x) + + +class GeluTanhAndMul(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_and_mul_forward(x) + + +class FatreluAndMul(nn.Module): + """An activation function for FATReLU. + + The function computes x -> FATReLU(x[:d]) * x[d:] where + d = x.shape[-1] // 2. + This is used in openbmb/MiniCPM-S-1B-sft. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def __init__(self, threshold: float = 0.0): + super().__init__() + self.threshold = threshold + + def forward(self, x: torch.Tensor): + return ops.fatrelu_and_mul_forward(x, self.threshold) + + +class FastGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_fast_forward(x) + + +class NewGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_new_forward(x) + + +class QuickGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_quick_forward(x) + + +__all__ = [ + "FastGELU", + "FatreluAndMul", + "Gelu", + "GeluAndMul", + "GeluTanh", + "GeluTanhAndMul", + "MulAndSilu", + "NewGELU", + "QuickGELU", + "Silu", + "SiluAndMul", +] diff --git a/build/torch211-cpu-x86_64-linux/metadata.json b/build/torch211-cpu-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..be4d4784a4c5b76cb2bc9ef31565eb84f74beee1 --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "activation", + "id": "_activation_cpu_96f42ba", + "version": 2, + "kernels-minver": "0.14.0", + "license": "Apache-2.0", + "python-depends": [], + "kernel-depends": [], + "backend": { + "type": "cpu" + }, + "digest": { + "algorithm": "sha256", + "files": { + "__init__.py": "NQdhY7p9BPoMw0NQodMKFTPSQXBlrsX3yUdP8MEHyH0=", + "_activation_cpu_96f42ba.abi3.so": "PX5sXTxShOJr8yGW3/V88tMEFyoFYD66dl/V5zSBl9I=", + "_autograd.py": "zOE67V8Ix8QHmeO1XjvKYue1aIgGOa2BpuJ7ablYbMg=", + "_ops.py": "aPzZXtXSagtNkrKyqGh3dnwKQlGZTYr7wSpnP/f/FY4=", + "layers.py": "4hZUzmc68DwI9Ldg4vimZ61OlNu1KHTdTAzHgtIDZoY=", + "symbols.json": "ZKZtww/dcNUL0IncOFdRn1bXB5giYx0oGTMRURk2pLk=" + } + }, + "provenance": { + "kernel-builder": { + "version": "0.19.0-dev1", + "commit": "513f08bc6e20e6e59efcd2307851903b054746f3", + "dirty": false + }, + "kernel": { + "commit": "96f42ba3633a93208557a942762e52005952b21a", + "dirty": false + } + } +} \ No newline at end of file diff --git a/build/torch211-cpu-x86_64-linux/metadata.json.sigstore b/build/torch211-cpu-x86_64-linux/metadata.json.sigstore new file mode 100644 index 0000000000000000000000000000000000000000..449e8a647e77f1dd9fdf7d67eb3a3056ca6cad26 --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/metadata.json.sigstore @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUFrwpfYZza3mvhKt+XGcjvsKFDq8wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMjAyMTY1NzI0WhcNMjYxMjAyMTcwNzI0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEl+mDqoowV55TWbrjCyRhWQUdso399PWjb01R0s4jE0sHu/+qMfFXIc+e2nenUr39SUFGuGpde7kR87Yxl5EZE6OCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAW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{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1796230644","inclusionPromise":{"signedEntryTimestamp":"MEUCIQD5/C5OwqlmOlMznyrvz8iD4whBGPDdrCGPMLUPRSGJoAIgX1+OQPoIlePhuINPE6oDdEWFaDWnWPVpnPv8qWa0jqk="},"inclusionProof":{"logIndex":"4097057103","rootHash":"v6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=","treeSize":"4097057108","hashes":["rkUOcDYiDNtmehtciVTltdcstgIo07dDz/3DMqYzH5w=","wUvElen/Vslzn5rA+UDP50wTqwYmWhhGWg87l4Wxcdg=","hRfOyCKgnPo/zDSGs293VIz1C+pz7slxIySfuoLYVDI=","ye1BBWzT+NC6NLQeeh6BN7GLRlIrKSJ4KJp2w255uxg=","PD1MAKQIxeY3WPy6pbGD33wTyJIBktKzFstqJQiwFO0=","uwVMKVt9aI8muFOTlL5toxWeyZI3nNkduCbQ5vn9I1Q=","FARSYK4FYVunsRK6hTIQKvfuK8oeYWlC32Nl9EPnNY8=","uom17/iiE9LieTotrofLNZgMb2AuLliCqVQFh1RDKws=","iaX4lirwHM3JCSFZkPRv+y8Yr7OTDROBUCoMfzvv1nE=","ShM2Cmd6LdSuw16xoysIjs/Ifl1BHG6BV5Cy5BIFmTs=","cL8X8YtwDBpU5nSgm4Flig3QWi7jgwRaEJN6Dc9RAeE=","dPVUgsZ63CnVNIKEYIvFaPnDRf7T99m/S8kwoh8cX0c=","yznKUifjcNgdsio4X7Umz1O2L3z0M+cVcIDsnwwhJ/c=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n4097057108\nv6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=\n\n— rekor.sigst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BwGCSqGSIb3DQEJBTEPFw0yNjEyMDIxNjU3MjRaMC8GCSqGSIb3DQEJBDEiBCDeE8lB4OOe1BnImxRebwc/0Uv7wxhM+qvlECsPJ9DImzCBjgYLKoZIhvcNAQkQAi8xfzB9MHsweQQghfknvAerYsrDtENWwQ78gbLGiD/aernm2HDZ0TrNBbcwVTA9pDswOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEZjBkAjB/NAjJccER/IPZyEdiqSmDNAVmS1eSfU40jwmT+MrX/l1tY8CTDDo5zvbZdF+uW7ACMGR3ruC5AhcLOZqkTB6etP7BTWTBSdlVoQkKHLamNz3swAp3grBOks3M9dv498M/Ig=="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"+BZ8Dwn6pypsV8uGwaOJQ3pScHZSwGplcvZuyWCkFdk="},"signature":"MEUCIQC1jgWtGbcvU2oWzQh6opjTgvPTkcMzFi6aubJxWOa1NgIgFBr63/3xViS8ipeXSEu9TkWdEqXD7zu7MGM0EBroqxs="}} diff --git a/build/torch211-cpu-x86_64-linux/symbols.json b/build/torch211-cpu-x86_64-linux/symbols.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1d36d1cd058a0f4389783a7edc4b1aa5dc8f6c --- /dev/null +++ b/build/torch211-cpu-x86_64-linux/symbols.json @@ -0,0 +1,580 @@ +{ + "schema_version": 1, + "module": "_activation_cpu_96f42ba", + "functions": [ + { + "name": "silu_and_mul", + "qualname": "silu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "mul_and_silu", + "qualname": "mul_and_silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_and_mul", + "qualname": "gelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh_and_mul", + "qualname": "gelu_tanh_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "fatrelu_and_mul", + "qualname": "fatrelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_fast", + "qualname": "gelu_fast", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_new", + "qualname": "gelu_new", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_quick", + "qualname": "gelu_quick", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh", + "qualname": "gelu_tanh", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "silu", + "qualname": "silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu", + "qualname": "gelu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + } + ], + "layers": [ + { + "name": "FastGELU", + "qualname": "FastGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "FatreluAndMul", + "qualname": "FatreluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for FATReLU.\n\nThe function computes x -> FATReLU(x[:d]) * x[d:] where\nd = x.shape[-1] // 2.\nThis is used in openbmb/MiniCPM-S-1B-sft.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": null + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Gelu", + "qualname": "Gelu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU.\n\nThe function computes x -> gelu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluAndMul", + "qualname": "GeluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GeGLU.\n\nThe function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d)\n return: (batch_size, seq_len, d) or (num_tokens, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanh", + "qualname": "GeluTanh", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU with `tanh` approximation.\n\nThe function computes x -> gelu_tanh(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanhAndMul", + "qualname": "GeluTanhAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "MulAndSilu", + "qualname": "MulAndSilu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "NewGELU", + "qualname": "NewGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "QuickGELU", + "qualname": "QuickGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Silu", + "qualname": "Silu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SiLU.\n\nThe function computes x -> silu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "SiluAndMul", + "qualname": "SiluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + } + ] +} diff --git a/build/torch212-cpu-x86_64-linux/__init__.py b/build/torch212-cpu-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfce59ba42c1f11608bb13f7da601812a79649a0 --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/__init__.py @@ -0,0 +1,75 @@ +import torch + +from ._ops import ops + +from . import layers + + +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu_and_mul(out, x) + return out + + +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.mul_and_silu(out, x) + return out + + +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_and_mul(out, x) + return out + + +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh_and_mul(out, x) + return out + + +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: + ops.fatrelu_and_mul(out, x, threshold) + return out + + +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu(out, x) + return out + +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu(out, x) + return out + + +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh(out, x) + return out + + +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_fast(out, x) + return out + + +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_new(out, x) + return out + + +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_quick(out, x) + return out + + +__all__ = [ + "silu_and_mul", + "mul_and_silu", + "gelu_and_mul", + "gelu_tanh_and_mul", + "fatrelu_and_mul", + "gelu_fast", + "gelu_new", + "gelu_quick", + "gelu_tanh", + "silu", + "gelu", + "layers", +] diff --git a/build/torch212-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so b/build/torch212-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..ab11c1bcb3f35ac72b5be954efbbebc6d896e386 Binary files /dev/null and b/build/torch212-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so differ diff --git a/build/torch212-cpu-x86_64-linux/_autograd.py b/build/torch212-cpu-x86_64-linux/_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..381f3ceb9b971ce3fd24c79f7a1922af6f3c3325 --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/_autograd.py @@ -0,0 +1,52 @@ +import torch + +from ._ops import ops + + +def _output_shape(x, gated): + torch._check(x.ndim > 0) + if gated: + torch._check(x.shape[-1] % 2 == 0) + return x.shape[:-1] + (x.shape[-1] // 2,) + return x.shape + + +def _register(forward_op, backward_op, *, gated=False, threshold=False): + # Register against the C++ schema, not a second Python custom operator. + forward_op = forward_op.default + backward_op = backward_op.default + + def fake_forward(x, *args): + return x.new_empty(_output_shape(x, gated)) + + def fake_backward(grad_output, x, *args): + return x.new_empty(x.shape) + + def setup_context(ctx, inputs, output): + ctx.save_for_backward(inputs[0]) + if threshold: + ctx.threshold = inputs[1] + + def backward(ctx, grad_output): + (x,) = ctx.saved_tensors + if threshold: + return backward_op(grad_output, x, ctx.threshold), None + return backward_op(grad_output, x) + + torch.library.register_fake(forward_op, fake_forward) + torch.library.register_fake(backward_op, fake_backward) + torch.library.register_autograd(forward_op, backward, setup_context=setup_context) + + +def register_autograd(): + _register(ops.silu_forward, ops.silu_backward) + _register(ops.gelu_forward, ops.gelu_backward) + _register(ops.gelu_tanh_forward, ops.gelu_tanh_backward) + _register(ops.gelu_fast_forward, ops.gelu_fast_backward) + _register(ops.gelu_new_forward, ops.gelu_new_backward) + _register(ops.gelu_quick_forward, ops.gelu_quick_backward) + _register(ops.silu_and_mul_forward, ops.silu_and_mul_backward, gated=True) + _register(ops.mul_and_silu_forward, ops.mul_and_silu_backward, gated=True) + _register(ops.gelu_and_mul_forward, ops.gelu_and_mul_backward, gated=True) + _register(ops.gelu_tanh_and_mul_forward, ops.gelu_tanh_and_mul_backward, gated=True) + _register(ops.fatrelu_and_mul_forward, ops.fatrelu_and_mul_backward, gated=True, threshold=True) diff --git a/build/torch212-cpu-x86_64-linux/_ops.py b/build/torch212-cpu-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..f978ef7b0add9da34f4aef93c0fceb4713f05908 --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _activation_cpu_96f42ba +ops = torch.ops._activation_cpu_96f42ba + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_activation_cpu_96f42ba::{op_name}" diff --git a/build/torch212-cpu-x86_64-linux/layers.py b/build/torch212-cpu-x86_64-linux/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..07e57bd6a62336ba29de758220b94bbaedb16549 --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/layers.py @@ -0,0 +1,170 @@ + +import torch +import torch.nn as nn + +from ._autograd import register_autograd +from ._ops import ops + + +register_autograd() + + +class SiluAndMul(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_and_mul_forward(x) + + +class Silu(nn.Module): + """An activation function for SiLU. + + The function computes x -> silu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_forward(x) + + +class Gelu(nn.Module): + """An activation function for GELU. + + The function computes x -> gelu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_forward(x) + + +class GeluTanh(nn.Module): + """An activation function for GELU with `tanh` approximation. + + The function computes x -> gelu_tanh(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_forward(x) + + +class MulAndSilu(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.mul_and_silu_forward(x) + + +class GeluAndMul(nn.Module): + """An activation function for GeGLU. + + The function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d) + return: (batch_size, seq_len, d) or (num_tokens, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_and_mul_forward(x) + + +class GeluTanhAndMul(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_and_mul_forward(x) + + +class FatreluAndMul(nn.Module): + """An activation function for FATReLU. + + The function computes x -> FATReLU(x[:d]) * x[d:] where + d = x.shape[-1] // 2. + This is used in openbmb/MiniCPM-S-1B-sft. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def __init__(self, threshold: float = 0.0): + super().__init__() + self.threshold = threshold + + def forward(self, x: torch.Tensor): + return ops.fatrelu_and_mul_forward(x, self.threshold) + + +class FastGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_fast_forward(x) + + +class NewGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_new_forward(x) + + +class QuickGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_quick_forward(x) + + +__all__ = [ + "FastGELU", + "FatreluAndMul", + "Gelu", + "GeluAndMul", + "GeluTanh", + "GeluTanhAndMul", + "MulAndSilu", + "NewGELU", + "QuickGELU", + "Silu", + "SiluAndMul", +] diff --git a/build/torch212-cpu-x86_64-linux/metadata.json b/build/torch212-cpu-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..86adcc046590ff005ff78b47eb77ba167d8c1f55 --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "activation", + "id": "_activation_cpu_96f42ba", + "version": 2, + "kernels-minver": "0.14.0", + "license": "Apache-2.0", + "python-depends": [], + "kernel-depends": [], + "backend": { + "type": "cpu" + }, + "digest": { + "algorithm": "sha256", + "files": { + "__init__.py": "NQdhY7p9BPoMw0NQodMKFTPSQXBlrsX3yUdP8MEHyH0=", + "_activation_cpu_96f42ba.abi3.so": "dQV1ffu1LlO9nhqRRMdg0hLIXJZh11weLjiX+8xASYY=", + "_autograd.py": "zOE67V8Ix8QHmeO1XjvKYue1aIgGOa2BpuJ7ablYbMg=", + "_ops.py": "aPzZXtXSagtNkrKyqGh3dnwKQlGZTYr7wSpnP/f/FY4=", + "layers.py": "4hZUzmc68DwI9Ldg4vimZ61OlNu1KHTdTAzHgtIDZoY=", + "symbols.json": "ZKZtww/dcNUL0IncOFdRn1bXB5giYx0oGTMRURk2pLk=" + } + }, + "provenance": { + "kernel-builder": { + "version": "0.19.0-dev1", + "commit": "513f08bc6e20e6e59efcd2307851903b054746f3", + "dirty": false + }, + "kernel": { + "commit": "96f42ba3633a93208557a942762e52005952b21a", + "dirty": false + } + } +} \ No newline at end of file diff --git a/build/torch212-cpu-x86_64-linux/metadata.json.sigstore b/build/torch212-cpu-x86_64-linux/metadata.json.sigstore new file mode 100644 index 0000000000000000000000000000000000000000..d872f68ba891413782d14e4e373ffed54986c988 --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/metadata.json.sigstore @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUFrwpfYZza3mvhKt+XGcjvsKFDq8wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMM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KHYQVM9NDfPmm/gIhANDfX43syjWo99qhOVkO2lYFyEXih3mInJePzpp6seixMAoGCCqGSM49BAMDA2gAMGUCMQDOboFfP7J5xFruNq5d3fGMG6HFY0PXbdy9CcrLtrlCXVhckO4yPnlx027G/yg/N/UCMFw2mUoSIWUT5qKlo8W7+HbNRUmlkVq3AWCg8wsHRMFYf5iFWp3j5vjRVOmnqthEog=="},"tlogEntries":[{"logIndex":"4218961369","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1796230644","inclusionPromise":{"signedEntryTimestamp":"MEUCIQDbnh6IsDsq9ueJ6otwmUDXhSdsKO5kR5Yegs5TSG+teQIgQm4X8fLhgodRM9rFUGAxsFcW3Z7N9qLajK95KWZBupY="},"inclusionProof":{"logIndex":"4097057107","rootHash":"mf1nRsTYL/4OoBFdYrWgrorhCD+EaiOZPCTqZ1iIO/k=","treeSize":"4097057113","hashes":["w/RZzKHCkJFj5W3gVISkeBR79B2JNguE0bzQMsfHP0g=","yS2CpbzNNeNshAnoGxFggKbMOvjv7dsgxtekTiAcAT0=","Trws6dCNVB7uHu0qvUfLBgBpWdba1kM+GVqvAi4k1Uc=","kiQsNJkP29hWBOeCHLLh6sq3bFUfgGn7T7gDIE0BhBQ=","pLkza4ANQRBlTzAP+GTpfwpNeckeaeMb0VdlZLNeQHI=","uwVMKVt9aI8muFOTlL5toxWeyZI3nNkduCbQ5vn9I1Q=","FARSYK4FYVunsRK6hTIQKvfuK8oeYWlC32Nl9EPnNY8=","uom17/iiE9LieTotrofLNZgMb2AuLliCqVQFh1RDKws=","iaX4lirwHM3JCSFZkPRv+y8Yr7OTDROBUCoMfzvv1nE=","ShM2Cmd6LdSuw16xoysIjs/Ifl1BHG6BV5Cy5BIFmTs=","cL8X8YtwDBpU5nSgm4Flig3QWi7jgwRaEJN6Dc9RAeE=","dPVUgsZ63CnVNIKEYIvFaP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o7SrIX9QyxfZpJRcpAV2gZOm1AZzR+2rVyy6Uc8Ybp2ybIw13ckH4bcRAjEA5qO8FyOkmYpvg2/7ZNqiPxRzn5vqKHoVcIIqtpKq6l7TvOqzAxxclN7VwTG8e++XMYIB3DCCAdgCAQEwUTA5MRUwEwYDVQQKEwxzaWdzdG9yZS5kZXYxIDAeBgNVBAMTF3NpZ3N0b3JlLXRzYS1zZWxmc2lnbmVkAhQ6E1QvDJBh7rzBQy/Lio6LKiOLDDALBglghkgBZQMEAgGggfwwGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMBwGCSqGSIb3DQEJBTEPFw0yNjEyMDIxNjU3MjRaMC8GCSqGSIb3DQEJBDEiBCAAwdavfrlMQOgQ793kGgEPXqbX+bseJFosx+FKf9gq7DCBjgYLKoZIhvcNAQkQAi8xfzB9MHsweQQghfknvAerYsrDtENWwQ78gbLGiD/aernm2HDZ0TrNBbcwVTA9pDswOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEaDBmAjEAtyYCsEt/CriVaACPe5A7hIUkfNqAdhXpbElUUIgS8RYFdpTv6wbeRM9F+L0/gsJ1AjEAhjBgsvbI6zP2yr8lzeEdIJVm5pORCCySHyGUHsR/oZrt878XEX5o8VPmT2PyJoQP"}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"CJc+CuOCjS5l7OWpoNnL0Mp46ViaKbGVxVkE0DvA2a8="},"signature":"MEUCIQD5LLJ74CbCM3rCMUuEN+f/4cC45+G5MFRmrqvAdpeYiQIgZBpiE6wkkXQUMqLTMhmNi2VN2lCK+JY5QFX79LC+MQ4="}} diff --git a/build/torch212-cpu-x86_64-linux/symbols.json b/build/torch212-cpu-x86_64-linux/symbols.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1d36d1cd058a0f4389783a7edc4b1aa5dc8f6c --- /dev/null +++ b/build/torch212-cpu-x86_64-linux/symbols.json @@ -0,0 +1,580 @@ +{ + "schema_version": 1, + "module": "_activation_cpu_96f42ba", + "functions": [ + { + "name": "silu_and_mul", + "qualname": "silu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "mul_and_silu", + "qualname": "mul_and_silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_and_mul", + "qualname": "gelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh_and_mul", + "qualname": "gelu_tanh_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "fatrelu_and_mul", + "qualname": "fatrelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_fast", + "qualname": "gelu_fast", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_new", + "qualname": "gelu_new", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_quick", + "qualname": "gelu_quick", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh", + "qualname": "gelu_tanh", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "silu", + "qualname": "silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu", + "qualname": "gelu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + } + ], + "layers": [ + { + "name": "FastGELU", + "qualname": "FastGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "FatreluAndMul", + "qualname": "FatreluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for FATReLU.\n\nThe function computes x -> FATReLU(x[:d]) * x[d:] where\nd = x.shape[-1] // 2.\nThis is used in openbmb/MiniCPM-S-1B-sft.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": null + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Gelu", + "qualname": "Gelu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU.\n\nThe function computes x -> gelu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluAndMul", + "qualname": "GeluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GeGLU.\n\nThe function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d)\n return: (batch_size, seq_len, d) or (num_tokens, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanh", + "qualname": "GeluTanh", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU with `tanh` approximation.\n\nThe function computes x -> gelu_tanh(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanhAndMul", + "qualname": "GeluTanhAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "MulAndSilu", + "qualname": "MulAndSilu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "NewGELU", + "qualname": "NewGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "QuickGELU", + "qualname": "QuickGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Silu", + "qualname": "Silu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SiLU.\n\nThe function computes x -> silu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "SiluAndMul", + "qualname": "SiluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + } + ] +} diff --git a/build/torch213-cpu-x86_64-linux/__init__.py b/build/torch213-cpu-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfce59ba42c1f11608bb13f7da601812a79649a0 --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/__init__.py @@ -0,0 +1,75 @@ +import torch + +from ._ops import ops + +from . import layers + + +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu_and_mul(out, x) + return out + + +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.mul_and_silu(out, x) + return out + + +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_and_mul(out, x) + return out + + +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh_and_mul(out, x) + return out + + +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: + ops.fatrelu_and_mul(out, x, threshold) + return out + + +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu(out, x) + return out + +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu(out, x) + return out + + +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh(out, x) + return out + + +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_fast(out, x) + return out + + +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_new(out, x) + return out + + +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_quick(out, x) + return out + + +__all__ = [ + "silu_and_mul", + "mul_and_silu", + "gelu_and_mul", + "gelu_tanh_and_mul", + "fatrelu_and_mul", + "gelu_fast", + "gelu_new", + "gelu_quick", + "gelu_tanh", + "silu", + "gelu", + "layers", +] diff --git a/build/torch213-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so b/build/torch213-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..3f85637a1939c4ac58fb82b9718e2a60f6c635f9 Binary files /dev/null and b/build/torch213-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so differ diff --git a/build/torch213-cpu-x86_64-linux/_autograd.py b/build/torch213-cpu-x86_64-linux/_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..381f3ceb9b971ce3fd24c79f7a1922af6f3c3325 --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/_autograd.py @@ -0,0 +1,52 @@ +import torch + +from ._ops import ops + + +def _output_shape(x, gated): + torch._check(x.ndim > 0) + if gated: + torch._check(x.shape[-1] % 2 == 0) + return x.shape[:-1] + (x.shape[-1] // 2,) + return x.shape + + +def _register(forward_op, backward_op, *, gated=False, threshold=False): + # Register against the C++ schema, not a second Python custom operator. + forward_op = forward_op.default + backward_op = backward_op.default + + def fake_forward(x, *args): + return x.new_empty(_output_shape(x, gated)) + + def fake_backward(grad_output, x, *args): + return x.new_empty(x.shape) + + def setup_context(ctx, inputs, output): + ctx.save_for_backward(inputs[0]) + if threshold: + ctx.threshold = inputs[1] + + def backward(ctx, grad_output): + (x,) = ctx.saved_tensors + if threshold: + return backward_op(grad_output, x, ctx.threshold), None + return backward_op(grad_output, x) + + torch.library.register_fake(forward_op, fake_forward) + torch.library.register_fake(backward_op, fake_backward) + torch.library.register_autograd(forward_op, backward, setup_context=setup_context) + + +def register_autograd(): + _register(ops.silu_forward, ops.silu_backward) + _register(ops.gelu_forward, ops.gelu_backward) + _register(ops.gelu_tanh_forward, ops.gelu_tanh_backward) + _register(ops.gelu_fast_forward, ops.gelu_fast_backward) + _register(ops.gelu_new_forward, ops.gelu_new_backward) + _register(ops.gelu_quick_forward, ops.gelu_quick_backward) + _register(ops.silu_and_mul_forward, ops.silu_and_mul_backward, gated=True) + _register(ops.mul_and_silu_forward, ops.mul_and_silu_backward, gated=True) + _register(ops.gelu_and_mul_forward, ops.gelu_and_mul_backward, gated=True) + _register(ops.gelu_tanh_and_mul_forward, ops.gelu_tanh_and_mul_backward, gated=True) + _register(ops.fatrelu_and_mul_forward, ops.fatrelu_and_mul_backward, gated=True, threshold=True) diff --git a/build/torch213-cpu-x86_64-linux/_ops.py b/build/torch213-cpu-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..f978ef7b0add9da34f4aef93c0fceb4713f05908 --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _activation_cpu_96f42ba +ops = torch.ops._activation_cpu_96f42ba + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_activation_cpu_96f42ba::{op_name}" diff --git a/build/torch213-cpu-x86_64-linux/layers.py b/build/torch213-cpu-x86_64-linux/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..07e57bd6a62336ba29de758220b94bbaedb16549 --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/layers.py @@ -0,0 +1,170 @@ + +import torch +import torch.nn as nn + +from ._autograd import register_autograd +from ._ops import ops + + +register_autograd() + + +class SiluAndMul(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_and_mul_forward(x) + + +class Silu(nn.Module): + """An activation function for SiLU. + + The function computes x -> silu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_forward(x) + + +class Gelu(nn.Module): + """An activation function for GELU. + + The function computes x -> gelu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_forward(x) + + +class GeluTanh(nn.Module): + """An activation function for GELU with `tanh` approximation. + + The function computes x -> gelu_tanh(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_forward(x) + + +class MulAndSilu(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.mul_and_silu_forward(x) + + +class GeluAndMul(nn.Module): + """An activation function for GeGLU. + + The function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d) + return: (batch_size, seq_len, d) or (num_tokens, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_and_mul_forward(x) + + +class GeluTanhAndMul(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_and_mul_forward(x) + + +class FatreluAndMul(nn.Module): + """An activation function for FATReLU. + + The function computes x -> FATReLU(x[:d]) * x[d:] where + d = x.shape[-1] // 2. + This is used in openbmb/MiniCPM-S-1B-sft. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def __init__(self, threshold: float = 0.0): + super().__init__() + self.threshold = threshold + + def forward(self, x: torch.Tensor): + return ops.fatrelu_and_mul_forward(x, self.threshold) + + +class FastGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_fast_forward(x) + + +class NewGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_new_forward(x) + + +class QuickGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_quick_forward(x) + + +__all__ = [ + "FastGELU", + "FatreluAndMul", + "Gelu", + "GeluAndMul", + "GeluTanh", + "GeluTanhAndMul", + "MulAndSilu", + "NewGELU", + "QuickGELU", + "Silu", + "SiluAndMul", +] diff --git a/build/torch213-cpu-x86_64-linux/metadata.json b/build/torch213-cpu-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..358d0a9ea52edc7d3e5531d38b7cc7dfbbd4f525 --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "activation", + "id": "_activation_cpu_96f42ba", + "version": 2, + "kernels-minver": "0.14.0", + "license": "Apache-2.0", + "python-depends": [], + "kernel-depends": [], + "backend": { + "type": "cpu" + }, + "digest": { + "algorithm": "sha256", + "files": { + "__init__.py": "NQdhY7p9BPoMw0NQodMKFTPSQXBlrsX3yUdP8MEHyH0=", + "_activation_cpu_96f42ba.abi3.so": "vBCnxEdwi1UqMiMfyho856KL0j4CeWBVyyNLAhaQBQs=", + "_autograd.py": "zOE67V8Ix8QHmeO1XjvKYue1aIgGOa2BpuJ7ablYbMg=", + "_ops.py": "aPzZXtXSagtNkrKyqGh3dnwKQlGZTYr7wSpnP/f/FY4=", + "layers.py": "4hZUzmc68DwI9Ldg4vimZ61OlNu1KHTdTAzHgtIDZoY=", + "symbols.json": "ZKZtww/dcNUL0IncOFdRn1bXB5giYx0oGTMRURk2pLk=" + } + }, + "provenance": { + "kernel-builder": { + "version": "0.19.0-dev1", + "commit": "513f08bc6e20e6e59efcd2307851903b054746f3", + "dirty": false + }, + "kernel": { + "commit": "96f42ba3633a93208557a942762e52005952b21a", + "dirty": false + } + } +} \ No newline at end of file diff --git a/build/torch213-cpu-x86_64-linux/metadata.json.sigstore b/build/torch213-cpu-x86_64-linux/metadata.json.sigstore new file mode 100644 index 0000000000000000000000000000000000000000..83b2626a15ff5edf8feb0fa901a4f3a9f142c62e --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/metadata.json.sigstore @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUFrwpfYZza3mvhKt+XGcjvsKFDq8wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMjAyMTY1NzI0WhcNMjYxMjAyMTcwNzI0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEl+mDqoowV55TWbrjCyRhWQUdso399PWjb01R0s4jE0sHu/+qMfFXIc+e2nenUr39SUFGuGpde7kR87Yxl5EZE6OCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21tdW5pdHkvLmdpdGh1Yi93b3JrZmxvd3MvYnVpbGQueWFtbEByZWZzL2hlYWRzL21haW4wOQYKKwYBBAGDvzABAQQraHR0cHM6Ly90b2tlbi5hY3Rpb25zLmdpdGh1YnVzZXJjb250ZW50LmNvbTAfBgorBgEEAYO/MAECBBF3b3JrZmxvd19kaXNwYXRjaDA2BgorBgEEAYO/MAEDBCg5NmY0MmJhMzYzM2E5MzIwODU1N2E5NDI3NjJlNTIwMDU5NTJiMjFhMBMGCisGAQQBg78wAQQEBUJ1aWxkMCsGCisGAQQBg78wAQUEHWh1Z2dpbmdmY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uY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80NjkyOTYyMDIyMy9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGiN7CBvQAABAMARzBFAiB7W9IhS/h4H5zbmzCWkX9YTzgnyg6KHYQVM9NDfPmm/gIhANDfX43syjWo99qhOVkO2lYFyEXih3mInJePzpp6seixMAoGCCqGSM49BAMDA2gAMGUCMQDOboFfP7J5xFruNq5d3fGMG6HFY0PXbdy9CcrLtrlCXVhckO4yPnlx027G/yg/N/UCMFw2mUoSIWUT5qKlo8W7+HbNRUmlkVq3AWCg8wsHRMFYf5iFWp3j5vjRVOmnqthEog=="},"tlogEntries":[{"logIndex":"4218961364","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1796230644","inclusionPromise":{"signedEntryTimestamp":"MEQCIF9/oXJP2uXSp/9CSUsQhw4hkEtBiJ9/gDNiPvtwcb2SAiBsH0QNgw7FdfOSSL4X6vFp/0LUTIst9Oezirljm/wnnw=="},"inclusionProof":{"logIndex":"4097057102","rootHash":"v6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=","treeSize":"4097057108","hashes":["MdhmBzhfW05U7vAi1DOZiOhkCxrfXB6G/HFKREOr8i8=","wUvElen/Vslzn5rA+UDP50wTqwYmWhhGWg87l4Wxcdg=","hRfOyCKgnPo/zDSGs293VIz1C+pz7slxIySfuoLYVDI=","ye1BBWzT+NC6NLQeeh6BN7GLRlIrKSJ4KJp2w255uxg=","PD1MAKQIxeY3WPy6pbGD33wTyJIBktKzFstqJQiwFO0=","uwVMKVt9aI8muFOTlL5toxWeyZI3nNkduCbQ5vn9I1Q=","FARSYK4FYVunsRK6hTIQKvfuK8oeYWlC32Nl9EPnNY8=","uom17/iiE9LieTotrofLNZgMb2AuLliCqVQFh1RDKws=","iaX4lirwHM3JCSFZkPRv+y8Yr7OTDROBUCoMfzvv1nE=","ShM2Cmd6LdSuw16xoysIjs/Ifl1BHG6BV5Cy5BIFmTs=","cL8X8YtwDBpU5nSgm4Flig3QWi7jgwRaEJN6Dc9RAeE=","dPVUgsZ63CnVNIKEYIvFaPnDRf7T99m/S8kwoh8cX0c=","yznKUifjcNgdsio4X7Umz1O2L3z0M+cVcIDsnwwhJ/c=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n4097057108\nv6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=\n\n— rekor.sigstore.dev wNI9ajBGAiEA8UT9MrLvLSUswYjt6J2OZGGK5a1BBUZ1NdhrZC4fYxYCIQDdEhc+N3sgzlT99c5lCP3xxYErhzMlruJ5ETNrWnivzg==\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJkYXRhIjp7Imhhc2giOnsiYWxnb3JpdGhtIjoic2hhMjU2IiwidmFsdWUiOiIwZDE0M2Q5NmI2NTVjMmRmNDU1MjI3Njk5NmI0ZjdhYzEwODZmYTkxZWYwMmM0N2I2OTQxYWJlOWU2YzcyZWY0In19LCJzaWduYXR1cmUiOnsiY29udGVudCI6Ik1FVUNJUUNVWFFLd0Fmanl4NVpwY0lQKzU0YWxzVTFU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KaNlfww+XybkHCVXVtzVxNI56b19Ox/1wGV/nINVWOoig12A="}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"DRQ9lrZVwt9FUidplrT3rBCG+pHvAsR7aUGr6ebHLvQ="},"signature":"MEUCIQCUXQKwAfjyx5ZpcIP+54alsU1T9GKfZNQM+cGQKKQdVwIgQ3HliEuMI34phTL4OwlvmvZTaaD24jCRjp63JXfNgh0="}} diff --git a/build/torch213-cpu-x86_64-linux/symbols.json b/build/torch213-cpu-x86_64-linux/symbols.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1d36d1cd058a0f4389783a7edc4b1aa5dc8f6c --- /dev/null +++ b/build/torch213-cpu-x86_64-linux/symbols.json @@ -0,0 +1,580 @@ +{ + "schema_version": 1, + "module": "_activation_cpu_96f42ba", + "functions": [ + { + "name": "silu_and_mul", + "qualname": "silu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "mul_and_silu", + "qualname": "mul_and_silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_and_mul", + "qualname": "gelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh_and_mul", + "qualname": "gelu_tanh_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "fatrelu_and_mul", + "qualname": "fatrelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_fast", + "qualname": "gelu_fast", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_new", + "qualname": "gelu_new", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_quick", + "qualname": "gelu_quick", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh", + "qualname": "gelu_tanh", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "silu", + "qualname": "silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu", + "qualname": "gelu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + } + ], + "layers": [ + { + "name": "FastGELU", + "qualname": "FastGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "FatreluAndMul", + "qualname": "FatreluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for FATReLU.\n\nThe function computes x -> FATReLU(x[:d]) * x[d:] where\nd = x.shape[-1] // 2.\nThis is used in openbmb/MiniCPM-S-1B-sft.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": null + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Gelu", + "qualname": "Gelu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU.\n\nThe function computes x -> gelu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluAndMul", + "qualname": "GeluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GeGLU.\n\nThe function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d)\n return: (batch_size, seq_len, d) or (num_tokens, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanh", + "qualname": "GeluTanh", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU with `tanh` approximation.\n\nThe function computes x -> gelu_tanh(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanhAndMul", + "qualname": "GeluTanhAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "MulAndSilu", + "qualname": "MulAndSilu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "NewGELU", + "qualname": "NewGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "QuickGELU", + "qualname": "QuickGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Silu", + "qualname": "Silu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SiLU.\n\nThe function computes x -> silu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "SiluAndMul", + "qualname": "SiluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + } + ] +} diff --git a/build/torch214-cpu-x86_64-linux/__init__.py b/build/torch214-cpu-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfce59ba42c1f11608bb13f7da601812a79649a0 --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/__init__.py @@ -0,0 +1,75 @@ +import torch + +from ._ops import ops + +from . import layers + + +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu_and_mul(out, x) + return out + + +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.mul_and_silu(out, x) + return out + + +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_and_mul(out, x) + return out + + +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh_and_mul(out, x) + return out + + +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: + ops.fatrelu_and_mul(out, x, threshold) + return out + + +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu(out, x) + return out + +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu(out, x) + return out + + +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh(out, x) + return out + + +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_fast(out, x) + return out + + +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_new(out, x) + return out + + +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_quick(out, x) + return out + + +__all__ = [ + "silu_and_mul", + "mul_and_silu", + "gelu_and_mul", + "gelu_tanh_and_mul", + "fatrelu_and_mul", + "gelu_fast", + "gelu_new", + "gelu_quick", + "gelu_tanh", + "silu", + "gelu", + "layers", +] diff --git a/build/torch214-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so b/build/torch214-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..4bef1f916043db8bbc96c181c98783742549c779 Binary files /dev/null and b/build/torch214-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so differ diff --git a/build/torch214-cpu-x86_64-linux/_autograd.py b/build/torch214-cpu-x86_64-linux/_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..381f3ceb9b971ce3fd24c79f7a1922af6f3c3325 --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/_autograd.py @@ -0,0 +1,52 @@ +import torch + +from ._ops import ops + + +def _output_shape(x, gated): + torch._check(x.ndim > 0) + if gated: + torch._check(x.shape[-1] % 2 == 0) + return x.shape[:-1] + (x.shape[-1] // 2,) + return x.shape + + +def _register(forward_op, backward_op, *, gated=False, threshold=False): + # Register against the C++ schema, not a second Python custom operator. + forward_op = forward_op.default + backward_op = backward_op.default + + def fake_forward(x, *args): + return x.new_empty(_output_shape(x, gated)) + + def fake_backward(grad_output, x, *args): + return x.new_empty(x.shape) + + def setup_context(ctx, inputs, output): + ctx.save_for_backward(inputs[0]) + if threshold: + ctx.threshold = inputs[1] + + def backward(ctx, grad_output): + (x,) = ctx.saved_tensors + if threshold: + return backward_op(grad_output, x, ctx.threshold), None + return backward_op(grad_output, x) + + torch.library.register_fake(forward_op, fake_forward) + torch.library.register_fake(backward_op, fake_backward) + torch.library.register_autograd(forward_op, backward, setup_context=setup_context) + + +def register_autograd(): + _register(ops.silu_forward, ops.silu_backward) + _register(ops.gelu_forward, ops.gelu_backward) + _register(ops.gelu_tanh_forward, ops.gelu_tanh_backward) + _register(ops.gelu_fast_forward, ops.gelu_fast_backward) + _register(ops.gelu_new_forward, ops.gelu_new_backward) + _register(ops.gelu_quick_forward, ops.gelu_quick_backward) + _register(ops.silu_and_mul_forward, ops.silu_and_mul_backward, gated=True) + _register(ops.mul_and_silu_forward, ops.mul_and_silu_backward, gated=True) + _register(ops.gelu_and_mul_forward, ops.gelu_and_mul_backward, gated=True) + _register(ops.gelu_tanh_and_mul_forward, ops.gelu_tanh_and_mul_backward, gated=True) + _register(ops.fatrelu_and_mul_forward, ops.fatrelu_and_mul_backward, gated=True, threshold=True) diff --git a/build/torch214-cpu-x86_64-linux/_ops.py b/build/torch214-cpu-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..f978ef7b0add9da34f4aef93c0fceb4713f05908 --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _activation_cpu_96f42ba +ops = torch.ops._activation_cpu_96f42ba + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_activation_cpu_96f42ba::{op_name}" diff --git a/build/torch214-cpu-x86_64-linux/layers.py b/build/torch214-cpu-x86_64-linux/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..07e57bd6a62336ba29de758220b94bbaedb16549 --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/layers.py @@ -0,0 +1,170 @@ + +import torch +import torch.nn as nn + +from ._autograd import register_autograd +from ._ops import ops + + +register_autograd() + + +class SiluAndMul(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_and_mul_forward(x) + + +class Silu(nn.Module): + """An activation function for SiLU. + + The function computes x -> silu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_forward(x) + + +class Gelu(nn.Module): + """An activation function for GELU. + + The function computes x -> gelu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_forward(x) + + +class GeluTanh(nn.Module): + """An activation function for GELU with `tanh` approximation. + + The function computes x -> gelu_tanh(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_forward(x) + + +class MulAndSilu(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.mul_and_silu_forward(x) + + +class GeluAndMul(nn.Module): + """An activation function for GeGLU. + + The function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d) + return: (batch_size, seq_len, d) or (num_tokens, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_and_mul_forward(x) + + +class GeluTanhAndMul(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_and_mul_forward(x) + + +class FatreluAndMul(nn.Module): + """An activation function for FATReLU. + + The function computes x -> FATReLU(x[:d]) * x[d:] where + d = x.shape[-1] // 2. + This is used in openbmb/MiniCPM-S-1B-sft. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def __init__(self, threshold: float = 0.0): + super().__init__() + self.threshold = threshold + + def forward(self, x: torch.Tensor): + return ops.fatrelu_and_mul_forward(x, self.threshold) + + +class FastGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_fast_forward(x) + + +class NewGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_new_forward(x) + + +class QuickGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_quick_forward(x) + + +__all__ = [ + "FastGELU", + "FatreluAndMul", + "Gelu", + "GeluAndMul", + "GeluTanh", + "GeluTanhAndMul", + "MulAndSilu", + "NewGELU", + "QuickGELU", + "Silu", + "SiluAndMul", +] diff --git a/build/torch214-cpu-x86_64-linux/metadata.json b/build/torch214-cpu-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..a11ab8673902e2da718df449f2cab12b8059993f --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "activation", + "id": "_activation_cpu_96f42ba", + "version": 2, + "kernels-minver": "0.14.0", + "license": "Apache-2.0", + "python-depends": [], + "kernel-depends": [], + "backend": { + "type": "cpu" + }, + "digest": { + "algorithm": "sha256", + "files": { + "__init__.py": "NQdhY7p9BPoMw0NQodMKFTPSQXBlrsX3yUdP8MEHyH0=", + "_activation_cpu_96f42ba.abi3.so": "nyxvVYC7DpnqEB84JiE7A8H+u3EzyDCLqyCElPHhzS4=", + "_autograd.py": "zOE67V8Ix8QHmeO1XjvKYue1aIgGOa2BpuJ7ablYbMg=", + "_ops.py": "aPzZXtXSagtNkrKyqGh3dnwKQlGZTYr7wSpnP/f/FY4=", + "layers.py": "4hZUzmc68DwI9Ldg4vimZ61OlNu1KHTdTAzHgtIDZoY=", + "symbols.json": "ZKZtww/dcNUL0IncOFdRn1bXB5giYx0oGTMRURk2pLk=" + } + }, + "provenance": { + "kernel-builder": { + "version": "0.19.0-dev1", + "commit": "513f08bc6e20e6e59efcd2307851903b054746f3", + "dirty": false + }, + "kernel": { + "commit": "96f42ba3633a93208557a942762e52005952b21a", + "dirty": false + } + } +} \ No newline at end of file diff --git a/build/torch214-cpu-x86_64-linux/metadata.json.sigstore b/build/torch214-cpu-x86_64-linux/metadata.json.sigstore new file mode 100644 index 0000000000000000000000000000000000000000..a7c8d2999eb7386c4cf8359d9068f79a9364dfe1 --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/metadata.json.sigstore @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUFrwpfYZza3mvhKt+XGcjvsKFDq8wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMjAyMTY1NzI0WhcNMjYxMjAyMTcwNzI0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEl+mDqoowV55TWbrjCyRhWQUdso399PWjb01R0s4jE0sHu/+qMfFXIc+e2nenUr39SUFGuGpde7kR87Yxl5EZE6OCBdEwggXNMA4GA1UdDwEB/wQEAwIHgDATBgNVHSUEDDAKBggrBgEFBQcDAzAfBgNVHSMEGDAWgBTf0+nPViQRlvmo2OkoVaLGLhhkPzBrBgNVHREBAf8EYTBfhl1odHRwczovL2dpdGh1Yi5jb20vaHVnZ2luZ2ZhY2Uva2VybmVscy1jb21td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1NzIwNzQzMG0GCisGAQQBg78wARIEXwxdaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5Ly5naXRodWIvd29ya2Zsb3dzL2J1aWxkLnlhbWxAcmVmcy9oZWFkcy9tYWluMDgGCisGAQQBg78wARMEKgwoOTZmNDJiYTM2MzNhOTMyMDg1NTdhOTQyNzYyZTUyMDA1OTUyYjIxYTAhBgorBgEEAYO/MAEUBBMMEXdvcmtmbG93X2Rpc3BhdGNoMGQGCisGAQQBg78wARUEVgxUaHR0cHM6Ly9naXRodWIuY29tL2h1Z2dpbmdmYWNlL2tlcm5lbHMtY29tbXVuaXR5L2FjdGlvbnMvcnVucy80NjkyOTYyMDIyMy9hdHRlbXB0cy8xMBYGCisGAQQBg78wARYECAwGcHVibGljMEYGCisGAQQBg78wARgEOAw2cmVwbzpodWdnaW5nZmFjZS9rZXJuZWxzLWNvbW11bml0eTpyZWY6cmVmcy9oZWFkcy9tYWluMIGKBgorBgEEAdZ5AgQCBHwEegB4AHYA3T0wasbHETJjGR4cmWc3AqJKXrjePK3/h4pygC8p7o4AAAGiN7CBvQAABAMARzBFAiB7W9IhS/h4H5zbmzCWkX9YTzgnyg6KHYQVM9NDfPmm/gIhANDfX43syjWo99qhOVkO2lYFyEXih3mInJePzpp6seixMAoGCCqGSM49BAMDA2gAMGUCMQDOboFfP7J5xFruNq5d3fGMG6HFY0PXbdy9CcrLtrlCXVhckO4yPnlx027G/yg/N/UCMFw2mUoSIWUT5qKlo8W7+HbNRUmlkVq3AWCg8wsHRMFYf5iFWp3j5vjRVOmnqthEog=="},"tlogEntries":[{"logIndex":"4218961366","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1796230644","inclusionPromise":{"signedEntryTimestamp":"MEUCIQCyYq51uo7/gPJHCPeyuMBm3oI33r0g2y6TUI4k4q1MRAIgNZade3Cr2XqTSU87z1JXMFhYeebbaHyaqUB28Cj7/Cw="},"inclusionProof":{"logIndex":"4097057104","rootHash":"v6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=","treeSize":"4097057108","hashes":["Pa4cI1Ff7Sv33ODv0O+2uWcHpxCheatq4mXdd8gauyM=","jv0antvMO0uuOgi6oOfOIo1isBOki55/LuxdCKnlD3I=","pLkza4ANQRBlTzAP+GTpfwpNeckeaeMb0VdlZLNeQHI=","uwVMKVt9aI8muFOTlL5toxWeyZI3nNkduCbQ5vn9I1Q=","FARSYK4FYVunsRK6hTIQKvfuK8oeYWlC32Nl9EPnNY8=","uom17/iiE9LieTotrofLNZgMb2AuLliCqVQFh1RDKws=","iaX4lirwHM3JCSFZkPRv+y8Yr7OTDROBUCoMfzvv1nE=","ShM2Cmd6LdSuw16xoysIjs/Ifl1BHG6BV5Cy5BIFmTs=","cL8X8YtwDBpU5nSgm4Flig3QWi7jgwRaEJN6Dc9RAeE=","dPVUgsZ63CnVNIKEYIvFaPnDRf7T99m/S8kwoh8cX0c=","yznKUifjcNgdsio4X7Umz1O2L3z0M+cVcIDsnwwhJ/c=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n4097057108\nv6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=\n\n— rekor.sigstore.dev wNI9ajBFAiEA32PVskwC/IcjgkumuQJ5Cd3cCn+Y98NsBADsEOH0e6UCIDfLgvwkAoVI9EZeasWcw0s5v+JWdqaMPrknc0BW5BP5\n"}},"canonicalizedBody":"eyJhcGlWZXJzaW9uIjoiMC4wLjEiLCJraW5kIjoiaGFzaGVkcmVrb3JkIiwic3BlYyI6eyJ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bcwVTA9pDswOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEaDBmAjEAsCeNrQSUTMZ7lFJmwmqjxM4jVjrcPmpq+x/hwKHXh68qIes/2FldKDB67oIDjdTtAjEA9usM1gc6LEk8dPpaK15pkwjIWdWiFg863XxxrpTygnS8cI6sObR5EJsZ11xvIzWH"}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"F1reUcgQtsDND4ZlnJrOdbWV7chvj1OOwmNWtAKnk5E="},"signature":"MEQCIExziauCcs4hSSP+lbznyLsn1wFIvMgaGMiBCNQ3hI+EAiB9VgcOgHKnu1PDPY9Fq8oQG8UroX5w5AcrwSUjs1OF1Q=="}} diff --git a/build/torch214-cpu-x86_64-linux/symbols.json b/build/torch214-cpu-x86_64-linux/symbols.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1d36d1cd058a0f4389783a7edc4b1aa5dc8f6c --- /dev/null +++ b/build/torch214-cpu-x86_64-linux/symbols.json @@ -0,0 +1,580 @@ +{ + "schema_version": 1, + "module": "_activation_cpu_96f42ba", + "functions": [ + { + "name": "silu_and_mul", + "qualname": "silu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "mul_and_silu", + "qualname": "mul_and_silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_and_mul", + "qualname": "gelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh_and_mul", + "qualname": "gelu_tanh_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "fatrelu_and_mul", + "qualname": "fatrelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_fast", + "qualname": "gelu_fast", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_new", + "qualname": "gelu_new", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_quick", + "qualname": "gelu_quick", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh", + "qualname": "gelu_tanh", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "silu", + "qualname": "silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu", + "qualname": "gelu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + } + ], + "layers": [ + { + "name": "FastGELU", + "qualname": "FastGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "FatreluAndMul", + "qualname": "FatreluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for FATReLU.\n\nThe function computes x -> FATReLU(x[:d]) * x[d:] where\nd = x.shape[-1] // 2.\nThis is used in openbmb/MiniCPM-S-1B-sft.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": null + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Gelu", + "qualname": "Gelu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU.\n\nThe function computes x -> gelu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluAndMul", + "qualname": "GeluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GeGLU.\n\nThe function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d)\n return: (batch_size, seq_len, d) or (num_tokens, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanh", + "qualname": "GeluTanh", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU with `tanh` approximation.\n\nThe function computes x -> gelu_tanh(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanhAndMul", + "qualname": "GeluTanhAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "MulAndSilu", + "qualname": "MulAndSilu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "NewGELU", + "qualname": "NewGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "QuickGELU", + "qualname": "QuickGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Silu", + "qualname": "Silu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SiLU.\n\nThe function computes x -> silu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "SiluAndMul", + "qualname": "SiluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + } + ] +} diff --git a/build/torch215-cpu-x86_64-linux/__init__.py b/build/torch215-cpu-x86_64-linux/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cfce59ba42c1f11608bb13f7da601812a79649a0 --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/__init__.py @@ -0,0 +1,75 @@ +import torch + +from ._ops import ops + +from . import layers + + +def silu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu_and_mul(out, x) + return out + + +def mul_and_silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.mul_and_silu(out, x) + return out + + +def gelu_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_and_mul(out, x) + return out + + +def gelu_tanh_and_mul(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh_and_mul(out, x) + return out + + +def fatrelu_and_mul(out: torch.Tensor, x: torch.Tensor, threshold: float = 0.0) -> torch.Tensor: + ops.fatrelu_and_mul(out, x, threshold) + return out + + +def gelu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu(out, x) + return out + +def silu(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.silu(out, x) + return out + + +def gelu_tanh(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_tanh(out, x) + return out + + +def gelu_fast(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_fast(out, x) + return out + + +def gelu_new(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_new(out, x) + return out + + +def gelu_quick(out: torch.Tensor, x: torch.Tensor) -> torch.Tensor: + ops.gelu_quick(out, x) + return out + + +__all__ = [ + "silu_and_mul", + "mul_and_silu", + "gelu_and_mul", + "gelu_tanh_and_mul", + "fatrelu_and_mul", + "gelu_fast", + "gelu_new", + "gelu_quick", + "gelu_tanh", + "silu", + "gelu", + "layers", +] diff --git a/build/torch215-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so b/build/torch215-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so new file mode 100644 index 0000000000000000000000000000000000000000..eb86e50ebf3d4ace6198c715a2442415b9c06075 Binary files /dev/null and b/build/torch215-cpu-x86_64-linux/_activation_cpu_96f42ba.abi3.so differ diff --git a/build/torch215-cpu-x86_64-linux/_autograd.py b/build/torch215-cpu-x86_64-linux/_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..381f3ceb9b971ce3fd24c79f7a1922af6f3c3325 --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/_autograd.py @@ -0,0 +1,52 @@ +import torch + +from ._ops import ops + + +def _output_shape(x, gated): + torch._check(x.ndim > 0) + if gated: + torch._check(x.shape[-1] % 2 == 0) + return x.shape[:-1] + (x.shape[-1] // 2,) + return x.shape + + +def _register(forward_op, backward_op, *, gated=False, threshold=False): + # Register against the C++ schema, not a second Python custom operator. + forward_op = forward_op.default + backward_op = backward_op.default + + def fake_forward(x, *args): + return x.new_empty(_output_shape(x, gated)) + + def fake_backward(grad_output, x, *args): + return x.new_empty(x.shape) + + def setup_context(ctx, inputs, output): + ctx.save_for_backward(inputs[0]) + if threshold: + ctx.threshold = inputs[1] + + def backward(ctx, grad_output): + (x,) = ctx.saved_tensors + if threshold: + return backward_op(grad_output, x, ctx.threshold), None + return backward_op(grad_output, x) + + torch.library.register_fake(forward_op, fake_forward) + torch.library.register_fake(backward_op, fake_backward) + torch.library.register_autograd(forward_op, backward, setup_context=setup_context) + + +def register_autograd(): + _register(ops.silu_forward, ops.silu_backward) + _register(ops.gelu_forward, ops.gelu_backward) + _register(ops.gelu_tanh_forward, ops.gelu_tanh_backward) + _register(ops.gelu_fast_forward, ops.gelu_fast_backward) + _register(ops.gelu_new_forward, ops.gelu_new_backward) + _register(ops.gelu_quick_forward, ops.gelu_quick_backward) + _register(ops.silu_and_mul_forward, ops.silu_and_mul_backward, gated=True) + _register(ops.mul_and_silu_forward, ops.mul_and_silu_backward, gated=True) + _register(ops.gelu_and_mul_forward, ops.gelu_and_mul_backward, gated=True) + _register(ops.gelu_tanh_and_mul_forward, ops.gelu_tanh_and_mul_backward, gated=True) + _register(ops.fatrelu_and_mul_forward, ops.fatrelu_and_mul_backward, gated=True, threshold=True) diff --git a/build/torch215-cpu-x86_64-linux/_ops.py b/build/torch215-cpu-x86_64-linux/_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..f978ef7b0add9da34f4aef93c0fceb4713f05908 --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/_ops.py @@ -0,0 +1,9 @@ +import torch +from . import _activation_cpu_96f42ba +ops = torch.ops._activation_cpu_96f42ba + +def add_op_namespace_prefix(op_name: str): + """ + Prefix op by namespace. + """ + return f"_activation_cpu_96f42ba::{op_name}" diff --git a/build/torch215-cpu-x86_64-linux/layers.py b/build/torch215-cpu-x86_64-linux/layers.py new file mode 100644 index 0000000000000000000000000000000000000000..07e57bd6a62336ba29de758220b94bbaedb16549 --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/layers.py @@ -0,0 +1,170 @@ + +import torch +import torch.nn as nn + +from ._autograd import register_autograd +from ._ops import ops + + +register_autograd() + + +class SiluAndMul(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_and_mul_forward(x) + + +class Silu(nn.Module): + """An activation function for SiLU. + + The function computes x -> silu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.silu_forward(x) + + +class Gelu(nn.Module): + """An activation function for GELU. + + The function computes x -> gelu(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_forward(x) + + +class GeluTanh(nn.Module): + """An activation function for GELU with `tanh` approximation. + + The function computes x -> gelu_tanh(x). + + Shapes: + x: (num_tokens, d) or (batch_size, seq_len, d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_forward(x) + + +class MulAndSilu(nn.Module): + """An activation function for SwiGLU. + + The function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.mul_and_silu_forward(x) + + +class GeluAndMul(nn.Module): + """An activation function for GeGLU. + + The function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2. + + Shapes: + x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d) + return: (batch_size, seq_len, d) or (num_tokens, d) + """ + + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_and_mul_forward(x) + + +class GeluTanhAndMul(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor): + return ops.gelu_tanh_and_mul_forward(x) + + +class FatreluAndMul(nn.Module): + """An activation function for FATReLU. + + The function computes x -> FATReLU(x[:d]) * x[d:] where + d = x.shape[-1] // 2. + This is used in openbmb/MiniCPM-S-1B-sft. + + Shapes: + x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d) + return: (num_tokens, d) or (batch_size, seq_len, d) + """ + + can_torch_compile: bool = True + + def __init__(self, threshold: float = 0.0): + super().__init__() + self.threshold = threshold + + def forward(self, x: torch.Tensor): + return ops.fatrelu_and_mul_forward(x, self.threshold) + + +class FastGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_fast_forward(x) + + +class NewGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_new_forward(x) + + +class QuickGELU(nn.Module): + can_torch_compile: bool = True + + def forward(self, x: torch.Tensor) -> torch.Tensor: + return ops.gelu_quick_forward(x) + + +__all__ = [ + "FastGELU", + "FatreluAndMul", + "Gelu", + "GeluAndMul", + "GeluTanh", + "GeluTanhAndMul", + "MulAndSilu", + "NewGELU", + "QuickGELU", + "Silu", + "SiluAndMul", +] diff --git a/build/torch215-cpu-x86_64-linux/metadata.json b/build/torch215-cpu-x86_64-linux/metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..ea2c13fa00bd12013509143604a899381358e2fc --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/metadata.json @@ -0,0 +1,34 @@ +{ + "name": "activation", + "id": "_activation_cpu_96f42ba", + "version": 2, + "kernels-minver": "0.14.0", + "license": "Apache-2.0", + "python-depends": [], + "kernel-depends": [], + "backend": { + "type": "cpu" + }, + "digest": { + "algorithm": "sha256", + "files": { + "__init__.py": "NQdhY7p9BPoMw0NQodMKFTPSQXBlrsX3yUdP8MEHyH0=", + "_activation_cpu_96f42ba.abi3.so": "NJcaOwS95c1eFDtbuO+vsRFYdjxO7T0KxdU+srjqASU=", + "_autograd.py": "zOE67V8Ix8QHmeO1XjvKYue1aIgGOa2BpuJ7ablYbMg=", + "_ops.py": "aPzZXtXSagtNkrKyqGh3dnwKQlGZTYr7wSpnP/f/FY4=", + "layers.py": "4hZUzmc68DwI9Ldg4vimZ61OlNu1KHTdTAzHgtIDZoY=", + "symbols.json": "ZKZtww/dcNUL0IncOFdRn1bXB5giYx0oGTMRURk2pLk=" + } + }, + "provenance": { + "kernel-builder": { + "version": "0.19.0-dev1", + "commit": "513f08bc6e20e6e59efcd2307851903b054746f3", + "dirty": false + }, + "kernel": { + "commit": "96f42ba3633a93208557a942762e52005952b21a", + "dirty": false + } + } +} \ No newline at end of file diff --git a/build/torch215-cpu-x86_64-linux/metadata.json.sigstore b/build/torch215-cpu-x86_64-linux/metadata.json.sigstore new file mode 100644 index 0000000000000000000000000000000000000000..d39585fb7a8feb83b573ab8b0234e7f051655675 --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/metadata.json.sigstore @@ -0,0 +1 @@ +{"mediaType":"application/vnd.dev.sigstore.bundle.v0.3+json","verificationMaterial":{"certificate":{"rawBytes":"MIIHLDCCBrKgAwIBAgIUFrwpfYZza3mvhKt+XGcjvsKFDq8wCgYIKoZIzj0EAwMwNzEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MR4wHAYDVQQDExVzaWdzdG9yZS1pbnRlcm1lZGlhdGUwHhcNMjYxMjAyMTY1NzI0WhcNMjYxMjAyMTcwNzI0WjAAMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEl+mDqoowV55TWbrjCyRhWQUdso399PWjb01R0s4j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g8wsHRMFYf5iFWp3j5vjRVOmnqthEog=="},"tlogEntries":[{"logIndex":"4218961367","logId":{"keyId":"wNI9atQGlz+VWfO6LRygH4QUfY/8W4RFwiT5i5WRgB0="},"kindVersion":{"kind":"hashedrekord","version":"0.0.1"},"integratedTime":"1796230644","inclusionPromise":{"signedEntryTimestamp":"MEQCICA0PIpUXFI1vMnT3iVqPJF+hnA7q3AbpuaajzIyxrryAiB0Yh4aMjgS+PQam/Gd7bL9Au1fh5MucQOKJC6PMOFXFQ=="},"inclusionProof":{"logIndex":"4097057105","rootHash":"v6JDUpO9DZ+Y8vIvJEnv/rgauo5oUAYiEqPE21QHZSg=","treeSize":"4097057108","hashes":["UzTKLHHmV8SzGJwM/225juNpdT1kSiZ7R1BZGOjk3u4=","jv0antvMO0uuOgi6oOfOIo1isBOki55/LuxdCKnlD3I=","pLkza4ANQRBlTzAP+GTpfwpNeckeaeMb0VdlZLNeQHI=","uwVMKVt9aI8muFOTlL5toxWeyZI3nNkduCbQ5vn9I1Q=","FARSYK4FYVunsRK6hTIQKvfuK8oeYWlC32Nl9EPnNY8=","uom17/iiE9LieTotrofLNZgMb2AuLliCqVQFh1RDKws=","iaX4lirwHM3JCSFZkPRv+y8Yr7OTDROBUCoMfzvv1nE=","ShM2Cmd6LdSuw16xoysIjs/Ifl1BHG6BV5Cy5BIFmTs=","cL8X8YtwDBpU5nSgm4Flig3QWi7jgwRaEJN6Dc9RAeE=","dPVUgsZ63CnVNIKEYIvFaPnDRf7T99m/S8kwoh8cX0c=","yznKUifjcNgdsio4X7Umz1O2L3z0M+cVcIDsnwwhJ/c=","k0+Z1T6dI0Tgluh54oO/hnxtuoW22MqFIjVTPYeUJGU=","1DaDKzrCNNBhmSdY5vFjz+NpAmxmYfYEgBCdPLrMP1A=","xH/DCseLHr9eKoYT8qsORZK7zVdEGYWHuVtsVrD95wY="],"checkpoint":{"envelope":"rekor.sigstore.dev - 1193050959916656506\n4097057108\nv6JDUpO9DZ+Y8vIvJEnv/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GggfwwGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMBwGCSqGSIb3DQEJBTEPFw0yNjEyMDIxNjU3MjRaMC8GCSqGSIb3DQEJBDEiBCDDoQ4B+Vgh42y7VXobLrVE/xHI0829iXMNs83uQk4nOTCBjgYLKoZIhvcNAQkQAi8xfzB9MHsweQQghfknvAerYsrDtENWwQ78gbLGiD/aernm2HDZ0TrNBbcwVTA9pDswOTEVMBMGA1UEChMMc2lnc3RvcmUuZGV2MSAwHgYDVQQDExdzaWdzdG9yZS10c2Etc2VsZnNpZ25lZAIUOhNULwyQYe68wUMvy4qOiyojiwwwCgYIKoZIzj0EAwIEaDBmAjEAwUemgGeIp0HOCJvTVncSE6TDkR4q2kL8RJ+6nMlyGGU7ZCMxDZz3AZL0K0Ra1NWAAjEAnTUAPricq5a8F1s3Blf6nHm+rS5QlS5UL41IfKXb0LCAGNOXoBOVovO2Irivv/IG"}]}},"messageSignature":{"messageDigest":{"algorithm":"SHA2_256","digest":"DUgN/9UWG8W1SsYo2bqUVTKWM9YYy6RlDKOqaiXEEfE="},"signature":"MEUCIQDfl/pmaaHDNNpJFu6bxIPi73o6lBGJrshIzHCciNbNkAIgFyX3/8QWu8u1lKNjjVlPCZRK9JXIbI9o2MJXulahPKs="}} diff --git a/build/torch215-cpu-x86_64-linux/symbols.json b/build/torch215-cpu-x86_64-linux/symbols.json new file mode 100644 index 0000000000000000000000000000000000000000..cf1d36d1cd058a0f4389783a7edc4b1aa5dc8f6c --- /dev/null +++ b/build/torch215-cpu-x86_64-linux/symbols.json @@ -0,0 +1,580 @@ +{ + "schema_version": 1, + "module": "_activation_cpu_96f42ba", + "functions": [ + { + "name": "silu_and_mul", + "qualname": "silu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "mul_and_silu", + "qualname": "mul_and_silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_and_mul", + "qualname": "gelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh_and_mul", + "qualname": "gelu_tanh_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "fatrelu_and_mul", + "qualname": "fatrelu_and_mul", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_fast", + "qualname": "gelu_fast", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_new", + "qualname": "gelu_new", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_quick", + "qualname": "gelu_quick", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu_tanh", + "qualname": "gelu_tanh", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "silu", + "qualname": "silu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + }, + { + "name": "gelu", + "qualname": "gelu", + "module": "_activation_cpu_96f42ba", + "kind": "function", + "doc": null, + "signature": { + "parameters": [ + { + "name": "out", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + }, + { + "name": "x", + "kind": "POSITIONAL_OR_KEYWORD", + "default": null, + "annotation": "torch.Tensor" + } + ], + "return_annotation": "torch.Tensor" + } + } + ], + "layers": [ + { + "name": "FastGELU", + "qualname": "FastGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "FatreluAndMul", + "qualname": "FatreluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for FATReLU.\n\nThe function computes x -> FATReLU(x[:d]) * x[d:] where\nd = x.shape[-1] // 2.\nThis is used in openbmb/MiniCPM-S-1B-sft.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "threshold", + "kind": "POSITIONAL_OR_KEYWORD", + "default": "0.0", + "annotation": "float" + } + ], + "return_annotation": null + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Gelu", + "qualname": "Gelu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU.\n\nThe function computes x -> gelu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluAndMul", + "qualname": "GeluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GeGLU.\n\nThe function computes x -> GELU(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (batch_size, seq_len, 2 * d) or (num_tokens, 2 * d)\n return: (batch_size, seq_len, d) or (num_tokens, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanh", + "qualname": "GeluTanh", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for GELU with `tanh` approximation.\n\nThe function computes x -> gelu_tanh(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "GeluTanhAndMul", + "qualname": "GeluTanhAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "MulAndSilu", + "qualname": "MulAndSilu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> x[:d] * silu(x[d:]) where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "NewGELU", + "qualname": "NewGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "QuickGELU", + "qualname": "QuickGELU", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "Base class for all neural network modules.\n\nYour models should also subclass this class.\n\nModules can also contain other Modules, allowing them to be nested in\na tree structure. You can assign the submodules as regular attributes::\n\n import torch.nn as nn\n import torch.nn.functional as F\n\n\n class Model(nn.Module):\n def __init__(self) -> None:\n super().__init__()\n self.conv1 = nn.Conv2d(1, 20, 5)\n self.conv2 = nn.Conv2d(20, 20, 5)\n\n def forward(self, x):\n x = F.relu(self.conv1(x))\n return F.relu(self.conv2(x))\n\nSubmodules assigned in this way will be registered, and will also have their\nparameters converted when you call :meth:`to`, etc.\n\n.. note::\n As per the example above, an ``__init__()`` call to the parent class\n must be made before assignment on the child.\n\n:ivar training: Boolean represents whether this module is in training or\n evaluation mode.\n:vartype training: bool", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "Silu", + "qualname": "Silu", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SiLU.\n\nThe function computes x -> silu(x).\n\nShapes:\n x: (num_tokens, d) or (batch_size, seq_len, d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + }, + { + "name": "SiluAndMul", + "qualname": "SiluAndMul", + "module": "_activation_cpu_96f42ba.layers", + "kind": "class", + "doc": "An activation function for SwiGLU.\n\nThe function computes x -> silu(x[:d]) * x[d:] where d = x.shape[-1] // 2.\n\nShapes:\n x: (num_tokens, 2 * d) or (batch_size, seq_len, 2 * d)\n return: (num_tokens, d) or (batch_size, seq_len, d)", + "signature": { + "parameters": [ + { + "name": "args", + "kind": "VAR_POSITIONAL", + "default": null, + "annotation": "Any" + }, + { + "name": "kwargs", + "kind": "VAR_KEYWORD", + "default": null, + "annotation": "Any" + } + ], + "return_annotation": "None" + }, + "attributes": { + "has_backward": null, + "can_torch_compile": true + } + } + ] +}