Add features for Qwen2_moe support
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 22/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
The issue names no files or tests, so start by locating where the Qwen2 MoE model config and decoder layers are defined in the repository. Add the parameters decoder_sparse_step, moe_intermediate_size, shared_expert_intermediate_size, norm_topk_prob and mlp_only_layers, then use the layer choice to switch between dense MLP and sparse MoE blocks. Done means these options are honored, covered by tests, and documented.
由索引模型根据 Issue 内容生成。
描述
🎯 Goal (What & Why)
The following additional parameters need to be added and their functionality implemented to support Qwen2_moe models:
- decoder_sparse_step (
int, optional, defaults to 1):
The frequency of the MoE layer. - moe_intermediate_size (
int, optional, defaults to 1408):
Intermediate size of the routed expert. - shared_expert_intermediate_size (
int, optional, defaults to 5632):
Intermediate size of the shared expert. - norm_topk_prob (
bool, optional, defaults toFalse):
Whether to normalize the topk probabilities. - mlp_only_layers (
List[int], optional, defaults to[]):
Indicate which layers use dense MLP rather than Sparse Moe blocks
The list contains layer index, from 0 to num_layers-1 if we have num_layers layers
Ifmlp_only_layersis empty,decoder_sparse_stepis used to determine the sparsity.
Additionally add_linear_bias=only_attn_qkv needs to be supported then using MLP MoE blocks.
This is needed for #135
🚀 Execution Plan
**Step 1: Changes in MLP Moe
- Implement custom intermediate sizes for shared and non shared Experts
- add support for norm_topk_prob
**Step 2: Changes in layer architecture
- Implement decoder_sparse_step and mlp_only_layers
📌 Acceptance Criteria (Must-Haves for Completion)
- The feature must be functional and tested.
- The implementation must be documented in practical terms.
- The PR must include a performance/impact summary.
- No refactors unless directly necessary for feature completion.
🛠️ Project Management
- Assign the project to the Fast-LLM project.
- Set the
Estimatefield (in days) in the GitHub project. - Use the
Sizefield to categorize the PR size (Small/Medium/Large). - Assign an owner when opening the issue.
- 主要语言
- Python
- 星标
- 337
- 派生
- 52
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ServiceNow/Fast-LLM 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
ServiceNow/Fast-LLM#556 ·
-
难度 4/5 3-5 天 新手友好度 30/100
ServiceNow/Fast-LLM#538 ·
-
enhancement
难度 5/5 一周以上 新手友好度 12/100
ServiceNow/Fast-LLM#533 ·
-
难度 5/5 一周以上 新手友好度 15/100
ServiceNow/Fast-LLM#510 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 12/100
ServiceNow/Fast-LLM#507 ·
查看 ServiceNow/Fast-LLM 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
-
Validate finite output clamping limits in StepPredictor.prepare_clamping_params to prevent silent NaN/Inf propagation可能已有人在做 @muskan-creates352 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
mllam/neural-lam#848 ·
维护者通常 2 天内回复
-
infra
难度 1/5 1 小时以内 新手友好度 88/100
fab-geocommuns/RNB-coeur#1166 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
deepspeedai/DeepSpeed#8951 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
aws/context-ontology-accelerator#343 ·
维护者通常 1 天内回复