混合 ViT 模型的混合精度量化与硬件友好型激活函数

B. Kang, Dahun Choi, Hyun Kim
{"title":"混合 ViT 模型的混合精度量化与硬件友好型激活函数","authors":"B. Kang, Dahun Choi, Hyun Kim","doi":"10.1109/ICEIC61013.2024.10457283","DOIUrl":null,"url":null,"abstract":"As hardware devices have advanced recently, various artificial intelligence tasks including convolutional neural networks (CNNs) have achieved high accuracy. Especially in computer vision tasks, vision transformer (ViT) based models have achieved unprecedented progress, and CNN + ViT hybrid models have also been proposed that take advantage of both CNNs and ViTs. However, the numerous parameters of hybrid ViTs are unsuitable for resource-constrained mobile/edge environments. In addition, the nonlinear activation functions in hybrid ViTs (e.g., GeLU and Swish) require more resources and computational cost compared to integer operation functions (e.g., ReLU) when using dedicated hardware accelerators. To address these issues, we propose a technique to efficiently compress the prominent hybrid ViT model, MobileViT, by applying the mixed precision quantization and the Shift-Swish activation function. Compressing the MobileViT-s, MobileViT-xs, and MobileViT-xxs models with the proposed method on the ImageNet dataset resulted in minimal accuracy drops of 0.41%, 0.18%, and 0.86%, respectively, while achieving effective quantization and activation function approximation at the average 7.9-bit level.","PeriodicalId":518726,"journal":{"name":"2024 International Conference on Electronics, Information, and Communication (ICEIC)","volume":"50 2","pages":"1-2"},"PeriodicalIF":0.0000,"publicationDate":"2024-01-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Mixed Precision Quantization with Hardware-Friendly Activation Functions for Hybrid ViT Models\",\"authors\":\"B. Kang, Dahun Choi, Hyun Kim\",\"doi\":\"10.1109/ICEIC61013.2024.10457283\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"As hardware devices have advanced recently, various artificial intelligence tasks including convolutional neural networks (CNNs) have achieved high accuracy. Especially in computer vision tasks, vision transformer (ViT) based models have achieved unprecedented progress, and CNN + ViT hybrid models have also been proposed that take advantage of both CNNs and ViTs. However, the numerous parameters of hybrid ViTs are unsuitable for resource-constrained mobile/edge environments. In addition, the nonlinear activation functions in hybrid ViTs (e.g., GeLU and Swish) require more resources and computational cost compared to integer operation functions (e.g., ReLU) when using dedicated hardware accelerators. To address these issues, we propose a technique to efficiently compress the prominent hybrid ViT model, MobileViT, by applying the mixed precision quantization and the Shift-Swish activation function. Compressing the MobileViT-s, MobileViT-xs, and MobileViT-xxs models with the proposed method on the ImageNet dataset resulted in minimal accuracy drops of 0.41%, 0.18%, and 0.86%, respectively, while achieving effective quantization and activation function approximation at the average 7.9-bit level.\",\"PeriodicalId\":518726,\"journal\":{\"name\":\"2024 International Conference on Electronics, Information, and Communication (ICEIC)\",\"volume\":\"50 2\",\"pages\":\"1-2\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-01-28\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2024 International Conference on Electronics, Information, and Communication (ICEIC)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICEIC61013.2024.10457283\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2024 International Conference on Electronics, Information, and Communication (ICEIC)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICEIC61013.2024.10457283","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

随着近年来硬件设备的发展,包括卷积神经网络(CNN)在内的各种人工智能任务都取得了很高的精度。特别是在计算机视觉任务中,基于视觉变换器(ViT)的模型取得了前所未有的进展,同时还提出了利用 CNN 和 ViT 的优势的 CNN + ViT 混合模型。然而,混合 ViT 的参数繁多,不适合资源有限的移动/边缘环境。此外,与使用专用硬件加速器的整数运算函数(如 ReLU)相比,混合 ViT 中的非线性激活函数(如 GeLU 和 Swish)需要更多的资源和计算成本。为解决这些问题,我们提出了一种技术,通过应用混合精度量化和 Shift-Swish 激活函数,高效压缩著名的混合 ViT 模型 MobileViT。在 ImageNet 数据集上使用所提出的方法对 MobileViT-s、MobileViT-xs 和 MobileViT-xxs 模型进行压缩后,准确率分别下降了 0.41%、0.18% 和 0.86%,同时实现了平均 7.9 位级别的有效量化和激活函数近似。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Mixed Precision Quantization with Hardware-Friendly Activation Functions for Hybrid ViT Models
As hardware devices have advanced recently, various artificial intelligence tasks including convolutional neural networks (CNNs) have achieved high accuracy. Especially in computer vision tasks, vision transformer (ViT) based models have achieved unprecedented progress, and CNN + ViT hybrid models have also been proposed that take advantage of both CNNs and ViTs. However, the numerous parameters of hybrid ViTs are unsuitable for resource-constrained mobile/edge environments. In addition, the nonlinear activation functions in hybrid ViTs (e.g., GeLU and Swish) require more resources and computational cost compared to integer operation functions (e.g., ReLU) when using dedicated hardware accelerators. To address these issues, we propose a technique to efficiently compress the prominent hybrid ViT model, MobileViT, by applying the mixed precision quantization and the Shift-Swish activation function. Compressing the MobileViT-s, MobileViT-xs, and MobileViT-xxs models with the proposed method on the ImageNet dataset resulted in minimal accuracy drops of 0.41%, 0.18%, and 0.86%, respectively, while achieving effective quantization and activation function approximation at the average 7.9-bit level.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Study on Improving the Durability of Shaded Pole Induction Motors Used for Refrigerator Fans New Approximate 4:2 Compressor for High Accuracy and Small Area Using MUX Logic A Study on the UWB/Encoder/IMU Sensor Fusion Position Estimation System for the Development of Driving Assistance Technology in Autonomous Driving Wheelchairs DDANet: Dilated Deformable Attention Network for Dynamic Scene Deblurring NIR to LWIR Image Translation for Generating LWIR Image Datasets
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1