Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

TransformerLayer implementation is overly complex and difficult to follow

オープン
#2,903 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
リファクタリング
明瞭さ
説明が足りない
活発さ
静か
技術スタック
python, pytorch

調査の方向性

まず70行目付近の transformer_engine/pytorch/transformer.py を読み、その単一の TransformerLayer 設計を、リンク先の Hugging Face モデルの構成と比較してください。この issue では具体的な分解方法、受け入れ条件、テストが定義されていないため、実装前に、望ましいリファクタリングと definition of done について合意する必要があります。

索引モデルが issue の本文から書いたものです。

説明

question

https://github.com/NVIDIA/TransformerEngine/blob/5aa4823dcc4942cadc2862adebef917758b6dc05/transformer_engine/pytorch/transformer.py#L70

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分
マージ済み PR(30日)
51

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/TransformerEngine のほかの issue

NVIDIA/TransformerEngine の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。