SuperShaper:可变隐维BERT模型的任务无关超级预训练
SuperShaper: Task-Agnostic Super Pre-training of BERT Models with Variable Hidden Dimensions
摘要:
任务不可知的预训练,然后是任务特定的微调是训练NLU模型的默认方法。这些模型需要部署在跨云和边缘的设备上,具有不同的资源和准确性限制。对于给定的任务,在数十台设备上重复预训练和微调是非常昂贵的。我们提出了SuperShaper,这是一种与任务无关的预训练方法,它通过改变形状同时预训练大量的Transformer模型,即,通过改变不同层的隐藏维度。这是通过在每个Transformer层周围具有线性瓶颈矩阵的骨干网络实现的,该线性瓶颈矩阵被切片以生成不同形状的子网络。尽管SuperShaper的设计空间简单,实现高效,但它发现的网络有效地权衡了准确性和模型大小:发现的网络比一系列手工制作和自动搜索的网络在GLUE基准上更准确。此外,我们发现形状作为神经架构搜索(NAS)的设计变量的两个关键优势:(a)可以导出良好形状的算法,并且使用这些算法找到的网络匹配甚至改进了在一系列参数计数范围内仔细搜索的网络,以及(b)跨多个CPU和GPU的网络的延迟对形状不敏感,从而实现设备不可知的搜索。总之,SuperShaper从根本上简化了语言模型的NAS,并发现了跨任务、参数约束和设备进行泛化的网络。
英文摘要:
Task-agnostic pre-training followed by task-specific fine-tuning is a default approach to train NLU models. Such models need to be deployed on devices across the cloud and the edge with varying resource and accuracy constraints. For a given task, repeating pre-training and fine-tuning across tens of devices is prohibitively expensive. We propose SuperShaper, a task agnostic pre-training approach which simultaneously pre-trains a large number of Transformer models by varying shapes, i.e., by varying the hidden dimensions across layers. This is enabled by a backbone network with linear bottleneck matrices around each Transformer layer which are sliced to generate differently shaped sub-networks. In spite of its simple design space and efficient implementation, SuperShaper discovers networks that effectively trade-off accuracy and model size: Discovered networks are more accurate than a range of hand-crafted and automatically searched networks on GLUE benchmarks. Further, we find two critical advantages of shape as a design variable for Neural Architecture Search (NAS): (a) heuristics of good shapes can be derived and networks found with these heuristics match and even improve on carefully searched networks across a range of parameter counts, and (b) the latency of networks across multiple CPUs and GPUs are insensitive to the shape and thus enable device-agnostic search. In summary, SuperShaper radically simplifies NAS for language models and discovers networks that generalize across tasks, parameter constraints, and devices.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。