Enhancing Learned Knowledge in LoRA Adapters Through Efficient Contrastive Decoding on Ascend NPUs
Not on the map. Why?
Abstract (arXiv)
Huawei Cloud users leverage LoRA (Low-Rank Adaptation) as an efficient and scalable method to fine-tune and customize large language models (LLMs) for application-specific needs. However, tasks that require complex reasoning or deep contextual understanding are often hindered by biases or interference from the base model when using typical decoding methods like greedy or beam search. These biases can lead to generic or task-agnostic responses from the base model instead of leveraging the LoRA-specific adaptations. In this paper, we introduce Contrastive LoRA Decoding (CoLD), a novel decoding framework designed to maximize the use of task-specific knowledge in LoRA-adapted models, resulting in better downstream performance. CoLD uses contrastive decoding by scoring candidate tokens based on the divergence between the probability distributions of a LoRA-adapted expert model and the corresponding base model. This approach prioritizes tokens that better align with the LoRA's learned representations, enhancing performance for specialized tasks. While effective, a naive implementation of CoLD is computationally expensive because each decoding step requires evaluating multiple token candidates across both models. To address this, we developed an optimized kernel for Huawei's Ascend NPU. CoLD achieves up to a 5.54% increase in task accuracy while reducing end-to-end latency by 28% compared to greedy decoding. This work provides practical and efficient decoding strategies for fine-tuned LLMs in resource-constrained environments and has broad implications for applied data science in both cloud and on-premises settings.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 24 of its 35 references that are in the map. First posted on arXiv 20 May 2025.
Builds on
24 of 35 references.
References · 24
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,777
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2019The Curious Case of Neural Text Degenerationcited by 2,916
- 2021BitFit: Simple Parameter-efficient Fine-tuning for Transformer-based Masked Language-modelscited by 1,245
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 1,006
- 2016Abstractive Text Summarization Using Sequence-to-Sequence RNNs and Beyondcited by 812
- 2022Contrastive Decoding: Open-ended Text Generation as Optimizationcited by 609
- 2020AdapterHub: A Framework for Adapting Transformerscited by 444
- 2024LoRA+: Efficient Low Rank Adaptation of Large Modelscited by 377
- 2023S-LoRA: Serving Thousands of Concurrent LoRA Adapterscited by 152
12 more
- 2024A Thorough Examination of Decoding Methods in the Era of LLMscited by 114
- 2023AdapterSoup: Weight Averaging to Improve Generalization of Pretrained Language Modelscited by 84
- 2023Punica: Multi-Tenant LoRA Servingcited by 83
- 2019Comparison of Diverse Decoding Methods from Conditional Language Modelscited by 78
- 2024RareBench: Can LLMs Serve as Rare Diseases Specialists?cited by 45
- 2019ViGGO: A Video Game Corpus for Data-To-Text Generation in Open-Domain Conversationcited by 31
- 2024Adaptive Contrastive Search: Uncertainty-Guided Decoding for Open-Ended Text Generationcited by 27
- 2024Improving Open-Ended Text Generation via Adaptive Decodingcited by 21
- 2024Enhancing Recommendation Diversity by Re-ranking with Large Language Modelscited by 19
- 2024Distillation Contrastive Decoding: Improving LLMs Reasoning with Contrastive Decoding and Distillationcited by 16
- 2024Know Your Needs Better: Towards Structured Understanding of Marketer Demands with Analogical Reasoning Augmented LLMscited by 2
- 2024Xinyu: An Efficient LLM-based System for Commentary Generationcited by 2
Built on by
Not cited yet.