BERTology视角下的大语言模型编排:基于令牌和层的选择性探针用于高效单次分类
A BERTology View of LLM Orchestrations: Token- and Layer-Selective Probes for Efficient Single-Pass Classification
AI总结:
本文提出基于BERTology方法的LLM编排框架,通过令牌和层选择性探针实现高效单次分类,提升安全性和情感分类性能,同时保持接近服务延迟并避免额外的VRAM和延迟成本。
摘要:
生产级大语言模型系统常依赖单独模型进行安全和其他分类密集步骤,导致延迟、VRAM占用和操作复杂性增加。我们改用已由服务LLM支付的计算资源:在隐藏状态上训练轻量级探针,并在生成所用的同一前向传递中预测标签。我们将分类视为对完整令牌-层隐藏状态张量的表示选择,而非固定令牌或固定层(如首个令牌logits或最终层池化)。为此,我们引入了两阶段聚合器,(i)汇总每个层内的令牌,(ii)聚合跨层汇总以形成单个分类表示。我们通过直接池化、一个100000参数的评分-注意力门和一个最多350000000个可训练参数的下cast多头自注意力(MHA)探针实例化此模板。在安全性和情感基准测试中,我们的探针优于仅logit重用(如MULI)并在与显著更大的任务特定基线竞争时表现相当,同时保持接近服务延迟并避免单独守护模型流水线的VRAM和延迟成本。在密集和混合专家架构(Llama-3.2-3B,GPT-OSS-20B,Qwen3-30B-A3B)上的多背骨实验确认这些发现超越单一模型家族。
英文摘要:
Production LLM systems often rely on separate models for safety and other classification-heavy steps, increasing latency, VRAM footprint, and operational complexity. We instead reuse computation already paid for by the serving LLM: we train lightweight probes on its hidden states and predict labels in the same forward pass used for generation. We frame classification as representation selection over the full token-layer hidden-state tensor, rather than committing to a fixed token or fixed layer (e.g., first-token logits or final-layer pooling). To implement this, we introduce a two-stage aggregator that (i) summarizes tokens within each layer and (ii) aggregates across layer summaries to form a single representation for classification. We instantiate this template with direct pooling, a 100K-parameter scoring-attention gate, and a downcast multi-head self-attention (MHA) probe with up to 35M trainable parameters. Across safety and sentiment benchmarks our probes improve over logit-only reuse (e.g., MULI) and are competitive with substantially larger task-specific baselines, while preserving near-serving latency and avoiding the VRAM and latency costs of a separate guard-model pipeline. Multi-backbone experiments on dense and mixture-of-experts architectures (Llama-3.2-3B, GPT-OSS-20B, Qwen3-30B-A3B) confirm that these findings generalize beyond a single model family.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。