Analyzing the Effects of Input Batching on the Inference Time of Vision Transformer Models
Data batching is a fundamental technique in machine learning and deep learning that enhances model execution by processing multiple data samples simultaneously. This approach optimizes memory usage, improves computational efficiency, and accelerates both training and inference by leveraging modern hardware capabilities like GPUs and TPUs. Batching enables vectorized computations, reducing processing overhead and maximizing hardware utilization. It also stabilizes training by averaging gradient updates, leading to smoother optimization and better convergence, especially in large-scale neural networks. Additionally, batching improves model generalization by exposing it to diverse examples and enables techniques like Batch Normalization, further enhancing stability and performance. This paper investigates Vision Transformer (ViT) models with varying batch sizes, demonstrating that increasing the batch size significantly reduces inference time. Notably, a batch size of 16 achieves an 83% reduction in inference time compared to single-sample processing, underscoring the substantial efficiency gains from batching.
Authors
- Md Yusuf Sarwar Uddin (ORCID: https://orcid.org/0000-0003-2184-0140)
- Waleed Hassan Mubark (ORCID: https://orcid.org/0000-0001-7692-1496)
Institutions
- University of Missouri–Kansas City (US)
Publication Details
- Published
- 2025-04-13
- DOI
- https://doi.org/10.1109/iccit63348.2025.10989331
- Primary Topic
- Infrared Target Detection Methodologies
- Type
- article
- Field-Weighted Citation Impact
- 0.00