Skip to main content

How It Works

To understand why daisy-vllm exists, you have to look at what GPUs actually spend their time doing during large language model inference.


The Bottleneck: Why MLP Layers Dominate Execution Time​

When profiling transformer inference on modern GPUs, there is a common misconception that attention is the primary compute bottleneck. In reality, across modern decoder models (such as LLaMA and Qwen), the vast majority of GPU kernel time is consumed by non-attention dense matrix multiplications especially during prefill stage.

Here is real profiling data from an AMD Instinct MI210 (gfx90a) running Qwen 2.5-1.5B in stock vLLM (VLLM_COMPILE mode, 128 input tokens):

GPU kernel time breakdown: 83% GEMM/MLP vs 12% Attention

Profiled on AMD Instinct MI210 (gfx90a), Qwen 2.5-1.5B, VLLM_COMPILE mode, 128 input tokens. Raw data from profile_ops.py.

Kernel CategoryGPU Kernel TimeShare of Total
GEMM (MLP Projections: Gate, Up, Down)37.0 ms82.9%
Attention (PagedAttention + FlashAttention)5.2 ms11.7%
LayerNorm + Elementwise Activations + Other2.4 ms5.4%

Over 82.9% of total GPU time is spent in matrix multiplications inside the MLP layers.


How docc Integrates with vLLM​

daisy-vllm does not replace vLLM. vLLM is an industry standard for high-throughput serving, request scheduling, continuous batching, and paged memory management. Instead, daisy-vllm surgically accelerates the bottleneck by embedding docc (docc.pytorch) directly into vLLM's execution pipeline.

Architecture comparison: Stock vLLM vs daisy-vllm


Compilation Roadmap: MLP is Target #1​

daisy-vllm targets MLP layers first because that is where 83% of the execution time is spent. Accelerating MLP provides the highest performance return per line of code.

However, the piecewise architecture is designed to expand across the entire transformer block:

Compilation TargetSplitting OpStatusTechnical Focus
SwiGLU MLPdocc_mlpValidatedFused Gate/Up GEMM + SiLU epilogue + Down GEMM i.e. the bottleneck
Multi-Head Attentiondocc_attentionPlannedCustom flash-attention kernels tailored to AMD CDNA/RDNA matrix cores
KV Cache Managementdocc_kv_cachingPlannedShape-specialized paging and cache reshape kernels

As additional compilation targets mature, docc coverage expands across the transformer layer, progressively minimizing dependence on generic library kernels while maintaining full vLLM compatibility.


Next Steps​