We convert a trained attention network as a whole, attention included, into a hard-logic predicate circuit that runs in its place. Every unit of the circuit is a 0/1 predicate on tokens, and every map between predicates is a minimised truth table. Each block is fitted once on the teacher's own states, with interfaces defined from the output down, and the rules of the whole chain are then refitted on the states it produces. Attention selection takes two forms, a row-wise comparison of integer scores (order selection) and a learned rule (rule selection). Both are fitted on the ordinary training set alone, and only on the examples that the teacher classifies correctly. On TweetEval-emotion, the complete circuit of DistilGPT2 reaches a test gold accuracy of 67.7 $\pm$ 0.8% with order selection and 56.4 $\pm$ 1.4% with rule selection over five seeds, against 74.7% for the teacher and 64.0% for a bag of word pieces fitted on the same tweets, and that of BERT-base truncated to 6 blocks reaches 71.1 $\pm$ 1.1% and 61.8 $\pm$ 5.0% against 80.0% (bag of words 63.8%). On four GLUE tasks, order selection reaches a mean test gold accuracy of 70.6% (DistilGPT2) and 70.9% (BERT), above the bag of words (68.6% and 68.4%). The circuit needs no multiplier and no weight traffic, and its exported hardware description reproduces it bit for bit. By a synthesis-based estimate averaged over the five tasks, it classifies one example in 1.1-2.0 $μ$s on an FPGA card, 180-420 times faster than the network on a GPU at batch 1 with CUDA graphs (measured, 0.35-0.46 ms), and in 3.3-6.4 $μ$s with 25-96 $μ$J on a palm-sized board of 7.5-15 W, 550-2,400 times less energy per example than the GPU.


翻译:暂无翻译

0
下载
关闭预览

相关内容

白话attention综述(上)
AINLP
12+阅读 · 2019年12月14日
深度学习中Attention Mechanism详细介绍:原理、分类及应用
深度学习与NLP
10+阅读 · 2019年2月18日
《pyramid Attention Network for Semantic Segmentation》
统计学习与视觉计算组
44+阅读 · 2018年8月30日
Relation Networks for Object Detection 论文笔记
统计学习与视觉计算组
16+阅读 · 2018年4月18日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
20+阅读 · 2017年12月17日
基于注意力机制的图卷积网络
科技创新与创业
74+阅读 · 2017年11月8日
【深度学习基础】4. Recurrent Neural Networks
微信AI
16+阅读 · 2017年7月19日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
《评估人机编队性能的标准指标》
专知会员服务
8+阅读 · 11月30日
《美陆军装甲排的自动化任务分配模型》59页
专知会员服务
6+阅读 · 11月30日
乌克兰海陆空无人力量
专知会员服务
3+阅读 · 11月30日
超越技术:美战争部的AI变革管理
专知会员服务
7+阅读 · 11月27日
北约400亿美元反无人机能力投资建设
专知会员服务
7+阅读 · 11月25日
反小型无人机系统方案评估(27页)
专知会员服务
15+阅读 · 11月25日
相关VIP内容
相关资讯
白话attention综述(上)
AINLP
12+阅读 · 2019年12月14日
深度学习中Attention Mechanism详细介绍:原理、分类及应用
深度学习与NLP
10+阅读 · 2019年2月18日
《pyramid Attention Network for Semantic Segmentation》
统计学习与视觉计算组
44+阅读 · 2018年8月30日
Relation Networks for Object Detection 论文笔记
统计学习与视觉计算组
16+阅读 · 2018年4月18日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
20+阅读 · 2017年12月17日
基于注意力机制的图卷积网络
科技创新与创业
74+阅读 · 2017年11月8日
【深度学习基础】4. Recurrent Neural Networks
微信AI
16+阅读 · 2017年7月19日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员