Add docstrings to some modules and classes (#100)

This commit is contained in:
Woosuk Kwon
2023-05-14 22:32:38 -07:00
committed by GitHub
parent 667ba3995c
commit b322fd1607
17 changed files with 166 additions and 31 deletions

View File

@@ -1,3 +1,4 @@
"""Custom activation functions."""
import torch
import torch.nn as nn
@@ -5,6 +6,10 @@ from cacheflow import activation_ops
class SiluAndMul(nn.Module):
"""An activation function for SwiGLU.
The function computes x -> silu(x[:d]) * x[d:] where d = x.shape[1] // 2.
"""
def __init__(self):
super().__init__()