引用huac · 2024-04
“It also feels similar to mixture of depths.”
觉得当前做法也像 mixture of depths:按 token 动态分配计算
Mixture-of-Depths:用 top-k 路由给每个 token 动态分配计算
传统 Transformer 把 FLOPs 均匀花在序列的每个位置上。论文让网络通过 top-k 路由,在每一层选出至多 k 个 token 参与自注意力和 MLP 计算,从而在总计算预算固定的前提下,沿序列和深度非均匀地花费 FLOPs;由于 k 事先给定,计算图是静态的、张量大小已知。训练出的模型在同等 FLOPs 和训练时间下与基线表现相当,但每次前向所需 FLOPs 更少,训练后采样时单步可快 50% 以上。
评论者在讨论按 token 动态分配计算、跳过部分层的做法时,把它作为相关工作提及。
“It also feels similar to mixture of depths.”
“See for example: Mixture-of-Depths”
“I'm kinda surprised that the mixture of depths paper didn't come up here. It approaches the other direction of sometimes dropping layers:”