GPU-Accelerated Optimization of Transformer-Based Neural Networks for Real-Time Inference
arXiv:2603.28708v1 Announce Type: new Abstract: This paper presents the design and evaluation of a GPU-accelerated inference pipeline for transformer models using NVIDIA TensorRT with mixed-precision optimization. We evaluate BERT-base (110M parameters) and GPT-2 (124M parameters) across batch sizes from 1 to 32 and sequence lengths from 32 to 512. The system achieves up to 64.4x speedup over CPU baselines, sub-10 ms latency for single-sample inference, and a 63 percent reduction in memory usage. We introduce a hybrid precision strategy that preserves FP32 for numerically sensitive operations — Soutrik Mukherjee, Sangwhan Cha
View PDF
Abstract:This paper presents the design and evaluation of a GPU-accelerated inference pipeline for transformer models using NVIDIA TensorRT with mixed-precision optimization. We evaluate BERT-base (110M parameters) and GPT-2 (124M parameters) across batch sizes from 1 to 32 and sequence lengths from 32 to 512. The system achieves up to 64.4x speedup over CPU baselines, sub-10 ms latency for single-sample inference, and a 63 percent reduction in memory usage. We introduce a hybrid precision strategy that preserves FP32 for numerically sensitive operations such as softmax and layer normalization, while applying FP16 to linear layers. This approach maintains high numerical fidelity (cosine similarity >= 0.9998 relative to baseline outputs) and eliminates NaN instability. The pipeline is implemented as a modular, containerized system that enables reproducible benchmarking across more than 360 configurations. Cross-GPU validation on an NVIDIA A100 shows consistent FP16 speedup ratios between 1.84x and 2.00x, along with stable numerical behavior. Downstream evaluation on SST-2 demonstrates no accuracy degradation under hybrid precision. Validation on WikiText-2 shows that random inputs underestimate NaN instability by up to 6x for full FP16, while confirming the robustness of the hybrid approach (0.0 percent NaN, cosine similarity >= 0.9998). These results provide a detailed characterization of performance and accuracy trade-offs across GPU architectures and offer practical guidance for deploying transformer models in latency-critical environments.
Comments: 10 pages, 8 figures, 15 tables
Subjects:
Machine Learning (cs.LG); Distributed, Parallel, and Cluster Computing (cs.DC)
Cite as: arXiv:2603.28708 [cs.LG]
(or arXiv:2603.28708v1 [cs.LG] for this version)
https://doi.org/10.48550/arXiv.2603.28708
arXiv-issued DOI via DataCite (pending registration)
Submission history
From: Sangwhan Cha [view email] [v1] Mon, 30 Mar 2026 17:27:33 UTC (713 KB)
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
researchpaperarxiv‘It’s all very possible’: Michael Patrick King on The Comeback return’s shocking AI twist – and why And Just Like That will age well
<p>Could AI write an entire sitcom series? That’s the premise of the new season of comedy drama The Comeback. Its co-creator talks about being shocked by his research – and why the world needs to catch up with AJLT</p><p>TV veteran Michael Patrick King has had a long, lively career, writing, directing and producing on shows including Murphy Brown, Will & Grace and 2 Broke Girls. He’s best-known, though, for his work on the Sex and the City franchise, serving as its showrunner for the bulk of its run, writing and directing its two films, and masterminding its controversial <a href="https://www.theguardian.com/tv-and-radio/2025/aug/02/goodbye-and-just-like-that-right-time-to-end-cursed-spin-off">2020s revival And Just Like That</a>. But this month sees the return of one of his most loved
SEAS Researchers Expose Hidden “Alignment Discretion” Shaping AI Behavior - Harvard School of Engineering and Applied Sciences
<a href="https://news.google.com/rss/articles/CBMiowFBVV95cUxONEZoeldndUE2ZUZsSkloQmZVMk1jZUhncUY0V3c5NDQ0TlNLVTluWkppejlpOVdpemxqNEVvaDAwbG43VWpxOFpuakFtRDNLUlVTbEwzR25kYnJieVdkSEs0MVRESHpPSHN6dEhXUk9qVGRlVjFhT2ZqVjlJV056MG94MDN3dWVCSUtoRWVDODF5bVVET2gxQW5DSk1oT1pUNlVB?oc=5" target="_blank">SEAS Researchers Expose Hidden “Alignment Discretion” Shaping AI Behavior</a> <font color="#6f6f6f">Harvard School of Engineering and Applied Sciences</font>
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Research Papers
Oracle Layoffs Recast Costs To Back US$50b AI Infrastructure Bet - simplywall.st
<a href="https://news.google.com/rss/articles/CBMivwFBVV95cUxQNWpZb2ZQVDBIOGVZTTBtLThzaGwxS3NkMnJBSS1wek5pQlJXRWdTOEh5aTdPTE9Cd3JHdjZDeWRtVzdMUUdESHJOQXZDdGNVdGZtTTBhanpfb3UxQnRobVlzNGdVUXJLZWptV2V6NXlNSWllX3FxOU5XYTF0RkM2TnJIaFJkcVBFOGc2alBSLTZEeU85QU1oTjBrMVZSTl84dm9GeFl5OGtUMjc3LVd1dS1fcHZ1RG9HcV82T2JFWdIBxAFBVV95cUxOSE5XVXh0QkM4Yi1WbXNhWkJ2Z2dLRlBGNjAwaTcyNFJWMWRPdXo5WjRQQkRGTG9IamxxbmdhMHpsaEJ6RDQwZl9ENGl5WDc5a2lrTXZ1bVpFbGdsdndHYjFINnZPSnNKX1dZamszUXByR1BlRXF6d1pKOHpBU3M5UFhUSldlUWtIMlRNQzdvTk9haEJKeDI1ZEg0WWQ1SXYzLUZCWElQc3pzR19ucGExdVpnc2hBQXlQNVpOZFVBVzRkLXFE?oc=5" target="_blank">Oracle Layoffs Recast Costs To Back US$50b AI Infrastructure Bet</a> <font color="#6f6f6f">simplywall.st</font>
Riyadh conference to discuss role of AI in media industry - Arab News PK
<a href="https://news.google.com/rss/articles/CBMiVEFVX3lxTE1jdFVMUFA3R2RXM19JR1M1NnpjX210dUZuNkI3VWdQc0tzVVBZaXR3ZlNqUVFyZlB5aTMxOGI3OXFpdGpQX2RsOXF3UU5kaXlma2VpTQ?oc=5" target="_blank">Riyadh conference to discuss role of AI in media industry</a> <font color="#6f6f6f">Arab News PK</font>
Losito named IBM Italia general manager - Telecompaper
<a href="https://news.google.com/rss/articles/CBMiigFBVV95cUxNRTQ0RzVrcHJsVXo0THF3UllROGwyam1FNl9RWlV2dzJFRGtGMktoTGlYVUR5dU1WX1JSTkExQlNSVEFSWktVQVJSazFUUTJyV2tadUlraVlGM3M3WHNZNFNodm5DeVBvTXFkaDNkNXJ4SzF0RnphNGxOYlFGaFRtR241R2M0NFhUakE?oc=5" target="_blank">Losito named IBM Italia general manager</a> <font color="#6f6f6f">Telecompaper</font>


Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!