Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

selective router precision

Đang mở
#91 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python, pytorch
Lĩnh vực
machine-learning

Hướng nghiên cứu

Đọc megablocks/layers/router.py, megablocks/layers/mlp.py và megablocks/layers/dmoe.py quanh các dòng được liên kết, sau đó lần theo dtype đã cấu hình và hành vi của autocast trong đường dẫn training liên quan. So sánh hành vi quan sát được với tham chiếu Switch Transformer của issue; để hoàn tất cần có câu trả lời được maintainer xác nhận hoặc một thay đổi có phạm vi rõ ràng cho selective fp32 routing.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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...

Ngôn ngữ chính
Python
Star
1.6k
Fork
228
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.