Routing
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
调研方向
先阅读 issue 中展示的 router 的 forward 方法和链接的 noisy top-k 论文,然后追踪 moe_jitter_eps 如何影响 scores 和 expert selection。记录 input jitter 是否等同于 score noise;当 routing behavior 以及与论文的任何差异都得到清晰解释时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Is the router implemented the noisy top k routing suggested by the OUTRAGEOUSLY LARGE NEURAL NETWORKS:
THE SPARSELY-GATED MIXTURE-OF-EXPERTS LAYER paper?
In the router code you seem to apply the noise at the input of the router and not at the router scores like in the paper above:
def forward(self, x):
if self.training and self.args.moe_jitter_eps is not None:
x = x * self.jitter(x)
scores = self.layer(x.view(-1, x.shape[-1])).softmax(dim=-1)
expert_weights, expert_indices = self._top_k(scores)
if self.args.moe_normalize_expert_weights:
expert_weights = expert_weights / torch.norm(
expert_weights, p=self.args.moe_normalize_expert_weights,dim=-1, keepdim=True)
expert_indices = (
_uniform_expert_assignment(expert_indices, self.args.moe_num_experts)
if self.args.uniform_expert_assignment else expert_indices
)
return scores, expert_weights, expert_indices
In the aforementioned paper the noisy top k works like:
Is this somehting equivalent? I am not trying to argue that it is wrong, but i was just trying to figure out if this is the same.
- 主要语言
- Python
- 星标
- 1.6k
- 派生
- 227
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
-
难度 2/5 1-3 小时 新手友好度 87/100
维护者通常 7 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 78/100
MTSWebServices/RecTools#330 ·
-
area: web priority: P1 story
难度 2/5 1-3 小时 新手友好度 76/100
nfiasco/Quant-Time-Machine#151 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
autowarefoundation/autoware_carla_scenario#2019 ·
维护者通常 1 天内回复