allenai / allenai/RL4LMs

passing extra variable to the forward function

Đang mở
#26 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
2.4k
Fork
201
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hey,
I am currently using your repo to finetune a Longformer model.
The problem is this model requires to pre-define a global attention mask (in addition to the regular attention mask), which defines which of the tokens get an extra "global attention head".
So my question is - is there an easy way to pass this variable, that does not require to skim through the code and locate every calling of the forward functions?
I other words- is there an easy way to pass extra model_kwargs?
Thanks!

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

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.