{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,11]],"date-time":"2026-11-11T03:07:16Z","timestamp":1794366436625,"version":"4.9.0"},"reference-count":43,"publisher":"Association for Computing Machinery (ACM)","issue":"4","license":[{"start":{"date-parts":[[2026,6,17]],"date-time":"2026-06-17T00:00:00Z","timestamp":1781654400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-nc-nd\/4.0\/legalcode"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["ACM Trans. Embed. Comput. Syst."],"published-print":{"date-parts":[[2026,7,31]]},"abstract":"<jats:p>Large Language Models (LLMs) are the new dominant application but suffer from high memory and computational cost. Ternary LLMs have been proposed for easier deployment on edge platforms as 2-bit ternary weights {-1, 0, +1} can reduce the model size by 16\u00d7 compared to 32-bit Floating-Point (FP32) representations. In addition, ternary General Matrix Multiplication (GEMM) can reduce the computational complexity by performing addition and subtraction operations with non-zero weights only. However, existing Central Processing Unit (CPU) and Graphic Processing Unit (GPU) do not support native 2-bit operations, and existing libraries like PyTorch and Compute Unified Device Architecture (CUDA) do not have dedicated computing kernels for ternary weights. Moreover, existing sparse formats like Compressed Sparse Column are not optimized for ternary values, causing extra storage and decompression overhead.<\/jats:p>\n                  <jats:p>In this article, we accelerate ternary LLMs on edge devices through efficient data formats and specialized computing kernels. We propose an efficient ternary sparse data format storing only the indices of non-zero values and simplifying the decompression at runtime. We also design a novel ternary GEMM algorithm that performs sparse addition on activations instead of multiplication to reduce the computation complexity. It achieves a 4\u00d7 theoretical speedup over dense GEMM with 50% sparsity in weights. We have implemented these algorithms and optimized computing kernels on both x86 CPU and Nvidia GPUs. Evaluation results show that they achieve 1.3-3.9\u00d7 speedup over Eigen Sparse GEMM, 3.3-6.9\u00d7 speedup over PyTorch Sparse GEMM, and around 5.5\u00d7 speedup over cuSPARSE. The GPU implementation can serve Llama-3 3B and 8B models on an RTX-3080Ti with 22 and 7 tokens\/s, while the full-precision versions run out of memory.<\/jats:p>","DOI":"10.1145\/3807782","type":"journal-article","created":{"date-parts":[[2026,4,17]],"date-time":"2026-04-17T10:16:34Z","timestamp":1776420994000},"page":"1-29","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":1,"title":["Efficient Addition-Based Sparse GEMM for Fast Ternary Large Language Model Inference on Edge Devices"],"prefix":"10.1145","volume":"25","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-2094-7643","authenticated-orcid":false,"given":"Shien","family":"Zhu","sequence":"first","affiliation":[{"name":"ETH Z\u00fcrich","place":["Z\u00fcrich, Switzerland"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9615-8456","authenticated-orcid":false,"given":"Guanshujie","family":"Fu","sequence":"additional","affiliation":[{"name":"ETH Z\u00fcrich","place":["Z\u00fcrich, Switzerland"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-5384-5689","authenticated-orcid":false,"given":"Mila","family":"Kjoseva","sequence":"additional","affiliation":[{"name":"ETH Z\u00fcrich","place":["Z\u00fcrich, Switzerland"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4396-6695","authenticated-orcid":false,"given":"Gustavo","family":"Alonso","sequence":"additional","affiliation":[{"name":"ETH Z\u00fcrich","place":["Z\u00fcrich, Switzerland"]}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2026,6,17]]},"reference":[{"key":"e_1_3_2_2_2","unstructured":"Hicham Badri and Appu Shaji. 2023. Half-quadratic quantization of large machine learning models. Retrieved April 30 2026 from https:\/\/github.com\/dropbox\/hqq"},{"key":"e_1_3_2_3_2","unstructured":"Hicham Badri and Appu Shaji. 2024. Towards 1-bit machine learning models. Retrieved April 30 2026 from https:\/\/dropbox.github.io\/1bit_blog\/"},{"key":"e_1_3_2_4_2","unstructured":"Maximilian Beck Korbinian P\u00f6ppel Phillip Lippe and Sepp Hochreiter. 2026. Tiled flash linear attention: More efficient linear RNN and xLSTM kernels. In The Thirty-ninth Annual Conference on Neural Information Processing Systems. Retrieved from https:\/\/openreview.net\/forum?id=b6H64u6TqI"},{"key":"e_1_3_2_5_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICCV48922.2021.00517"},{"key":"e_1_3_2_6_2","unstructured":"Tianqi Chen Zhe Li Weixiang Xu Zeyu Zhu Dong Li Lu Tian Emad Barsoum Peisong Wang and Jian Cheng. 2024. TernaryLLM: Ternarized large language model. arXiv:2406.07177. Retrieved from https:\/\/arxiv.org\/abs\/2406.07177"},{"key":"e_1_3_2_7_2","doi-asserted-by":"publisher","unstructured":"Seokhyeon Choi Kyuhong Shim Jungwook Choi Wonyong Sung and Byonghyo Shim. 2021. TernGEMM: GEneral matrix multiply library with ternary weights for fast DNN inference. In Proceedings of the 2021 IEEE Workshop on Signal Processing Systems.111\u2013116. DOI:10.1109\/SiPS52927.2021.00028","DOI":"10.1109\/SiPS52927.2021.00028"},{"key":"e_1_3_2_8_2","unstructured":"Tri Dao. 2024. Flash attention-2: Faster attention with better parallelism and work partitioning. In The Twelfth International Conference on Learning Representations. Retrieved from https:\/\/openreview.net\/forum?id=mZn2Xyh9Ec"},{"key":"e_1_3_2_9_2","doi-asserted-by":"crossref","unstructured":"Tri Dao Dan Fu Stefano Ermon Atri Rudra and Christopher R\u2019e. 2022. Flash attention: Fast and memory-efficient exact attention with io-awareness. In Advances in Neural Information Processing Systems S. Koyejo S. Mohamed A. Agarwal D. Belgrave K. Cho and A. Oh (Eds.). Vol. 35 Curran Associates Inc. 16344\u201316359. Retrieved from https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2022\/file\/67d57c32e20fd0a7a302cb81d36e40d5-Paper-Conference.pdf","DOI":"10.52202\/068431-1189"},{"key":"e_1_3_2_10_2","unstructured":"Mohsen Dehghankar Mahdi Erfanian and Abolfazl Asudeh. 2025. An efficient matrix multiplication algorithm for accelerating inference in binary and ternary neural networks. In Proceedings of the 42nd International Conference on Machine Learning (Proceedings of Machine Learning Research) Aarti Singh Maryam Fazel Daniel Hsu Simon Lacoste-Julien Felix Berkenkamp Tegan Maharaj Kiri Wagstaff and Jerry Zhu (Eds.). Vol. 267 PMLR 12969\u201312986. Retrieved from https:\/\/proceedings.mlr.press\/v267\/dehghankar25a.html"},{"key":"e_1_3_2_11_2","doi-asserted-by":"publisher","unstructured":"Xiang Deng and Zhongfei Zhang. 2022. Sparsity-control ternary weight networks. Neural Networks 145 (2022) 221\u2013232. DOI:10.1016\/j.neunet.2021.10.018","DOI":"10.1016\/j.neunet.2021.10.018"},{"key":"e_1_3_2_12_2","doi-asserted-by":"publisher","DOI":"10.1109\/ISLPED65674.2025.11261754"},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","unstructured":"Guanshujie Fu Olivier Fischer Shien Zhu and Gustavo Alonso. 2026. TABv2: A faster ternary and binary neural network inference library on the edge. IEEE Transactions on Very Large Scale Integration (VLSI) Systems. 1\u201313. DOI:10.1109\/TVLSI.2025.3650684","DOI":"10.1109\/TVLSI.2025.3650684"},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.5555\/3433701.3433723"},{"key":"e_1_3_2_15_2","doi-asserted-by":"publisher","unstructured":"Changwan Hong Aravind Sukumaran-Rajam Israt Nisa Kunal Singh and P. Sadayappan. 2019. Adaptive sparse tiling for sparse matrix multiplication.In Proceedings of the 24th Symposium on Principles and Practice of Parallel Programming. Association for Computing Machinery New York NY USA 300\u2013314. DOI:10.1145\/3293883.3295712","DOI":"10.1145\/3293883.3295712"},{"key":"e_1_3_2_16_2","unstructured":"Hong Huang Decheng Wu Rui Cen Guanghua Yu Zonghang Li Kai Liu Jianchen Zhu Peng Chen Xue Liu and Dapeng Wu. 2025. Tequila: Trapping-free ternary quantization for large language models. arXiv:2509.23809. Retrieved from https:\/\/arxiv.org\/abs\/2509.23809"},{"key":"e_1_3_2_17_2","first-page":"9833","volume-title":"Proceedings of the International Conference on Machine Learning","author":"Jaiswal Ajay Kumar","year":"2022","unstructured":"Ajay Kumar Jaiswal, Haoyu Ma, Tianlong Chen, Ying Ding, and Zhangyang Wang. 2022. Training your sparse neural network better with any mask. In Proceedings of the International Conference on Machine Learning. PMLR, 9833\u20139844."},{"key":"e_1_3_2_18_2","doi-asserted-by":"publisher","DOI":"10.1109\/ASPDAC.2018.8297304"},{"key":"e_1_3_2_19_2","volume-title":"Proceedings of the 13th International Conference on Learning Representations","author":"Kaushal Ayush","year":"2025","unstructured":"Ayush Kaushal, Tejas Vaidhya, Arnab Kumar Mondal, Tejas Pandey, Aaryan Bhagat, and Irina Rish. 2025. Surprising effectiveness of pretraining ternary language model at scale. In Proceedings of the 13th International Conference on Learning Representations."},{"key":"e_1_3_2_20_2","doi-asserted-by":"crossref","unstructured":"Minsoo Kim Sihwa Lee Janghwan Lee Sukjin Hong Du-Seong Chang Wonyong Sung and Jungwook Choi. 2023. Token-scaled logit distillation for ternary weight generative language models. In Advances in Neural Information Processing Systems A. Oh T. Naumann A. Globerson K. Saenko M. Hardt and S. Levine (Eds.). Vol. 36 Curran Associates Inc. 42097\u201342118. Retrieved from https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2023\/file\/8342218a4ec08b8c19661725e9cd6c0b-Paper-Conference.pdf","DOI":"10.52202\/075280-1824"},{"key":"e_1_3_2_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/3600006.3613165"},{"key":"e_1_3_2_22_2","doi-asserted-by":"publisher","DOI":"10.1109\/TNNLS.2024.3380827"},{"key":"e_1_3_2_23_2","unstructured":"Benjamin Lefaudeux Francisco Massa Diana Liskovich Wenhan Xiong Vittorio Caggiano Sean Naren Min Xu Jieru Hu Marta Tintore Susan Zhang Patrick Labatut Daniel Haziza Luca Wehrstedt Jeremy Reizenstein and Grigory Sizov. 2022. xFormers: A modular and hackable transformer modelling library. Retrieved April 30 2026 from https:\/\/github.com\/facebookresearch\/xformers"},{"key":"e_1_3_2_24_2","doi-asserted-by":"publisher","unstructured":"Yuhang Li Xin Dong Sai Qian Zhang Haoli Bai Yuanpeng Chen and Wei Wang. 2020. RTN: Reparameterized ternary network. In Proceedings of the AAAI Conference on Artificial Intelligence 34 4 (2020) 4780\u20134787. DOI:10.1609\/aaai.v34i04.5912","DOI":"10.1609\/aaai.v34i04.5912"},{"key":"e_1_3_2_25_2","doi-asserted-by":"publisher","DOI":"10.1145\/3575693.3575706"},{"key":"e_1_3_2_26_2","unstructured":"Xudong Lu Aojun Zhou Ziyi Lin Qi Liu Yuhui Xu Renrui Zhang Yafei Wen Shuai Ren Peng Gao Junchi Yan et\u00a0al. 2024. TerDiT: Ternary diffusion models with transformers. arXiv:2405.14854. Retrieved from https:\/\/arxiv.org\/abs\/2405.14854"},{"key":"e_1_3_2_27_2","doi-asserted-by":"publisher","DOI":"10.1109\/CANDARW64572.2024.00031"},{"key":"e_1_3_2_28_2","doi-asserted-by":"crossref","unstructured":"Matteo Pagliardini Daniele Paliotta Martin Jaggi and Fran\u00e7ois Fleuret. 2023. Fast attention over long sequences with dynamic sparse flash attention. In Advances in Neural Information Processing Systems A. Oh T. Naumann A. Globerson K. Saenko M. Hardt and S. Levine (Eds.). Vol. 36 Curran Associates Inc. 59808\u201359831. Retrieved from https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2023\/file\/bc222e8153a49c1b30a1b8ba96b35117-Paper-Conference.pdf","DOI":"10.52202\/075280-2613"},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.23919\/DATE69613.2026.11539457"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.1109\/IPDPS49936.2021.00110"},{"key":"e_1_3_2_31_2","doi-asserted-by":"publisher","DOI":"10.1109\/CVPRW.2017.61"},{"key":"e_1_3_2_32_2","unstructured":"SGLang Team. 2023. SGLang is a fast serving framework for large language models and vision language models. Retrieved April 30 2026 from https:\/\/github.com\/sgl-project\/sglang"},{"key":"e_1_3_2_33_2","unstructured":"Ashish Vaswani Noam Shazeer Niki Parmar Jakob Uszkoreit Llion Jones Aidan N. Gomez \u0141ukasz Kaiser and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems I. Guyon U. Von Luxburg S. Bengio H. Wallach R. Fergus S. Vishwanathan and R. Garnett (Eds.). Vol. 30 Curran Associates Inc. Retrieved from https:\/\/proceedings.neurips.cc\/paper_files\/paper\/2017\/file\/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf"},{"issue":"125","key":"e_1_3_2_34_2","first-page":"1","article-title":"Bitnet: 1-bit pre-training for large language models","volume":"26","author":"Wang Hongyu","year":"2025","unstructured":"Hongyu Wang, Shuming Ma, Lingxiao Ma, Lei Wang, Wenhui Wang, Li Dong, Shaohan Huang, Huaijie Wang, Jilong Xue, Ruiping Wang, et\u00a0al. 2025. Bitnet: 1-bit pre-training for large language models. Journal of Machine Learning Research 26, 125 (2025), 1\u201329.","journal-title":"Journal of Machine Learning Research"},{"key":"e_1_3_2_35_2","doi-asserted-by":"publisher","unstructured":"Jinheng Wang Hansong Zhou Ting Song Shijie Cao Yan Xia Ting Cao Jianyu Wei Shuming Ma Hongyu Wang and Furu Wei. 2025. Bitnet.cpp: Efficient edge inference for ternary LLMs. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) Wanxiang Che Joyce Nabende Ekaterina Shutova and Mohammad Taher Pilehvar (Eds.). Association for Computational Linguistics Vienna Austria 9305\u20139322. DOI:10.18653\/v1\/2025.acl-long.457","DOI":"10.18653\/v1\/2025.acl-long.457"},{"key":"e_1_3_2_36_2","unstructured":"Mengwei Xu Wangsong Yin Dongqi Cai Rongjie Yi Daliang Xu Qipeng Wang Bingyang Wu Yihao Zhao Chen Yang Shihe Wang et\u00a0al. 2024. A survey of resource-efficient llm and multimodal foundation models. arXiv:2401.08092. Retrieved from https:\/\/arxiv.org\/abs\/2401.08092"},{"key":"e_1_3_2_37_2","unstructured":"Rongjie Yi Liwei Guo Shiyun Wei Ao Zhou Shangguang Wang and Mengwei Xu. 2023. EdgeMoE: Fast On-Device Inference of MoE-based Large Language Models. arxiv:2308.14352. Retrieved from https:\/\/arxiv.org\/abs\/2308.14352"},{"key":"e_1_3_2_38_2","unstructured":"Zhihang Yuan Yuzhang Shang Yang Zhou Zhen Dong Chenhao Xue Bingzhe Wu Zhikai Li Qingyi Gu Yong Jae Lee Yan Yan et\u00a0al. 2024. Llm inference unveiled: Survey and roofline model insights. arXiv:2402.16363. Retrieved from https:\/\/arxiv.org\/abs\/2402.16363"},{"key":"e_1_3_2_39_2","doi-asserted-by":"publisher","DOI":"10.1145\/1077464.1077466"},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","DOI":"10.1109\/HPCA47549.2020.00030"},{"key":"e_1_3_2_41_2","unstructured":"Zixuan Zhou Xuefei Ning Ke Hong Tianyu Fu Jiaming Xu Shiyao Li Yuming Lou Luning Wang Zhihang Yuan Xiuhong Li et\u00a0al. 2024. A survey on efficient inference for large language models. arXiv:2404.14294. Retrieved from https:\/\/arxiv.org\/abs\/2404.14294"},{"key":"e_1_3_2_42_2","volume-title":"Proceedings of the International Conference on Learning Representations","author":"Zhu Chenzhuo","year":"2017","unstructured":"Chenzhuo Zhu, Song Han, Huizi Mao, and William J. Dally. 2017. Trained ternary quantization. In Proceedings of the International Conference on Learning Representations."},{"key":"e_1_3_2_43_2","unstructured":"Rui-Jie Zhu Yu Zhang Ethan Sifferman Tyler Sheaves Yiqiao Wang Dustin Richmond Peng Zhou and Jason K. Eshraghian. 2024. Scalable MatMul-free language modeling. arXiv:2406.02528. Retrieved from https:\/\/arxiv.org\/abs\/2406.02528"},{"key":"e_1_3_2_44_2","doi-asserted-by":"publisher","DOI":"10.1145\/3508390"}],"container-title":["ACM Transactions on Embedded Computing Systems"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3807782","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,6,17]],"date-time":"2026-06-17T16:26:47Z","timestamp":1781713607000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3807782"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,6,17]]},"references-count":43,"journal-issue":{"issue":"4","published-print":{"date-parts":[[2026,7,31]]}},"alternative-id":["10.1145\/3807782"],"URL":"https:\/\/doi.org\/10.1145\/3807782","relation":{},"ISSN":["1539-9087","1558-3465"],"issn-type":[{"value":"1539-9087","type":"print"},{"value":"1558-3465","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,6,17]]},"assertion":[{"value":"2025-07-14","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-03-30","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2026-06-17","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}