LGAICLOct 18, 2023

SHARCS: Efficient Transformers through Routing with Dynamic Width Sub-networks

UW
arXiv:2310.12126v1135 citationsh-index: 82
Originality Incremental advance
AI Analysis

This work addresses efficiency issues in transformer models for practitioners, offering an incremental improvement over existing adaptive inference methods.

The paper tackles the problem of inefficient transformer inference by introducing SHARCS, a method that routes input samples to sub-networks with varying widths based on sample hardness, achieving a 2 times inference speed up with minimal accuracy loss.

We introduce SHARCS for adaptive inference that takes into account the hardness of input samples. SHARCS can train a router on any transformer network, enabling the model to direct different samples to sub-networks with varying widths. Our experiments demonstrate that: (1) SHARCS outperforms or complements existing per-sample adaptive inference methods across various classification tasks in terms of accuracy vs. FLOPs; (2) SHARCS generalizes across different architectures and can be even applied to compressed and efficient transformer encoders to further improve their efficiency; (3) SHARCS can provide a 2 times inference speed up at an insignificant drop in accuracy.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes