Transformer architectures based on the attention mechanism have revolutionized natural language processing (NLP), driving major breakthroughs across virtually every NLP task. However, their substantial memory and computational requirements still hinder deployment on ultra-constrained devices such as wearables and Internet-of-Things (IoT) units, where available memory is limited to just a few megabytes. To address this challenge, we introduce EmbBERT, a tiny language model (TLM) architecturally designed for extreme efficiency. The model integrates a compact embedding layer, streamlined feed-forward blocks, and an efficient attention mechanism that together enable optimal performance under strict memory budgets. Through this redesign for the extreme edge, we demonstrate that highly simplified transformer architectures remain remarkably effective under tight resource constraints. EmbBERT requires only 2 MB of total memory, and achieves accuracy performance comparable to the ones of state-of-the-art (SotA) models that require a $\mathbf{10\times}$ memory budget. Extensive experiments on the curated TinyNLP benchmark and the GLUE suite confirm that EmbBERT achieves competitive accuracy, comparable to that of larger SotA models, and consistently outperforms downsized versions of BERT and MAMBA of similar size. Furthermore, we demonstrate the model resilience to 8-bit quantization, which further reduces memory usage to just 781 kB , and the scalability of the EmbBERT architecture across the sub-megabyte to tens-of-megabytes range. Finally, we perform an ablation study demonstrating the positive contributions of all components and the pre-training procedure. All code, scripts, and checkpoints are publicly released to ensure reproducibility: https://github.com/RiccardoBravin/tiny-LLM.


翻译:基于注意力机制的Transformer架构彻底革新了自然语言处理领域,推动了几乎所有NLP任务的重大突破。然而,其庞大的内存和计算需求仍阻碍其在可穿戴设备、物联网单元等可用内存仅限数兆字节的超受限设备上的部署。为应对这一挑战,我们提出了EmbBERT——一种专为极致效率设计的微型语言模型。该模型集成了紧凑型嵌入层、精简前馈模块与高效注意力机制,从而在严格内存预算下实现最优性能。通过面向极端边缘场景的重构设计,我们证明高度简化的Transformer架构在严格资源约束下仍能保持显著有效性。EmbBERT仅需2 MB总内存,其准确率性能即可媲美需要10倍内存预算的最先进模型。基于精心设计的TinyNLP基准测试与GLUE套件的大量实验证实,EmbBERT在实现与大型SotA模型相当竞争力的同时,始终优于同等规模的BERT与MAMBA精简版本。此外,我们验证了模型对8位量化的鲁棒性(可将内存消耗进一步压缩至781 kB),以及EmbBERT架构在亚兆字节至数十兆字节范围内的可扩展性。最后,通过消融研究证明了所有组件及预训练流程的积极贡献。所有代码、脚本与检查点均已公开发布以确保可复现性:https://github.com/RiccardoBravin/tiny-LLM。

0
下载
关闭预览

相关内容

【CVPR2023】BiFormer:基于双层路由注意力的视觉Transformer
专知会员服务
35+阅读 · 2023年3月20日
最新《注意力机制与深度学习结合》综述论文
专知会员服务
76+阅读 · 2021年6月17日
华为等发布《视觉Transformer转换器》综述论文,21页pdf
专知会员服务
86+阅读 · 2020年12月25日
【NeurIPS2020-华为】DynaBERT:具有自适应宽度和深度的动态BERT
注意力机制介绍,Attention Mechanism
专知会员服务
172+阅读 · 2019年10月13日
一文读懂自注意力机制:8大步骤图解+代码
新智元
153+阅读 · 2019年11月26日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
注意力机制可解释吗?这篇ACL 2019论文说……
机器之心
11+阅读 · 2019年6月16日
深入理解BERT Transformer ,不仅仅是注意力机制
大数据文摘
22+阅读 · 2019年3月19日
【论文笔记】自注意力机制学习句子embedding
深度学习中的注意力机制
CSDN大数据
24+阅读 · 2017年11月2日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Mixture-of-Depths Attention
Arxiv
0+阅读 · 3月16日
VIP会员
最新内容
战略前沿人工智能的再思考(中文)
专知会员服务
4+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
4+阅读 · 5月29日
“史诗怒火行动”中美军损失的作战飞机
专知会员服务
4+阅读 · 5月29日
ICML 2026 | 理解上下文持续学习中的泛化与遗忘
专知会员服务
5+阅读 · 5月28日
Agent Harness综述:大模型智能体执行器工程全景
专知会员服务
14+阅读 · 5月28日
《基于理论的威慑效能评估》
专知会员服务
8+阅读 · 5月28日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员