paper-with-me

Papers

Accelerating Direct Preference Optimization with Prefix Sharing

2024-10-27 · Franklin Wang, Sumanth Hegde

Offline paired preference optimization algorithms have become a popular approach for fine-tuning on preference data, outperforming traditional supervised fine-tuning in various tasks. However, traditional implementations often involve redundant computations, especially for tasks with long shared prompts. We introduce prefix sharing for preference tuning, a novel technique that processes chosen and rejected responses as one sequence with a shared prefix. To prevent cross-response contamination, we use a custom block-sparse attention mask. Our method achieves $1.1$-$1.5\times$ improvement in training throughput on popular DPO datasets, without any effect on convergence. When combined with sequence packing, we observe consistent $1.3$-$1.6\times$ speedups, benefiting even datasets with smaller sequence lengths. While we focus on Direct Preference Optimization (DPO), our approach is applicable to other paired preference tuning methods. By enhancing computational efficiency, our work contributes to making preference-based fine-tuning more accessible for a wider range of applications and model sizes. We open-source our code at https://github.com/frankxwang/dpo-prefix-sharing.

📄 PDF Abstract BibTeX arXiv:2410.20305

Code (1)

frankxwang/dpo-prefix-sharing 공식 구현 pytorch

Tasks

Computational Efficiency

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
Focus 설명 없음
DPO 설명 없음

Similar Papers 제목 키워드 기반

Towards Bridging the Reward-Generation Gap in Direct Alignment Algorithms

2025-06-11 · Zeguan Xiao, Yun Chen, Guanhua Chen

Direct Alignment Algorithms (DAAs), such as Direct Preference Optimization (DPO) and Simple Preference Optimization (SimPO), have emerged as efficient alternatives to Reinforcement Learning from Human Feedback (RLHF) alg…

TokenRatio: Principled Token-Level Preference Optimization via Ratio Matching

2026-05-12 · Truong Nguyen, Tien-Phat Nguyen, Linh Ngo Van, Duy Minh Ho Nguyen 외 arxiv

Direct Preference Optimization (DPO) is a widely used RL-free method for aligning language models from pairwise preferences, but it models preferences over full sequences even though generation is driven by per-token dec…

Instruction Following

PAT: Accelerating LLM Decoding via Prefix-Aware Attention with Resource Efficient Multi-Tile Kernel

2025-11-27 · Jinjun Yi, Zhixin Zhao, Yitao Hu, Ke Yan 외 arxiv

LLM serving is increasingly dominated by decode attention, which is a memory-bound operation due to massive KV cache loading from global memory. Meanwhile, real-world workloads exhibit substantial, hierarchical shared pr…

PrefixWall: Mitigating Prefix Caching Side Channels in Shared LLM Systems

2026-03-11 · Panagiotis Georgios Pennas, Konstantinos Papaioannou, Marco Guarnieri, Thaleia Dimitra Doudali arxiv

Large Language Models (LLMs) rely on optimizations like Automatic Prefix Caching (APC) to accelerate inference. APC works by reusing previously computed states for the beginning part of a request (prefix), when another r…

BlendServe: Optimizing Offline Inference for Auto-regressive Large Models with Resource-aware Batching

2024-11-25 · Yilong Zhao, Shuo Yang, Kan Zhu, Lianmin Zheng 외

Offline batch inference, which leverages the flexibility of request batching to achieve higher throughput and lower costs, is becoming more popular for latency-insensitive applications. Meanwhile, recent progress in mode…