Characterization of quantized inference with transformer encoders on low power CPUs

[EN] Transformers, particularly large language models (LLMs), are revolutionizing applications in natural language processing and computer vision but at a high cost in memory, energy, and computational resources. Quantization has emerged as an effective compression method to alleviate these demands,...

Descripción completa

Detalles Bibliográficos
Autores: Martínez, Héctor, Catalán, Sandra, Castelló, Adrián|||0000-0002-8576-8451, Quintana-Ortí, Enrique S.|||0000-0002-5454-165X
Tipo de recurso: artículo
Fecha de publicación:2025
País:España
Institución:Universitat Politècnica de València (UPV)
Repositorio:RiuNet. Repositorio Institucional de la Universitat Politécnica de Valéncia
Idioma:inglés
OAI Identifier:oai:riunet.upv.es:10251/225306
Acceso en línea:https://riunet.upv.es/handle/10251/225306
Access Level:acceso abierto
Palabra clave:Deep learning
Transformer encoders
Inference
Quantization
Matrix multiplication
Multicore CPUs
Descripción
Sumario:[EN] Transformers, particularly large language models (LLMs), are revolutionizing applications in natural language processing and computer vision but at a high cost in memory, energy, and computational resources. Quantization has emerged as an effective compression method to alleviate these demands, reducing the bitwidth of model data and arithmetic precision to enable efficient inference on resource-constrained devices. This paper focuses on optimizing inference with transformer encoders on low-power general-purpose CPUs, as those often found in edge devices. Our key contributions include exposing the critical role of linear layers within transformer encoders on CPUs with a limited number of cores; developing mixed integer precision matrix multiplication on ARM and RISC-V CPUs; and evaluating performance impact and energy savings of quantized inference. In summary, this work highlights the advantages of applying quantization to transformer encoders on current single-core and multi-core low power CPUs, offering insights for efficient LLM deployment on edge platforms.