https://github.com/christophreich1996/smelu-triton

Triton reimplementation of the Smooth ReLU activation function proposed in the paper "Real World Large Scale Recommendation Systems Reproducibility and Smooth Activations" [arXiv 2022].

https://github.com/christophreich1996/smelu-triton

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords

activation-functions deep-learning nerual-network triton
Last synced: 9 months ago · JSON representation

Repository

Triton reimplementation of the Smooth ReLU activation function proposed in the paper "Real World Large Scale Recommendation Systems Reproducibility and Smooth Activations" [arXiv 2022].

Basic Info
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
activation-functions deep-learning nerual-network triton
Created about 4 years ago · Last pushed about 4 years ago

https://github.com/ChristophReich1996/SmeLU-Triton/blob/master/

# Smooth ReLU in Triton

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ChristophReich1996/Swin-Transformer-V2/blob/master/LICENSE)

drawingdrawing

**This repository extends my [SmeLU repository](https://github.com/ChristophReich1996/SmeLU) with a [Triton](https://github.com/openai/triton) implementation of the Smooth ReLU activation** Unofficial **Triton/PyTorch** reimplementation of the Smooth ReLU (SmeLU) activation function proposed in the paper [Real World Large Scale Recommendation Systems Reproducibility and Smooth Activations](https://arxiv.org/pdf/2202.06499.pdf) by Gil I. Shamir and Dong Lin. ## Installation For using the [Triton](https://github.com/openai/triton) implementation the nightly release of Triton needs to be installed. ````shell script pip install -U --pre triton ```` If Triton is installed the SmeLU can be installed by using `pip`. ````shell script pip install git+https://github.com/ChristophReich1996/SmeLU-Triton ```` ## Example Usage The SmeLU can be simply used as a standard `nn.Module`: ````python import torch import torch.nn as nn from smelu import SmeLU network: nn.Module = nn.Sequential( nn.Linear(2, 2), SmeLU(), nn.Linear(2, 2) ) network.cuda() output: torch.Tensor = network(torch.rand(16, 2).cuda()) ```` For a more detailed examples on hwo to use this implementation please refer to the [example](example.py) file (requires Matplotlib to be installed). The SmeLU takes the following parameters. | Parameter | Description | Type | | ------------- | ------------- | ------------- | | beta | Beta value if the SmeLU activation function. Default 2. | float | ## Runtime Results | Implementation | Relative speed (forward and backward) in `nn.ReLU()` | | ------------- | ------------- | | SmeLU pure PyTorch (on GPU) | ~10 x `nn.ReLU()` | | SmeLU Triton/PyTorch (on GPU) | ~1.6 x `nn.ReLU()` | Runtime experiments performed on Google Colab. ## Reference ````bibtex @article{Shamir2022, title={{Real World Large Scale Recommendation Systems Reproducibility and Smooth Activations}}, author={Shamir, Gil I and Lin, Dong}, journal={{arXiv preprint arXiv:2202.06499}}, year={2022} } ````

Owner

  • Name: Christoph Reich
  • Login: ChristophReich1996
  • Kind: user
  • Location: Germany
  • Company: Technical University of Munich

ELLIS Ph.D. Student @ Technical University of Munich, Technische Universität Darmstadt & University of Oxford | Prev. NEC Labs

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1