Files
myWiki/concepts/dynamic-beam-serving.md

39 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Dynamic Beam Serving (DBS)"
created: 2026-06-28
updated: 2026-06-28
type: concept
tags: [generative-recommendation, serving-optimization, beam-search]
sources: [GR4AD]
---
# Dynamic Beam Serving (DBS)
Dynamic Beam ServingDBS是 [[GR4AD]] 提出的动态束搜索服务机制,通过自适应调整束宽度在效率与效果之间取得最优权衡。
## 组成
**1. Dynamic Beam WidthDBW**
固定束宽度在所有解码步骤中使用相同的 $B$ 是次优的。最终返回的候选数由最后一步的束宽决定,但总解码成本由早期步骤的束宽主导(它们控制传播到后续步骤的假设数)。
DBW 采用**渐进递增**的束宽调度:如将 $512\text{-}512\text{-}512$ 替换为 $128\text{-}256\text{-}512$。早期步骤使用较小束宽减少计算,后期步骤扩展到目标候选数。最终候选质量基本不受影响,但计算量大幅降低。
**2. Traffic-Aware Adaptive Beam SearchTABS**
推荐流量存在强峰谷周期。服务约束由峰值负载决定。TABS 根据瞬时流量调整总束宽规模:
$$B_t = B_{base} \cdot f(Q_t, C_{avail})$$
- **谷值期**$Q_t < Q_{threshold}$增大束宽利用闲置计算资源进行更广泛的假设探索
- **峰值期**维持基准束宽保证延迟和吞吐量在预算内
## 效果
GR4AD DBS 使 QPS 提升 20%同时在谷值期通过 60% 的束宽扩展提升收入峰值期保持稳定
## 参考
- [[GR4AD]]
- [[lazyar|LazyAR]]
- [[reco-result-cache|Recommendation Result Cache]]