Year: 2026
Type: dissertation
Abstract: Transformer models are increasingly deployed in offline batch settings, where large collections of inputs are processed on GPUs and the goal is to maximize throughput. Several choices shape how much of that throughput is achieved: how inputs are batched, which runtime executes the model, and how CPU and GPU work is scheduled. These are easy to leave at defaults, and the general-purpose frameworks commonly used prioritize flexibility over raw speed. This thesis investigates these choices systematically, using the M2M-100 (1.2B) model translating Finnish Wikipedia articles to English on an NVIDIA RTX 3090 as the test workload. Three families of optimization are evaluated against a tuned baseline: batching strategies, the inference runtime, and pipeline-level overlap of CPU and GPU work. Each is measured in isolation and in combination. For every configuration the pipeline is profiled stage by stage and throughput, GPU utilization, peak memory, and padding are recorded, with translation quality verified on the FLORES+ benchmark. The combined configuration reaches a 5.33× throughput improvement over the baseline with no measurable loss of quality. The largest single gains come from replacing the general-purpose runtime with a specialized one and from sorting inputs by length before batching. The central finding concerns padding, the most visible inefficiency of batched variable-length inference. Throughput is governed by how much useful work the GPU performs, the product of how busy it is kept and how little of that work is padding, so reducing padding helps only when it does not also shrink the batches. Once the GPU is saturated, the remaining choice concerns memory rather than speed, and peak memory can be predicted from the model architecture. Overlapping CPU and GPU work adds a further gain, but only when the runtime releases the Python interpreter lock during generation.
Source: Aaltodoc (Aalto University)
Author: Juusti, Mikko
Institution: Aalto University
Language: English
Subfield: Hardware and Architecture
Field: Computer Science
Domain: Physical Sciences
Keyword: GPU utilization
Open Access status: green
OpenAlex ID: W7204021211
