allenai / allenai/longformer

help in reproducing the WikiHop results using the entire sequence length?

未关闭
#83 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
2.2k
派生
285
PR 合并指标
30 天内没有已合并 PR

描述

Hi,

I am trying to reproduce results for some downstream tasks in order to better understand Longformer. Paper - Page 12 - explains how these tasks are implemented but I couldn't find any code in the repo.

![image](https://user-images.githubusercontent.com/22553367/86610875-e873b080-bf7b-11ea-8b02-3b82f67b5de5.png)

Any help with some task-specific code snippet?

Also, how does the forward layer work for each of the chunks passed? For instance, say there is a document with 5x 4096 (Longformer-base) chunks and a label **1** (tag). When I pass such 5 chunks in the forward pass, it will simply create output activations without any gradient calculation. Then all activations are **concatenated** into a long sequence. So if there two documents with 5 and 9 chunks respectively, then each will be [5x 768] and [9x 768], different shapes? So just mean/max pool after stacking them? When does the backward pass happen if I want to use my custom **classifier** instead of AutoModelForSequenceClassification?

Some more elaborate explanation would be helpful.

Thanks!

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。