allenai / allenai/RL4LMs

passing extra variable to the forward function

Aberta
#26 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
2.4k
Forks
201
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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!

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.