Efficient LLM-based Advertising via Model Compression and Parallel Verification

arXiv cs.CL Papers

Summary

This paper presents an efficient LLM-based advertising framework using model compression and parallel verification, achieving over 1.8x speedup in real-world deployment at Baidu.

arXiv:2605.11582v1 Announce Type: new Abstract: Large language models (LLMs) have shown remarkable potential in advertising scenarios such as ad creative generation and targeted advertising. However, deploying LLMs in real-time advertising systems poses significant challenges due to their high inference latency and computational cost. In this paper, we propose an Efficient Generative Targeting framework that integrates adaptive group quantization, layer-adaptive hierarchical sparsification, and prefix-tree parallel verification to accelerate LLM inference while preserving generation quality. Extensive experiments on two real-world advertising scenarios demonstrate that our framework achieves significant speedup with acceptable quality degradation, making it operationally viable for practical deployments.
Original Article
View Cached Full Text

Cached at: 05/13/26, 06:15 AM

# Efficient LLM-based Advertising via Model Compression and Parallel Verification
Source: [https://arxiv.org/html/2605.11582](https://arxiv.org/html/2605.11582)
Wenxin Dong, Chang Gao, Guanghui Yu, Xuewu Jiao†, Mingqing Hu, Qiang Fu, Peng Xu, Penghui Wei, Hui Xu, Yue Xing, Shuanglong Li, Lin Liu

###### Abstract\.

Recent advances in large language models \(LLMs\) have shown significant impact in various domains such as online advertising\. However, traditional methods often struggle with inefficiencies in inference latency and high computational costs\. To solve these problems, we propose an innovativemodel compressionframework that integrates layer\-adaptive group\-wise quantization and layer\-wise semi\-structured sparsity optimized for GEMV workloads\. We also introduce a novelprefix tree\-based parallel verificationstrategy to further enhance efficiency\. Extensive experiments in two scenarios—ad creative generation and targeted advertising—validate the effectiveness of our approach\. The implementation of our framework in a leading advertising platform has been deployed in production, achieving a speedup of over 1\.8×\\timesin real\-world experiments while maintaining competitive precision\.

00footnotetext:†Corresponding author\.00footnotetext:This work was conducted in 2024 and the system has been deployed in Baidu’s advertising platform since then\.## 1\.Introduction

Recently, the advent of LLMs has introduced a paradigm shift in recommendation systems, enabling the transition from traditional discriminative\-based architectures to generative\-based approaches\(Wang and Lim,[2023](https://arxiv.org/html/2605.11582#bib.bib1); Zhaiet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib17)\)\. These models leverage the world knowledge and reasoning abilities embedded in LLMs, offering superior generalization capabilities and robustness\. Generative targeting refers to the end\-to\-end, real\-time process of seamlessly integrating generative LLMs with online advertising scenarios, directly generating relevant ads based on user queries\. By embedding ad indices within the model, this new technological paradigm imposes higher demands on the regular updates of the model\.

However, as model parameters expand and real\-time demands escalate, the complexity of inference in LLM\-enhanced recommendation systems has risen, resulting in a scalability\-efficiency dilemma\. This conflict positions latency\-sensitive scenarios \(*e\.g\.*, advertising\) as the critical performance bottleneck, necessitating solutions that effectively optimize the inference without compromising recommendation quality\.

Motivation and Challenge\. Existing research has primarily focused on simplyapplyingLLMs to recommendation systems \(RS\), with an emphasis on precision\-side optimizations such as training strategy upgrade\(Baoet al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib13); Yanget al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib19); Wanget al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib18); Weiet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib14)\)and prompting innovation\(Liaoet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib12); Zhang and Wang,[2023](https://arxiv.org/html/2605.11582#bib.bib20)\)\. These approaches have demonstrated exceptional accuracy, significantly improving the predictive performance of recommendation systems\. However, these studies often overlook efficiency\-side optimizations, which is particularly detrimental in time\-sensitive scenarios like online real\-time inference for commercial ad delivery\.

Our Main Idea\. To tackle these technical challenges, we are motivated to propose a pioneering and effective solution to the Generative targeting problem\. Specifically, we innovatively designed an index\-compressed data structure to support semi\-structured layer\-wise FP16 mixed sparsification and used adaptive group\-wise quantization techniques to achieve model compression from FP16 to INT4\. Additionally, we developed a custom kernel that supports mixed\-precision computation with INT4 weight\-only GEMV and mixed sparsity to enhance matrix acceleration efficiency\. Moreover, in business, we employed a hierarchical clustering algorithm\(Tayet al\.,[2022](https://arxiv.org/html/2605.11582#bib.bib4)\)to construct plaintext data into a semantically structured prefix tree\. By dynamically evaluating the time difference between generating and verifying remaining tokens, we identify the optimal point for launching prefix tree\-based parallel verification\. This approach enables decoding the entire remaining sequence length in a single step, which can reduce decoding step and accelerate model inference\.

Contribution\. The main contributions of our paper are summarized as follows:

- •We optimized Compressed Sparse Row \(CSR\) by proposing an index\-compressed 2bit\-CSR which is used for mixed sparsity, reducing the size of the index and weights to 30% of the original CSR size before optimization\.
- •We independently developed a custom SparseGemv acceleration kernel supporting INT4 with sparse matrix multiplication, filling the gap left by NVIDIA’s sparse acceleration libraries \(cuSparse/cuSparseLT\) for efficient GEMV operations\.
- •We innovatively proposed adaptive grouping quantization, enhancing the flexibility and precision of the quantization process\.
- •We are, to our knowledge, the first to propose a complete workflow combining prefix tree\-constrained decoding with beam search\(Wiseman and Rush,[2016](https://arxiv.org/html/2605.11582#bib.bib5)\), applying it to the generative task in advertising targeting scenarios\.
- •Extensive experimental data demonstrates that our optimization achieved an improvement of over 78% in inference speed\. The proposed system has been deployed in Baidu’s advertising platform, serving real\-time traffic at scale\.

## 2\.Related Work

### 2\.1\.LLM in Recommendation System

The integration of Large Language Models \(LLMs\) into recommendation systems has emerged as a promising research direction\. Current research primarily encompasses several key areas: \(1\) feature engineering and representation learning, where LLMs are leveraged to generate rich semantic embeddings\(Zhanget al\.,[2024b](https://arxiv.org/html/2605.11582#bib.bib23); Genget al\.,[2022](https://arxiv.org/html/2605.11582#bib.bib24)\); \(2\) ranking optimization, where LLMs improve result ordering accuracy\(Zhang and Wang,[2023](https://arxiv.org/html/2605.11582#bib.bib20); Liaoet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib12); Luoet al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib21); Linet al\.,[2024b](https://arxiv.org/html/2605.11582#bib.bib22)\); and \(3\) user interaction enhancement, focusing on natural language interfaces and dialogue\-based recommendations\(Baoet al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib13); Junget al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib16)\)\. A parallel advancement involves the adoption of generative recommendation\(Kang and McAuley,[2018](https://arxiv.org/html/2605.11582#bib.bib9); Petrov and Macdonald,[2023](https://arxiv.org/html/2605.11582#bib.bib11)\), particularly the self\-attention mechanisms\. Notable work by\(Zhaiet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib17)\)demonstrates that unified generative recommendation models have achieved breakthrough performance, surpassing traditional hierarchical deep recommendation systems\. Furthermore, recent research has proposed efficient scaling solutions\(Zhanget al\.,[2024a](https://arxiv.org/html/2605.11582#bib.bib25)\)for traditional search and recommendation models\. However, despite these advances, current approaches struggle with high computational costs and latency, making them impractical for online inference scenarios with strict response time requirements\. This necessitates new methods that balance performance and efficiency\.

### 2\.2\.LLM Inference Acceleration

Recent advances in LLM inference acceleration have primarily focused on two orthogonal complementary approaches: model compression techniques and decoding optimization strategies\.

Model Compression\.Quantization and sparsity have emerged as a fundamental methodology for reducing model size\. Seminal works including\(Frantaret al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib26); Linet al\.,[2024a](https://arxiv.org/html/2605.11582#bib.bib29)\), and their derivatives\(Leeet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib27); Shaoet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib28)\)have established robust 4\-bit quantization baselines\. Nevertheless, these methods predominantly employ pre\-determined grouping strategies, which easily overlook the intrinsic heterogeneity in weight sensitivity distributions\. In parallel, sparsity research has evolved from unstructured pruning to hardware\-aware semi\-structured paradigms\. SparseGPT\(Frantar and Alistarh,[2023](https://arxiv.org/html/2605.11582#bib.bib32)\)and Wanda\(Sunet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib3)\)achieve sparse pruning, also show promise in reducing parameters while maintaining model quality\. However, SparseGPT\(Frantar and Alistarh,[2023](https://arxiv.org/html/2605.11582#bib.bib32)\)is limited by its layer\-wise loss optimization and reliance on second\-order derivatives, which constrain parameter adjustments\. Retraining\-based methods offer a broader optimization space, enabling better global performance\.

Speculative Decoding\.Speculative decoding accelerates autoregressive decoding by enabling parallel verification of candidate tokens, as proposed by\(Leviathanet al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib30); Chenet al\.,[2023](https://arxiv.org/html/2605.11582#bib.bib31)\)\. Innovations like Medusa\(Caiet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib7)\)and SpecInfer\(Miaoet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib6)\)utilize tree\-structured attention for parallel prediction\. However, existing methods apply parallel decoding uniformly, which can be inefficient\. We introduce dynamic parallelism initiation, transitioning strategically from sequential to parallel decoding based on confidence and computational cost, optimizing both response time and accuracy for industrial recommendation systems\.

## 3\.Solution

### 3\.1\.Overview

The system consists of two primary components:Model CompressionandPrefix Tree Parallel Verification, designed to optimize efficiency and accuracy in generative targeting tasks\.

Model Compression\.It focuses on reducing model size and computational overhead without sacrificing precision\. It includes Group\-wise Adaptive Quantization, which, based on parameter sensitivity, groups the layers of the model into sensitive layers and non\-sensitive layers, with fine\-grained \(more groups\) quantization for sensitive groups and coarse\-grained \(fewer groups\) quantization for non\-sensitive groups\. The Layer Adaptive Sparsification component prunes redundant parameters across different layers based on their relative importance, applying varying ratios to ensure that critical layers retain more information while less significant layers are pruned more aggressively\. These compression techniques are seamlessly integrated with the kernel for optimized execution\.

Prefix Tree Parallel Verification\.is responsible for efficient and accurate token prediction\. The process begins with Prefix Tree Construction, where hierarchical clustering\(Tayet al\.,[2022](https://arxiv.org/html/2605.11582#bib.bib4)\)transforms plain text into a structured prefix tree \(trie\), the trie structure is wide at the top and narrow at the bottom, with fewer candidate results as one goes deeper\. The Parallel Verification Trigger dynamically evaluates and identifies optimal trigger points for verification, ensuring a balance between processing speed and accuracy\. Finally, Tree\-Based Parallel Verification reconstructs the prefix tree for sequence generation, utilizing parallel decoding to accelerate results while preserving precision\.

### 3\.2\.Model Compression

Adaptive Group\-Wise Quantization\.To enhance the flexibility and precision of the quantization process, we propose an adaptive group\-wise method that tailors the quantization strategy to the sensitivity of individual linear layers\. Drawing inspiration from the weight sensitivity analytical solution of the near\-lossless methods\(Dettmerset al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib2)\), we further integrated its measurement strategy into our approach as analytical standard\. Therefore, channels in the layer which identified as sensitive are allocated more groups to achieve finer quantization granularity, minimizing quantization errors\. Conversely, non\-sensitive channels, which exhibit robustness to quantization\-induced changes, are assigned fewer groups, reducing computational overhead without sacrificing accuracy\.

Sparsification\.To further improve the inference efficiency while not compromising the precision, we propose a layer\-wise adaptiveN:MN:Mpruning strategy\. Based on semi\-structured sparsity\(Frantar and Alistarh,[2023](https://arxiv.org/html/2605.11582#bib.bib32)\), we incorporate the importance\-based weight selection\. In essence, this approach enables layers to be pruned at varying degrees of sparsity, with more critical layers retaining a higher density \(2:4\) and less critical layers exhibiting greater sparsity \(1:4\), as shown in Fig\.[1](https://arxiv.org/html/2605.11582#S3.F1)\.

![Refer to caption](https://arxiv.org/html/2605.11582v1/figures/layer_importance.png)Figure 1\.Transformer Layer ImportanceBuilding upon the pruning criterion established in WandA\(Sunet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib3)\), we propose a refined methodology to quantify the importance of individual elements in the weight matrix\. Let𝐰0∈ℝd\\mathbf\{w\}\_\{0\}\\in\\mathbb\{R\}^\{d\}denote the dense weight vector prior to sparsification, and𝐰=𝐰0\+δ​𝐰\\mathbf\{w\}=\\mathbf\{w\}\_\{0\}\+\\delta\\mathbf\{w\}represent its perturbed counterpart after pruning\. The approximation error induced by the sparsification operation can be derived through a second\-order Taylor expansion:

\(1\)δ​E=E​\(𝐰\)−E​\(𝐰0\)=\(∂E∂𝐰\)⊤​δ​𝐰\+12​δ​𝐰⊤​𝐇​δ​𝐰\+O​\(‖δ​𝐰‖3\)\\delta E=E\(\\mathbf\{w\}\)\-E\(\\mathbf\{w\}\_\{0\}\)=\\left\(\\frac\{\\partial E\}\{\\partial\\mathbf\{w\}\}\\right\)^\{\\top\}\\delta\\mathbf\{w\}\+\\frac\{1\}\{2\}\\delta\\mathbf\{w\}^\{\\top\}\\mathbf\{H\}\\delta\\mathbf\{w\}\+O\(\\\|\\delta\\mathbf\{w\}\\\|^\{3\}\)where𝐇=∂2E∂𝐰2\\mathbf\{H\}=\\frac\{\\partial^\{2\}E\}\{\\partial\\mathbf\{w\}^\{2\}\}is the Hessian matrix\. The primal optimization objective is to find a set of weight elements to minimize the induced approximation error\. Under the assumption of element\-wise independence and ignoring higher\-order terms, we formulate the Lagrangian constrained optimization problem: For an individual weight elementwqw\_\{q\}\(satisfyingwq\+δ​wq=0w\_\{q\}\+\\delta w\_\{q\}=0\), the error term will be:

\(2\)\(wq⋅‖𝐱q‖2\)2\+wq⋅\|∂E∂wq\|\\left\(w\_\{q\}\\cdot\\\|\\mathbf\{x\}\_\{q\}\\\|\_\{2\}\\right\)^\{2\}\+w\_\{q\}\\cdot\\left\|\\frac\{\\partial E\}\{\\partial w\_\{q\}\}\\right\|where𝐱q\\mathbf\{x\}\_\{q\}represents the part of the input activation that will operate withwqw\_\{q\}andEEdenotes the loss function\. Thus, the criterion for any element𝐖i​j\\mathbf\{W\}\_\{ij\}in the given weight matrix𝐖\\mathbf\{W\}becomes:

\(3\)\|𝐖i​j\|⋅‖𝐗j‖2\+\|𝐖i​j\|⋅\|∂E∂𝐖i​j\|\|\\mathbf\{W\}\_\{ij\}\|\\cdot\\\|\\mathbf\{X\}\_\{j\}\\\|\_\{2\}\+\|\\mathbf\{W\}\_\{ij\}\|\\cdot\\left\|\\frac\{\\partial E\}\{\\partial\\mathbf\{W\}\_\{ij\}\}\\right\|

### 3\.3\.Revised Kernel

Semi\-structured sparse matrices necessitate supplementary index data, which inherently lead to extra bandwidth consumption and computational burden\. Thus, we have mainly focused on tackling these pivotal challenges, accommodating the real\-world scenarios\. Based on our previous generation of Gemv \(General Matrix\-Vector Multiply\) technology, we have systematically refined the technology, culminating in the development of a more efficient variant—SparseGemv\.

Sparse Index Structure\.Drawing inspiration from the traditional matrix compression method, CSR, we devised an advanced data structure to further condense index information, minimizing the additional overhead of the memory bandwidth\. Given a weight matrix, we extract its non\-zero elements and record their column positions in a compact index format\. Then we reordered the indices and converted them into binary representations sequentially\. Finally, the binary indices are grouped and encoded into a compact format, such as hexadecimal, to significantly compress parameters and accelerate copying\.

Computational Acceleration\.Based on the aforementioned index storage structure, we implemented a sparse matrix multiplication kernel \(SparseGemv\) to accelerate computations involving sparse matrices\. The objectives are two folds:

- •Accelerate Memory Access: First, Shared Memory \(SharedMem\) was employed to tackle performance degradation caused by dynamic access\. Activations, originally stored in Local Memory due to runtime\-determined indices, were moved to Shared Memory to improve performance\. However, direct loading of activations caused bank conflicts\. To resolve this, a shuffle\-based data layout was implemented, which reassigned threads to non\-conflicting memory banks by staggering intervals, eliminating conflicts and enabling efficient memory operations\. Additionally, block\-level data sharing was introduced to enhance parallelism\. Multiple warps collaboratively loaded activations from High\-Bandwidth Memory \(HBM\) into Shared Memory, improving data transfer efficiency\.
- •Reduce Computational Burden: For computation optimization, we proposed two methodologies: assembly instruction selection and index utilization\. By utilizing thel​o​p​3\.b​32lop3\.b32assembly instruction for INT4\-to\-FP16 weight dequantization, the required instructions were reduced significantly, improving efficiency\. Meanwhile, the Compressed Sparse Row \(CSR\) indexing method was optimized to reduce storage overhead while maintaining retrieval efficiency\. Sparse indices were packed intou​i​n​t​16tuint16\_\{t\}variables, and reverse\-order storage with bit operation accelerates index calculation, ensuring compactness and fast access\.

### 3\.4\.Tree\-based Parallel Verification

In business scenarios, we explored unique data pattern in generative targeting, devising efficient organization strategies to accelerate inference for specific business needs\. To achieve this, we have built three core components within our workflow:Prefix Tree Construction,Parallel Verification Trigger,Tree\-Based Verification\.

Hierarchical Clustering for Prefix Tree Construction\.This module aims to transform plain text into structured IDs and subsequently used to build a prefix tree that is structurally designed to be broad at the top and narrow at the bottom, which can cater to facilitating efficient decoding and verification\. To achieve this objective, we initially collect all the advertiser\-specific plaintext identifiers \(*e\.g\.*, commercial entities like "Taobao" or "Baidu"\) as transformation inputs\. Subsequently, we adapt the Differentiable Search Index\(DSI\) algorithm\(Tayet al\.,[2022](https://arxiv.org/html/2605.11582#bib.bib4)\)\. Originally, the semantically structured identifiers are resolved by making the target corpus intokkclusters recursively, aligning with the intention to capture more information and effectively reduce search space after each decoding step\. Similarly, we implemented this hierarchical clustering process during the trie construction\. We treat the plain\-text as corpus in the DSI model, with hyper parameters denoting the clusters category number and recursive demarcation, we can then ensure the precondition of validation is met\.

Parallel Verification Trigger\.During the process, it is vital for us to decide when to trigger the parallel verification\. Intuitively, the switch starts when the predicted benefit is maximized\. Exhaustive experimental results reveal the overhead of prefix tree parallel verification scales linearly with the length of candidate results, while the time required for a single autoregressive step remains approximately constant on the same hardware and model\. This leads to our proposed solution: the trigger moment is dynamically determined based on the time difference between generating the remaining tokens and verifying them\. It demonstrates that the system calculates the trade\-off between the overhead and benefit of parallel verification in real\-time during the inference process\. Parallel prefix tree verification is triggered when the predicted benefit is maximized, ensuring efficient utilization of computational resources while maintaining accuracy\.

Tree\-Based Parallel Verification\.The tree\-based parallel verification process was inspired by the speculative decoding ideas\(Miaoet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib6)\)\. This method is a three\-stage workflow involving restructuring the tree to construct input sequences, decoding them with tree\-based constraints, and performing beam search to select optimal sequences The decoding process leverages a trie and begins with a depth\-first search \(DFS\) to construct input sequences and a tree mask\(Caiet al\.,[2024](https://arxiv.org/html/2605.11582#bib.bib7)\), ensuring only valid paths are considered\. Padding handles varying sequence lengths due to beam search\. These sequences are processed in parallel by the decoder, which outputs a probability distributionTs​c​o​r​eT\_\{score\}for each position\. Using the trie,Ts​c​o​r​eT\_\{score\}is filtered to retain valid token scores, which are combined with parent node scores via logarithmic summation to compute node scoresBs​c​o​r​eB\_\{score\}\. Beam search\(Wiseman and Rush,[2016](https://arxiv.org/html/2605.11582#bib.bib5)\)selects the top sequences based onBs​c​o​r​eB\_\{score\}\. At the final position, the highest\-scoring nodes \(up tob​e​a​ms​i​z​ebeam\_\{size\}\) are traced back to reconstruct valid sequences\. This approach ensures efficient and accurate decoding by applying structural constraints from the prefix tree while accelerating the process\.

## 4\.Experiments

In this section, we select ERNIE 1\.5B as our backbone model to evaluate our framework on two real\-world scenarios: ad creative generation and targeted advertising\. All experiments are implemented using PaddlePaddle\. For ad creative generation, experiments are conducted on an NVIDIA A10 GPU with a beam size of 1, while targeted advertising utilizes an NVIDIA A30 GPU with a beam size of 20, because more advertising candidates need to be selected\.

### 4\.1\.Results of Targeted Advertising

To evaluate the efficiency of our optimization techniques, we conducted a series of experiments comparing different configurations of our framework\. For datasets, we utilized a proprietary dataset consisting of internal commercial traffic data collected by our company\. Due to its sensitive nature, the dataset is not publicly available\. For advertising evaluation metrics, we use latency and recall to assess the trade\-off between inference acceleration and precision sacrifice\. As shown in Fig\.[2](https://arxiv.org/html/2605.11582#S4.F2), our individual techniques demonstrate notable improvements in performance, their combination ensures both significant speedup and acceptable recall levels, making the complete framework well\-suited for practical online deployment\.

![Refer to caption](https://arxiv.org/html/2605.11582v1/figures/targeted_ad_2.png)

TechniqueAVG Len\.RECALLBaseline \(FP16\)60\.084Quantization60\.083Sparse \+ Quant60\.083Sparse \+ Quant \+ PTPV60\.081

Figure 2\.Comparison on Targeted Advertising Scenario\.
### 4\.2\.Results of Ads Creative Generation

The assessment of the ad creative generation focus primarily on performance with creative rewriting and keyword summarization\. We useCSL\(Liet al\.,[2022](https://arxiv.org/html/2605.11582#bib.bib33)\)as the dataset, which contains metadata from 396,209 core Chinese academic journal articles published between 2010 and 2020\. As demonstrated in Fig\.[3](https://arxiv.org/html/2605.11582#S4.F3), the baseline established the quality upper bound, while sparsification and quantization induce marginal decreases in accuracy yet yield significant efficiency gains\. Notably, the hybrid approach achieves the best trade\-off between efficiency and quality, making it operationally viable for practical deployments in real\-world applications\.

![Refer to caption](https://arxiv.org/html/2605.11582v1/figures/creative_generation_1.png)

TechniqueAVG Len\.MeteorBLEUBaseline \(FP16\)17\.50\.63450\.4247Quantization17\.60\.62830\.4178Sparse \+ Quant17\.50\.61270\.4038

Figure 3\.Comparison on Ads Creative Generation Scenario
### 4\.3\.Ablation Studies

To evaluate the effectiveness of the optimization techniques in ernie 1\.5B, we conduct an ablation study by progressively integrating different components\. INT4 adaptive group quantization and layer\-adaptive hierarchical sparsification are analyzed in terms of per\-token latency with BLEU and Meteor scores\. As shown in Table[1](https://arxiv.org/html/2605.11582#S4.T1), quantization significantly reduces latency while maintaining high BLEU and Meteor scores, demonstrating its effectiveness in preserving generation quality\. In contrast, sparsification yielded only moderate efficiency gains\. Conservative sparsification approaches\(2:42:4\) show limited efficiency improvements, while aggressive sparsification \(1:41:4\) delivers dramatic speedups at the cost of noticeable quality degradation\. This suggests that a trade\-off exists between the degree of sparsification and output quality, with an optimal balance likely achieved through a compromise between 2:4 and 1:4 configurations\. The findings are particularly relevant for production environments\. Our data\-driven sparsification strategy is specifically engineered for commercial models’ parameter distributions, with targeted optimization for high\-frequency, business\-critical features as elaborated in Sec\.[3](https://arxiv.org/html/2605.11582#S3)\. While generalized applications warrant further investigation, this tailored methodology demonstrates superior performance in industrial deployments where practical constraints are paramount\.

Table 1\.Ablation studies of quantization and sparsification

## 5\.Conclusion

This study presents the Efficient Generative Targeting framework, an innovative solution to the generative targeting problem in search advertising, optimizing inference efficiency without sacrificing precision\. We address this challenge with two key strategies: model compression and prefix tree parallel verification\. Our extensive experiments show that Efficient Generative Targeting outperforms previous LLM\-based advertising systems in real\-time delivery settings, demonstrating its effectiveness and potential for practical deployment in dynamic advertising environments\. However, the framework’s current design is primarily suited for commercial advertising targeting scenarios, as its optimization strategies \(quantization, sparsification, and business\-oriented improvements\) are tailored to the unique requirements of this domain\. Applications in other contexts may require further adaptation to address differences in data patterns, objectives, and constraints\. Future research will focus on integrating adaptive algorithms and reinforcement learning to further enhance efficiency, scalability, and adaptability, aiming to refine the balance between optimization and user experience in modern advertising\.

## References

- K\. Bao, J\. Zhang, Y\. Zhang, W\. Wang, F\. Feng, and X\. He \(2023\)TALLRec: an effective and efficient tuning framework to align large language model with recommendation\.InRecSys,pp\. 1007–1014\.Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p3.1),[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- T\. Cai, Y\. Li, Z\. Geng, H\. Peng, J\. D\. Lee, D\. Chen, and T\. Dao \(2024\)Medusa: simple LLM inference acceleration framework with multiple decoding heads\.InICML,Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p3.1),[§3\.4](https://arxiv.org/html/2605.11582#S3.SS4.p4.5)\.
- C\. Chen, S\. Borgeaud, G\. Irving, J\. Lespiau, L\. Sifre, and J\. Jumper \(2023\)Accelerating large language model decoding with speculative sampling\.CoRRabs/2302\.01318\.Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p3.1)\.
- T\. Dettmers, R\. Svirschevski, V\. Egiazarian, D\. Kuznedelev, E\. Frantar, S\. Ashkboos, A\. Borzunov, T\. Hoefler, and D\. Alistarh \(2024\)SpQR: A sparse\-quantized representation for near\-lossless LLM weight compression\.InICLR,Cited by:[§3\.2](https://arxiv.org/html/2605.11582#S3.SS2.p1.1)\.
- E\. Frantar and D\. Alistarh \(2023\)SparseGPT: massive language models can be accurately pruned in one\-shot\.InICML,Vol\.202,pp\. 10323–10337\.Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p2.1),[§3\.2](https://arxiv.org/html/2605.11582#S3.SS2.p2.1)\.
- E\. Frantar, S\. Ashkboos, T\. Hoefler, and D\. Alistarh \(2023\)GPTQ: accurate post\-training quantization for generative pre\-trained transformers\.InICLR,Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p2.1)\.
- S\. Geng, S\. Liu, Z\. Fu, Y\. Ge, and Y\. Zhang \(2022\)Recommendation as language processing \(RLP\): A unified pretrain, personalized prompt & predict paradigm \(P5\)\.InRecSys,pp\. 299–315\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- Y\. Jung, E\. Jung, and L\. Chen \(2023\)Towards a unified conversational recommendation system: multi\-task learning via contextualized knowledge distillation\.InEMNLP,pp\. 13625–13637\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- W\. Kang and J\. J\. McAuley \(2018\)Self\-attentive sequential recommendation\.InICDM,pp\. 197–206\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- C\. Lee, J\. Jin, T\. Kim, H\. Kim, and E\. Park \(2024\)OWQ: outlier\-aware weight quantization for efficient fine\-tuning and inference of large language models\.InAAAI,pp\. 13355–13364\.Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p2.1)\.
- Y\. Leviathan, M\. Kalman, and Y\. Matias \(2023\)Fast inference from transformers via speculative decoding\.InICML,Vol\.202,pp\. 19274–19286\.Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p3.1)\.
- Y\. Li, Y\. Zhang, Z\. Zhao, L\. Shen, W\. Liu, W\. Mao, and H\. Zhang \(2022\)CSL: a large\-scale Chinese scientific literature dataset\.InICCL,pp\. 3917–3923\.Cited by:[§4\.2](https://arxiv.org/html/2605.11582#S4.SS2.p1.1.1)\.
- J\. Liao, S\. Li, Z\. Yang, J\. Wu, Y\. Yuan, X\. Wang, and X\. He \(2024\)LLaRA: large language\-recommendation assistant\.InSIGIR,pp\. 1785–1795\.Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p3.1),[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- J\. Lin, J\. Tang, H\. Tang, S\. Yang, W\. Chen, W\. Wang, G\. Xiao, X\. Dang, C\. Gan, and S\. Han \(2024a\)AWQ: activation\-aware weight quantization for on\-device LLM compression and acceleration\.InMLSys,Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p2.1)\.
- J\. Lin, R\. Shan, C\. Zhu, K\. Du, B\. Chen, S\. Quan, R\. Tang, Y\. Yu, and W\. Zhang \(2024b\)ReLLa: retrieval\-enhanced large language models for lifelong sequential behavior comprehension in recommendation\.InWWW,pp\. 3497–3508\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- S\. Luo, B\. He, H\. Zhao, Y\. Huang, A\. Zhou, Z\. Li, Y\. Xiao, M\. Zhan, and L\. Song \(2023\)RecRanker: instruction tuning large language model as ranker for top\-k recommendation\.CoRRabs/2312\.16018\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- X\. Miao, G\. Oliaro, Z\. Zhang, X\. Cheng, Z\. Wang, Z\. Zhang, R\. Y\. Y\. Wong, A\. Zhu, L\. Yang, X\. Shi, C\. Shi, Z\. Chen, D\. Arfeen, R\. Abhyankar, and Z\. Jia \(2024\)SpecInfer: accelerating large language model serving with tree\-based speculative inference and verification\.InProceedings of the 29th ASPLOS,pp\. 932–949\.Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p3.1),[§3\.4](https://arxiv.org/html/2605.11582#S3.SS4.p4.5)\.
- A\. V\. Petrov and C\. Macdonald \(2023\)Generative sequential recommendation with gptrec\.CoRRabs/2306\.11114\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- W\. Shao, M\. Chen, Z\. Zhang, P\. Xu, L\. Zhao, Z\. Li, K\. Zhang, P\. Gao, Y\. Qiao, and P\. Luo \(2024\)OmniQuant: omnidirectionally calibrated quantization for large language models\.InICLR,Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p2.1)\.
- M\. Sun, Z\. Liu, A\. Bair, and J\. Z\. Kolter \(2024\)A simple and effective pruning approach for large language models\.InICLR,Cited by:[§2\.2](https://arxiv.org/html/2605.11582#S2.SS2.p2.1),[§3\.2](https://arxiv.org/html/2605.11582#S3.SS2.p3.2)\.
- Y\. Tay, V\. Tran, M\. Dehghani, J\. Ni, D\. Bahri, H\. Mehta, Z\. Qin, K\. Hui, Z\. Zhao, J\. P\. Gupta, T\. Schuster, W\. W\. Cohen, and D\. Metzler \(2022\)Transformer memory as a differentiable search index\.InNeural Information Processing Systems,Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p4.1),[§3\.1](https://arxiv.org/html/2605.11582#S3.SS1.p3.1),[§3\.4](https://arxiv.org/html/2605.11582#S3.SS4.p2.1)\.
- L\. Wang and E\. Lim \(2023\)Zero\-shot next\-item recommendation using large pretrained language models\.CoRRabs/2304\.03153\.External Links:2304\.03153Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p1.1)\.
- X\. Wang, L\. Wu, L\. Hong, H\. Liu, and Y\. Fu \(2024\)LLM\-enhanced user\-item interactions: leveraging edge information for optimized recommendations\.CoRRabs/2402\.09617\.Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p3.1)\.
- W\. Wei, X\. Ren, J\. Tang, Q\. Wang, L\. Su, S\. Cheng, J\. Wang, D\. Yin, and C\. Huang \(2024\)LLMRec: large language models with graph augmentation for recommendation\.InWSDM,pp\. 806–815\.Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p3.1)\.
- S\. Wiseman and A\. M\. Rush \(2016\)Sequence\-to\-sequence learning as beam\-search optimization\.InEMNLP,pp\. 1296–1306\.Cited by:[4th item](https://arxiv.org/html/2605.11582#S1.I1.i4.p1.1),[§3\.4](https://arxiv.org/html/2605.11582#S3.SS4.p4.5)\.
- Z\. Yang, J\. Wu, Y\. Luo, J\. Zhang, Y\. Yuan, A\. Zhang, X\. Wang, and X\. He \(2023\)Large language model can interpret latent space of sequential recommender\.CoRRabs/2310\.20487\.Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p3.1)\.
- J\. Zhai, L\. Liao, X\. Liu, Y\. Wang, R\. Li, X\. Cao, L\. Gao, Z\. Gong, F\. Gu, J\. He, Y\. Lu, and Y\. Shi \(2024\)Actions speak louder than words: trillion\-parameter sequential transducers for generative recommendations\.InICML,Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p1.1),[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- B\. Zhang, L\. Luo, Y\. Chen, J\. Nie, X\. Liu, S\. Li, Y\. Zhao, Y\. Hao, Y\. Yao, E\. D\. Wen, J\. Park, M\. Naumov, and W\. Chen \(2024a\)Wukong: towards a scaling law for large\-scale recommendation\.InICML,Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- C\. Zhang, S\. Wu, H\. Zhang, T\. Xu, Y\. Gao, Y\. Hu, and E\. Chen \(2024b\)NoteLLM: A retrievable large language model for note recommendation\.InWWW,pp\. 170–179\.Cited by:[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.
- Z\. Zhang and B\. Wang \(2023\)Prompt learning for news recommendation\.InSIGIR,pp\. 227–237\.Cited by:[§1](https://arxiv.org/html/2605.11582#S1.p3.1),[§2\.1](https://arxiv.org/html/2605.11582#S2.SS1.p1.1)\.

Similar Articles

LLM-as-a-Verifier: A General-Purpose Verification Framework

Hugging Face Daily Papers

LLM-as-a-Verifier introduces a probabilistic verification framework that computes continuous scores from LLM logits, scaling across granularity, repeated evaluation, and criteria decomposition. It achieves state-of-the-art results on multiple agentic benchmarks and provides dense feedback for RL.

Efficient On-Device Diffusion LLM Inference with Mobile NPU

arXiv cs.LG

This paper presents llada.cpp, an NPU-aware inference framework for accelerating diffusion large language models (dLLMs) on smartphones. It introduces three techniques—Multi-Block Speculative Decoding, Dual-Path Progressive Revision, and Swap-Optimized Memory Runtime—to align dLLM inference with mobile NPU characteristics, achieving 17-42x latency reduction over CPU baseline.