arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2312.03038cs.LGcs.AIcs.NE
收藏

基于上下文赌博机实现层与头灵活性的样本级动态分层Transformer

Sample-based Dynamic Hierarchical Transformer with Layer and Head Flexibility via Contextual Bandit

Fanfei Meng, Lele Zhang, Yu Chen, Yuxin Wang

AI总结:

提出基于样本的动态分层Transformer(DHT),通过求解上下文赌博机问题动态配置层与头,在训练与推理中节省高达74%计算量且精度损失极小。

摘要:

Transformer需要固定数量的层和头,这使其对单个样本的复杂性缺乏灵活性,且训练和推理成本高昂。为此,我们提出一种基于样本的动态分层Transformer(DHT)模型,其层和头可通过求解上下文赌博机问题随单数据样本动态配置。为确定层和头的数量,我们使用Uniform Confidence Bound;而在给定数量后,为选择特定的头组合,我们采用组合Thompson Sampling。与以往仅聚焦于压缩已训练网络以加速推理的工作不同,DHT不仅在训练期间自适应优化底层网络架构方面具有优势,还拥有可高效推理的灵活网络。据我们所知,这是首个无需任何额外辅助神经网络来实现动态系统的综合数据驱动型动态transformer。实验结果表明,我们在训练和推理中均实现了高达74%的计算节省,且精度损失极小。

英文摘要:

Transformer requires a fixed number of layers and heads which makes them inflexible to the complexity of individual samples and expensive in training and inference. To address this, we propose a sample-based Dynamic Hierarchical Transformer (DHT) model whose layers and heads can be dynamically configured with single data samples via solving contextual bandit problems. To determine the number of layers and heads, we use the Uniform Confidence Bound while we deploy combinatorial Thompson Sampling in order to select specific head combinations given their number. Different from previous work that focuses on compressing trained networks for inference only, DHT is not only advantageous for adaptively optimizing the underlying network architecture during training but also has a flexible network for efficient inference. To the best of our knowledge, this is the first comprehensive data-driven dynamic transformer without any additional auxiliary neural networks that implement the dynamic system. According to the experiment results, we achieve up to 74% computational savings for both training and inference with a minimal loss of accuracy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑