TransformerLayer implementation is overly complex and difficult to follow
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 30/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 冷清
调研方向
先阅读第 70 行附近的 transformer_engine/pytorch/transformer.py,然后将其单个 TransformerLayer 设计与链接的 Hugging Face 模型布局进行比较。该 issue 未定义具体的拆分方式、验收标准或测试,因此需要在实现之前就所需的重构和 definition of done 达成一致。
由索引模型根据 Issue 内容生成。
描述
I understand that you want to implement a single TransformerLayer class to support various model architectures.
However, this design leads to an issue: the code inside the TransformerLayer class has become overly complex, with too many parameters and a large number of if-else statements. For beginners, it is really difficult to figure out how to configure the parameters to fit their own model structures.
I'm curious why you didn't design it like the Hugging Face Transformers framework, where one model corresponds to one file:
https://github.com/huggingface/transformers/tree/main/src/transformers/models
This kind of design is much more user-friendly, because users only need to focus on the code they care about.
- 主要语言
- Python
- 星标
- 3.6k
- 派生
- 844
- 平均合并
- 4 天 55 分钟
- 30 天内合并 PR
- 51
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/TransformerEngine 的其他 Issue
-
[PyTorch] fp8_cs_quantize fake implementation returns a vector inverse scale instead of a scalar未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TransformerEngine#3636 ·
维护者通常 2 天内回复
-
[Bug] Backend selection picks FA3 for training with head_dim_qk=192 / v_head_dim=128, but FA3 backward cannot run it可能已有人在做 @yuweih205 于 30 天前认领。 未关闭attention
难度 2/5 1-3 小时 新手友好度 85/100
NVIDIA/TransformerEngine#3481 · 4 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
NVIDIA/TransformerEngine#2189 · 7 条评论 · 5 个 reaction ·
维护者通常 2 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 54/100
NVIDIA/TransformerEngine#3640 · 5 条评论 ·
维护者通常 2 天内回复
-
[BUG] Grouped MXFP8 quantization is not concurrency safe with multiple streams可能已有人在做 @kainzhong 于 1 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 25/100
NVIDIA/TransformerEngine#3630 ·
维护者通常 2 天内回复
查看 NVIDIA/TransformerEngine 的全部 Issue
相似的 Issue
-
Harmony OPeNDAP SubSetter (HOSS) Geographic LARC_CLOUD PREFIRE_SAT2_AUX-SAT R01 production
难度 2/5 1-3 小时 新手友好度 68/100
nasa/harmony-autotester#245 ·
-
feature
难度 2/5 1-3 小时 新手友好度 66/100
-
L: github:actions L: php:composer
难度 2/5 1-3 小时 新手友好度 88/100
dependabot/dependabot-core#16493 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
DataTalksClub/machine-learning-zoomcamp#730 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 4 天内回复