Achieving 450 tok/s on Non-NVIDIA GPUs: A 51% Inference Speedup with Legacy Hardware

    Large Language Model (LLM) inference performance is often believed to depend heavily on top-tier hardware. However, recent tests demonstrate a non-NVIDIA GPU paired with a decade-old CPU achieving 450 tokens/s on a 27B parameter model. This article dissects how deep software optimizations—custom GEMV kernels, speculative decoding, and KV cache compression—can overcome hardware bottlenecks to deliver high throughput on legacy systems. We also explore cross-platform portability practices and future directions for inference acceleration.

    Background: When Inference Speed No Longer Depends Solely on Top-Tier Hardware

    Large Language Model (LLM) inference performance is generally considered strongly correlated with GPU specifications. High-end NVIDIA graphics cards have long been the mainstream choice for local deployment due to their high memory bandwidth and mature software ecosystem. However, recent real-world test data from the developer community has sparked widespread interest: on a non-NVIDIA GPU platform paired with a CPU released about a decade ago (supporting only the PCIe 3.0 interface), the inference speed of a 27B parameter model (a dense model in the style of Qwen3.8) was pushed to 450 tokens/s. This figure not only far exceeds conventional expectations but also approaches the performance level of some mid-to-high-end NVIDIA graphics cards.

    The core revelation of this phenomenon is that inference throughput bottlenecks are not solely determined by hardware; deep optimization at the software level can also bring about an order-of-magnitude change. This article will restore the technical panorama of this non-NVIDIA platform achieving high-throughput inference from three dimensions: performance profiling, optimization technique breakdown, and hardware adaptation paths, and extract a reusable general methodology.

    1. Root Causes of Performance Bottlenecks: Bandwidth, Compute, and Memory Access Efficiency

    1.1 Why “Legacy CPU + PCIe 3.0” is Considered a Disadvantage

    In modern LLM inference scenarios, model weights must be loaded from VRAM (or system memory) to the compute units. For a 27B parameter model, even when stored with 4-bit quantization, a single forward pass requires reading about 13.5GB of data. Limited by the theoretical bandwidth of the PCIe 3.0 x16 interface (~16GB/s, with an effective bandwidth of around 12-14GB/s), if every layer’s inference relies on the CPU to move data, the throughput ceiling would be compressed to under 100 tok/s—without even accounting for the compute units’ own time consumption.

    Therefore, achieving a throughput of 450 tok/s means the system must compress the data volume to be processed in each forward pass to less than 1/4 of the traditional scheme, while keeping the compute unit (GPU) utilization near saturation. This can only be achieved by optimizing memory access patterns and compute kernels.

    1.2 The “Barrel Effect” of Inference Performance

    In the classic autoregressive generation process, performance bottlenecks typically occur in the following three areas:

    Phase Bottleneck Type Traditional Optimization Key Action in This Case
    Weight Reading Memory Bandwidth Quantization (INT4/INT8) Further KV cache compression
    Matrix Multiplication Compute Density Tensor Core instructions Custom GEMV kernel
    Sequence Generation Serial Latency Batching Speculative decoding (mid-way verification)

    It is evident that simply relying on quantization or increasing batch size makes it difficult to achieve an order-of-magnitude improvement in single-user scenarios. What truly widens the gap is the fine-grained compression of the latency for each token in the generation loop.

    2. The Path to 450 tok/s: Three-Layer Technical Synergy

    2.1 Low-Level: Custom GEMV Kernel and Memory Access Optimization

    In LLM inference, matrix multiplication operations for weights can be divided into GEMM (General Matrix-Matrix multiplication, used in the prefill phase) and GEMV (Matrix-Vector multiplication, used in the per-token generation phase). In low-batch generation scenarios, GEMV time consumption dominates. Traditional implementations (like cuBLAS) are optimized for large-scale GEMM but exhibit obvious memory access waste for small-scale GEMV.

    Developers rewrote the GEMV kernel (involving custom operators such as “GDN” and “gemv-ab”) on non-NVIDIA GPUs, with two core ideas:

    • Eliminating spatial waste caused by boundary alignment: Targeting the shared memory size and bank conflict characteristics of specific GPUs, the storage layout of the weight matrix was rearranged so that each row of weights fully utilizes the cache line when loaded.
    • Instruction-Level Parallelism (ILP) scheduling: Processing multiple independent vector multiply-add operations simultaneously within a single warp to hide memory access latency.

    Results show that this optimization alone increased the baseline performance from 298 tok/s by about 23% (corresponding to ~367 tok/s), proving that the adaptability of the compute kernel is more important than peak compute power.

    2.2 Key: Engineering Implementation of Speculative Decoding

    Speculative decoding is the biggest variable in this performance leap. Its core logic is: using a smaller draft model to quickly generate multiple consecutive tokens, which are then verified in parallel by the large model. When verification passes, a single forward pass can output multiple tokens, thereby distributing the serial generation latency across more tokens.

    In this case, the draft model’s generation latency was about 3.5 milliseconds, and a verification round could accept about 31 candidate tokens. Calculated, the speedup brought by speculative decoding is about 1.4-1.5x (combined with kernel optimization, an overall 51% speedup). This data indicates:

    1. The distribution alignment between the draft model and the target model is critical—if the draft model is too small or its training distribution deviates, the verification acceptance rate will drop significantly.
    2. The verification phase needs to support parallel token inference—this requires the target model’s forward pass logic to handle continuous fragments of multiple sequences rather than computing a single token sequentially.

    2.3 Auxiliary: KV Cache Compression (KV5) and Long Context Support

    Beyond speculative decoding, the VRAM footprint of the KV cache directly impacts the maximum batch size and throughput. This case adopted the “KV5” compression scheme (a strategy that quantizes K/V matrices by channel groups), reducing the VRAM footprint of a single sequence’s cache by about 40%. With the same total VRAM, it can accommodate larger batches or longer context windows, indirectly improving hardware utilization.

    It is worth noting that these optimizations did not rely on any proprietary third-party libraries but were implemented from scratch using general low-level interfaces provided by GPU vendors (such as Level Zero, OpenCL). This also makes future migration to more non-NVIDIA hardware possible.

    3. Breaking Through Hardware Adaptation: From Proprietary Ecosystems to Universal Interfaces

    3.1 Cross-Platform Porting Practices

    Another highlight of this case is the “decentralization” of the hardware stack: in addition to the original GPU, the community has experimentally ported this inference engine to the Intel Arc Pro series GPUs (based on the SYCL/Level Zero interface), with the host CPU being an i7-8700 (released in 2018). Insights from this porting process include:

    • Choice of abstraction layer: Although heterogeneous interfaces like SYCL/Level Zero have lower performance than native CUDA, they allow complete control over the kernel layer. For scenarios demanding extreme performance, directly using vendor-provided low-level APIs (like Level Zero’s Context and Command Queue management) is often more effective than high-level frameworks.
    • Dynamic allocation of shared and local memory: Different GPU architectures have significant differences in local memory capacity and latency. When migrating the GEMV kernel, it is necessary to recalculate the Tile size and Unroll factor based on the target hardware’s parameters; they cannot be directly reused.

    3.2 Analogy with Mainstream Cloud Platforms: Validating the Universal Path

    The “kernel-level optimization + algorithm synergy” approach demonstrated in this case aligns with the practices of cloud computing platforms in inference acceleration. In cloud environments, the cost of inference services strongly depends on the balance between throughput and latency. Even if the underlying hardware differs, the following principles still hold true:

    1. Prioritize maximizing memory access efficiency: For weight-dominated inference scenarios, VRAM bandwidth utilization is more critical than floating-point compute power.
    2. Utilize sequence-level parallelism: Schemes like speculative decoding or prefix caching can improve single-stream response speed without increasing VRAM bandwidth pressure.
    3. Trade quantization for more resident space: The larger the VRAM, the larger the batch size that can be accommodated, and the higher the overall throughput.

    Therefore, for teams looking to further reduce inference costs or improve concurrency on cloud GPUs, the aforementioned optimizations can be viewed as a replicable practice guide rather than tricks tied to specific hardware.

    4. Future Challenges and Directions

    Although the 450 tok/s result is exciting, the boundary conditions of this achievement must be noted:

    • Single-user scenario: This performance data is based on single-request generation tests. If streaming responses need to be provided concurrently to dozens of users simultaneously, the batch merging strategy must be re-evaluated, and the benefits of the GEMV kernel might be offset by preprocessing overhead under high concurrency.
    • Draft model resource overhead: While speculative decoding is a general acceleration method, the draft model itself also requires VRAM and compute resources. On platforms with less than 24GB of VRAM, whether to use speculative decoding requires a trade-off between incremental throughput and resource consumption.
    • Compilation chain maintenance cost: Custom kernels imply potential risks of syncing with GPU vendor drivers. After vendors update driver protocols, verification and adaptation are required, posing a certain maintenance burden for individual developers or small teams.

    Based on this, subsequent directions worth exploring include:

    • Sparsification and expert parallelism: For MoE (Mixture of Experts) architecture 27B models, effective computation can be further reduced through activation routing and expert pruning.
    • Cross-node pipeline parallelism: Splitting phases like tokenization, embedding, autoregressive generation, and sampling into pipelines for asynchronous scheduling across heterogeneous devices to amortize single-device latency.

    Conclusion: Hardware Determines the Floor, Software Determines the Ceiling

    Reviewing the entire case, we can clearly see a consistent main thread: on platforms with limited compute and bandwidth, it is entirely possible to compensate for hardware generation gaps through fine-grained kernel adaptation, speculative sampling at the algorithm level, and improvements in memory density.

    For developers, this means that instead of only focusing on GPU models or interface standards, more attention should be paid to the internal implementation of the inference engine. Engineering details such as GEMV micro-kernel design, pipelining of the draft verification loop, and cache layout optimization are the critical steps from moving 298 tok/s to 450 tok/s.

    In general computing environments, this technical path is equally valuable for reference—regardless of the hardware used, the greatest potential for inference speed improvement often lies hidden in the lowest-level matrix operations and the most cutting-edge sampling strategies.