SafeStart:缓解MoE大语言模型服务中主动精简专家被忽视的安全代价
SafeStart: Mitigating the Overlooked Safety Cost of Active Expert Reduction in MoE LLM Serving
AI总结:
针对MoE大语言模型服务中主动精简专家会削弱安全的问题,提出SafeStart在响应初始阶段运行所有专家、后续运行精简专家,可保留大部分速度增益并大幅降低有害请求响应率。
摘要:
混合专家(MoE)语言模型会将每个token送入众多专家子网络中的少数几个。服务方法通过让每个token运行更少的专家来提升这些模型的速度,且仅在准确率基准上进行验证。我们发现这些方法会削弱模型对有害请求的拒绝能力,并提出SafeStart,该方法可在保留大部分加速效果的同时大幅恢复拒绝能力。在vLLM框架及一块RTX A6000显卡上,保留约三分之二的选定专家时,批量大小为8的离线解码速度可提升15%至28%。我们发现,在该设置下,当存在要求模型不得拒绝的越狱提示时,Qwen1.5-MoE、OLMoE、DeepSeek-V2-Lite这9个模型中仅3个的有害请求响应占比显著上升,分别上升18.4个百分点、9.5个百分点、6.6个百分点,而MMLU准确率下降不足2个百分点。我们还发现,这种上升大多出现在模型处理提示词并生成前几个token的阶段。因此SafeStart会在处理提示词及生成的前8个token时运行所有专家,之后则运行精简后的专家集合,并通过vLLM中的融合内核实现。在移除部分专家后,SafeStart在批量大小为8和32时可保留至少85%的离线解码加速效果,且在这三个模型的三种专家精简方法下,该越狱提示导致的有害请求响应变化被控制在-2.1至+1.3个百分点之间。在889个预留请求的分析中,截断操作会使有害请求合规性上升5.8至21.4个百分点,而SafeStart仅使其上升0.6至2.6个百分点,在三个模型中的两个上表现不劣于原始模型。我们的结果表明,更快的MoE服务无需以安全为代价:服务系统可通过在每个响应的初始阶段运行所有专家来保留精简专家带来的大部分增益,且在启用此类方法前应测试拒绝能力,而非仅测试准确率。
英文摘要:
Mixture-of-Experts (MoE) language models send each token through a few of many expert subnetworks. Serving methods make these models faster by running even fewer experts per token, and they are validated on accuracy benchmarks. We show that these methods can weaken the model's refusal of harmful requests, and we introduce SafeStart, which largely restores refusal while keeping most of the speedup. In vLLM on one RTX A6000, keeping about two thirds of the selected experts speeds up offline decoding by 15 to 28% at batch size 8. We find that, at this setting, under a jailbreak that tells the model not to refuse, the share of harmful requests that the model answers rises by 18.4 percentage points on Qwen1.5-MoE, 9.5 on OLMoE, and 6.6 on DeepSeek-V2-Lite, the three of nine models where it rises significantly, while MMLU accuracy drops by less than two points. We discover that most of this increase arises while the model processes the prompt and generates its first few tokens. SafeStart therefore runs all experts for the prompt and the first eight generated tokens, and the reduced set of experts afterwards, through a fused kernel in vLLM. With experts removed, SafeStart keeps at least 85% of the offline decode speedup at batch sizes 8 and 32 and brings the change under this jailbreak to between -2.1 and +1.3 points for three expert-reduction methods on these three models. On 889 held-out requests, in an analysis fixed before generation, truncation raises harmful compliance by 5.8 to 21.4 points, and SafeStart leaves a rise of 0.6 to 2.6 points, non-inferior to the original model on two of the three models. Our results show that faster MoE serving need not cost safety: a serving system can keep most of the gain from running fewer experts by running all of them at the start of each response, and it should test refusal, not only accuracy, before it enables such a method.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。