Sorbet: A Neuromorphic Hardware-Compatible Transformer-Based Spiking Language Model

Kaiwen Tang, Zhanglu Yan, Weng-Fai Wong
9/4/2024
cs.NEcs.CLcs.LG

Official code: Kaiwen-Tang/Sorbet (10 stars, last commit 2025-04-15).

Abstract

For reasons such as privacy, there are use cases for language models at the edge. This has given rise to small language models (SLMs) targeted for deployment in resource-constrained devices where energy efficiency is a significant concern. Spiking neural networks (SNNs) offer a promising solution due to their energy efficiency, and there are already works on realizing transformer-based models on SNNs. However, key operations like softmax and layer normalization (LN) are difficult to implement on neuromorphic hardware, and many of these early works sidestepped them. To address these challenges, we introduce Sorbet, a transformer-based spiking language model that is more neuromorphic hardware-compatible. Sorbet incorporates a novel shifting-based softmax called PTsoftmax and a power normalization method using bit-shifting (BSPN), both designed to replace the respective energy-intensive operations. By leveraging knowledge distillation and model quantization, Sorbet achieved a highly compressed binary weight model that maintains competitive performance while significantly reducing energy consumption. We validate Sorbet's effectiveness through extensive testing on the GLUE benchmark and a series of ablation studies, demonstrating its potential as an energy-efficient solution for language model inference.

View on arXivView PDF

Code Implementations(1)

Kaiwen-Tang/SorbetOfficial100%
102Shell, PythonAug 19, 20241 years ago

Similar Papers

Cite this paper

@article{tang2024sorbet,
  title  = {Sorbet: A Neuromorphic Hardware-Compatible Transformer-Based Spiking Language Model},
  author = {Kaiwen Tang and Zhanglu Yan and Weng-Fai Wong},
  year   = {2024},
  eprint = {2409.15298},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.15298v1},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.15298.svg)](https://codeofpaper.com/paper/2409.15298)

Discussion