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

selective router precision

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python, pytorch

調査の方向性

リンクされた行の周辺にある megablocks/layers/router.py、megablocks/layers/mlp.py、megablocks/layers/dmoe.py を読み、続いて該当する training path における設定済みの dtype と autocast の挙動を追跡してください。観測された挙動を issue の Switch Transformer リファレンスと比較してください。完了の条件は、maintainer が確認した回答、または選択的な fp32 routing に対するスコープが明確な変更です。

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

説明

question

To my understanding -- and please correct me if I am wrong about this -- there is no mechanism to selectively compute routing logits in fp32, as is suggested in e.g. switch transformers. Basis:

  1. The only mention of fp32/float computations I see anywhere are for moe_lbl_in_fp32
  2. the router is initialized with the same dtype as the MLP weights (as configured by Arguments).
  3. There does not seem to be any explicit casting || autocast deactivation in router.py, nor any attempt to do so in dMoE
  4. Given that the router is implemented as a torch.nn.Linear, and the input to the router is pre-casted to autocast's precision, I can only presume that the computation must be done in half precision under normal AMP training.

Is this correct? If so, have you observed any instabilities in practice during training? Perhaps it is just not necessary...

主要言語
Python
スター
1.6k
フォーク
230
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

databricks/megablocks のほかの issue

databricks/megablocks の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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