The rapid scaling of Large Language Models (LLMs) has achieved remarkable performance, but it also leads to prohibitive memory costs. Existing parameter-efficient approaches such as pruning and quantization mainly compress pretrained models without enhancing architectural capacity, thereby hitting the representational ceiling of the base model. In this work, we propose VersatileFFN, a novel feed-forward network (FFN) that enables flexible reuse of parameters in both width and depth dimensions within a fixed parameter budget. Inspired by the dual-process theory of cognition, VersatileFFN comprises two adaptive pathways: a width-versatile path that generates a mixture of sub-experts from a single shared FFN, mimicking sparse expert routing without increasing parameters, and a depth-versatile path that recursively applies the same FFN to emulate deeper processing for complex tokens. A difficulty-aware gating dynamically balances the two pathways, steering "easy" tokens through the efficient width-wise route and allocating deeper iterative refinement to "hard" tokens. Crucially, both pathways reuse the same parameters, so all additional capacity comes from computation rather than memory. Experiments across diverse benchmarks and model scales demonstrate the effectiveness of the method. The code will be available at https://github.com/huawei-noah/noah-research/tree/master/VersatileFFN.


翻译:大型语言模型(LLMs)的快速扩展取得了显著性能,但也导致了高昂的内存成本。现有的参数高效方法(如剪枝和量化)主要压缩预训练模型而不增强架构能力,从而触及基础模型的表示上限。本文提出VersatileFFN,一种新颖的前馈网络(FFN),能够在固定参数预算内灵活复用宽度和深度维度的参数。受认知双过程理论启发,VersatileFFN包含两条自适应路径:宽度自适应路径从单个共享FFN生成混合子专家,模拟稀疏专家路由而不增加参数;深度自适应路径递归应用同一FFN以模拟对复杂标记的更深层处理。难度感知门控动态平衡两条路径,引导“简单”标记通过高效的宽度路径,并为“困难”标记分配更深层的迭代细化。关键的是,两条路径复用相同参数,因此所有额外能力均来自计算而非内存。跨多个基准和模型规模的实验证明了该方法的有效性。代码将在https://github.com/huawei-noah/noah-research/tree/master/VersatileFFN 提供。

0
下载
关闭预览

相关内容

【KDD2024】HiGPT:异构图语言模型
专知会员服务
19+阅读 · 2024年7月9日
【CVPR2024】ViewDiff: 3D一致的图像生成与文本到图像模型
专知会员服务
30+阅读 · 2024年3月10日
【NeurIPS2019】图变换网络:Graph Transformer Network
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
10+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员