{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/longformer-the-long-document-transformer","title":"Longformer: The Long-Document Transformer","arxiv_id":"2004.05150","date":"2020-04-10","proceeding":null,"authors":["Iz Beltagy","Matthew E. Peters","Arman Cohan"],"abstract":"Transformer-based models are unable to process long sequences due to their self-attention operation, which scales quadratically with the sequence length. To address this limitation, we introduce the Longformer with an attention mechanism that scales linearly with sequence length, making it easy to process documents of thousands of tokens or longer. Longformer's attention mechanism is a drop-in replacement for the standard self-attention and combines a local windowed attention with a task motivated global attention. Following prior work on long-sequence transformers, we evaluate Longformer on character-level language modeling and achieve state-of-the-art results on text8 and enwik8. In contrast to most prior work, we also pretrain Longformer and finetune it on a variety of downstream tasks. Our pretrained Longformer consistently outperforms RoBERTa on long document tasks and sets new state-of-the-art results on WikiHop and TriviaQA. We finally introduce the Longformer-Encoder-Decoder (LED), a Longformer variant for supporting long document generative sequence-to-sequence tasks, and demonstrate its effectiveness on the arXiv summarization dataset.","url_abs":"https://arxiv.org/abs/2004.05150v2","url_pdf":"https://arxiv.org/pdf/2004.05150v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/allenai/longformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/Phrase-in-Context/eval","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/a-rios/ats-models","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/amazon-science/efficient-longdoc-classification","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/amoramine/Pegasus_Longformer_summarization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/amoramine/Pegasus_with_Longformer_summarization","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/facebookresearch/xformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/han-shi/SparseBERT","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/huggingface/transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/jaketae/pytorch-malware-detection","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/kit-mrt/red-motion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/kit-mrt/road-barlow-twins","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/lucashueda/long_sentence_transformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"LGPL-3.0"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/microsoft/dialoglm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/mim-solutions/bert_for_longer_texts","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/mim-solutions/roberta_for_longer_texts","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/mistralai/mistral-src","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/naver-ai/simseek","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/schenliu/longformer-chinese","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/2023-MindSpore-1/ms-code-155","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/2023-MindSpore-1/ms-code-161","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok"}},{"paper_slug":"longformer-the-long-document-transformer","repo_url":"https://github.com/AIResearchHub/transformergallery","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"question-answering","task_name":"Question Answering"},{"task_slug":"triviaqa","task_name":"TriviaQA"}],"methods":[{"method_slug":"adamw","method_name":"AdamW"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"longformer","method_name":"Longformer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[{"slug":"longformer","name":"Longformer","full_name":"Longformer"}],"results":[{"leaderboard":"/sota/language-modelling-on-hutter-prize","task":"Language Modelling","dataset":"Hutter Prize","model":"Longformer Large","rank_in_archive_order":5,"of":18,"metrics":{"Bit per Character (BPC)":"0.99","Number of params":"102M"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-hutter-prize","task":"Language Modelling","dataset":"Hutter Prize","model":"Longformer Small","rank_in_archive_order":6,"of":18,"metrics":{"Bit per Character (BPC)":"1.00","Number of params":"41M"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-enwiki8","task":"Language Modelling","dataset":"enwik8","model":"Longformer (30 layers, h=512)","rank_in_archive_order":13,"of":42,"metrics":{"Bit per Character (BPC)":"0.99","Number of params":"102M"},"uses_additional_data":false},{"leaderboard":"/sota/language-modelling-on-enwiki8","task":"Language Modelling","dataset":"enwik8","model":"Longformer (12 layers, h=512)","rank_in_archive_order":18,"of":42,"metrics":{"Bit per Character (BPC)":"1.00","Number of params":"41M"},"uses_additional_data":false},{"leaderboard":"/sota/question-answering-on-wikihop","task":"Question Answering","dataset":"WikiHop","model":"Longformer-large","rank_in_archive_order":2,"of":9,"metrics":{"Test":"81.9"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2004.05150","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2004.05150"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/han-shi/SparseBERT","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huggingface/transformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mim-solutions/bert_for_longer_texts","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/dialoglm","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucashueda/long_sentence_transformer","reach":{"status":"ok","spdx":"LGPL-3.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amoramine/Pegasus_with_Longformer_summarization","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mistralai/mistral-src","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-1/ms-code-155","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kit-mrt/red-motion","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AIResearchHub/transformergallery","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jaketae/pytorch-malware-detection","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amoramine/Pegasus_Longformer_summarization","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/allenai/longformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/amazon-science/efficient-longdoc-classification","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/schenliu/longformer-chinese","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/naver-ai/simseek","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/kit-mrt/road-barlow-twins","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Phrase-in-Context/eval","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/2023-MindSpore-1/ms-code-161","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/xformers","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/mim-solutions/roberta_for_longer_texts","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/a-rios/ats-models","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":5,"ran_draft_wrong":8,"ran_honours":1,"ran_violates":1,"unverified":20},"by_repo_kind":{"official":{"samples":11,"ran":9,"repositories":1},"listed":{"samples":24,"ran":6,"repositories":6}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":5,"samples":[{"code_sha256_prefix":"2893a3bddf619d82","entry":"FeedForward","repo":"AIResearchHub/transformergallery","repo_kind":"listed","path":"transformer/longformer.py","file_url":"https://github.com/AIResearchHub/transformergallery/blob/HEAD/transformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2893a3bddf619d82"}},{"code_sha256_prefix":"e71d9c8a8cff7aa3","entry":"LongformerClassificationHead","repo":"amazon-science/efficient-longdoc-classification","repo_kind":"listed","path":"src/models.py","file_url":"https://github.com/amazon-science/efficient-longdoc-classification/blob/HEAD/src/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e71d9c8a8cff7aa3"}},{"code_sha256_prefix":"6c89fcd0771cd674","entry":"PositionalEncoding","repo":"AIResearchHub/transformergallery","repo_kind":"listed","path":"transformer/longformer.py","file_url":"https://github.com/AIResearchHub/transformergallery/blob/HEAD/transformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6c89fcd0771cd674"}},{"code_sha256_prefix":"0840d53a3e87bbd0","entry":"TokenEmbedding","repo":"AIResearchHub/transformergallery","repo_kind":"listed","path":"transformer/longformer.py","file_url":"https://github.com/AIResearchHub/transformergallery/blob/HEAD/transformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0840d53a3e87bbd0"}},{"code_sha256_prefix":"4d2255c33fd872a1","entry":"TransformerEmbedding","repo":"AIResearchHub/transformergallery","repo_kind":"listed","path":"transformer/longformer.py","file_url":"https://github.com/AIResearchHub/transformergallery/blob/HEAD/transformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4d2255c33fd872a1"}},{"code_sha256_prefix":"b3689e24866300ad","entry":"_chunk","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b3689e24866300ad"}},{"code_sha256_prefix":"215ac6dd58d2d468","entry":"_get_invalid_locations_mask","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"215ac6dd58d2d468"}},{"code_sha256_prefix":"1a6f3f01a17a0b4c","entry":"_get_invalid_locations_mask_fixed_dilation","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1a6f3f01a17a0b4c"}},{"code_sha256_prefix":"54c6929644249d31","entry":"_skew","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"54c6929644249d31"}},{"code_sha256_prefix":"755bf82d9fe23d4b","entry":"_skew2","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"755bf82d9fe23d4b"}},{"code_sha256_prefix":"ca468da77bd87495","entry":"local_1d_pattern","repo":"facebookresearch/xformers","repo_kind":"listed","path":"xformers/components/attention/attention_patterns.py","file_url":"https://github.com/facebookresearch/xformers/blob/HEAD/xformers/components/attention/attention_patterns.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ca468da77bd87495"}},{"code_sha256_prefix":"4261f70837b75c76","entry":"sliding_chunks_matmul_pv","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4261f70837b75c76"}},{"code_sha256_prefix":"1b7525edcd068b10","entry":"sliding_chunks_matmul_qk","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1b7525edcd068b10"}},{"code_sha256_prefix":"1273524f034ce151","entry":"sliding_chunks_no_overlap_matmul_pv","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1273524f034ce151"}},{"code_sha256_prefix":"3d4e46172b26669c","entry":"sliding_chunks_no_overlap_matmul_qk","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3d4e46172b26669c"}},{"code_sha256_prefix":"e23d4d61b776fd56","entry":"Longformer","repo":"AIResearchHub/transformergallery","repo_kind":"listed","path":"transformer/longformer.py","file_url":"https://github.com/AIResearchHub/transformergallery/blob/HEAD/transformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e23d4d61b776fd56"}},{"code_sha256_prefix":"083425b2586f0566","entry":"LongformerClass","repo":"amazon-science/efficient-longdoc-classification","repo_kind":"listed","path":"src/models.py","file_url":"https://github.com/amazon-science/efficient-longdoc-classification/blob/HEAD/src/models.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"083425b2586f0566"}},{"code_sha256_prefix":"56f78e8f5e291c8d","entry":"LongformerLayer","repo":"AIResearchHub/transformergallery","repo_kind":"listed","path":"transformer/longformer.py","file_url":"https://github.com/AIResearchHub/transformergallery/blob/HEAD/transformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"56f78e8f5e291c8d"}},{"code_sha256_prefix":"c1eb691dab111921","entry":"LongformerSelfAttention","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c1eb691dab111921"}},{"code_sha256_prefix":"3b707d0823eee4d2","entry":"LongformerSelfAttention","repo":"schenliu/longformer-chinese","repo_kind":"listed","path":"longformer/longformer.py","file_url":"https://github.com/schenliu/longformer-chinese/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3b707d0823eee4d2"}},{"code_sha256_prefix":"cc7b7bd19f2134ba","entry":"_generate_nd_grid","repo":"facebookresearch/xformers","repo_kind":"listed","path":"xformers/components/attention/attention_patterns.py","file_url":"https://github.com/facebookresearch/xformers/blob/HEAD/xformers/components/attention/attention_patterns.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"cc7b7bd19f2134ba"}},{"code_sha256_prefix":"62964c608dfd3d2c","entry":"average_tensors","repo":"a-rios/ats-models","repo_kind":"listed","path":"ats_models/average.py","file_url":"https://github.com/a-rios/ats-models/blob/HEAD/ats_models/average.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"62964c608dfd3d2c"}},{"code_sha256_prefix":"be39561477eedbab","entry":"collate_fn","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/deep_malware_detection/dataset.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/deep_malware_detection/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"be39561477eedbab"}},{"code_sha256_prefix":"1d6037ddb5464048","entry":"construct_href","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/bin/malshare.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/bin/malshare.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1d6037ddb5464048"}},{"code_sha256_prefix":"4f4f44d30b573fa8","entry":"count_params","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/deep_malware_detection/utils.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/deep_malware_detection/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4f4f44d30b573fa8"}},{"code_sha256_prefix":"8a1120aa9e015927","entry":"create_long_model","repo":"a-rios/ats-models","repo_kind":"listed","path":"ats_models/convert_bart2long.py","file_url":"https://github.com/a-rios/ats-models/blob/HEAD/ats_models/convert_bart2long.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8a1120aa9e015927"}},{"code_sha256_prefix":"e910798b9dfc1967","entry":"get_accuracy","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/deep_malware_detection/utils.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/deep_malware_detection/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e910798b9dfc1967"}},{"code_sha256_prefix":"9c78ceb4210479cf","entry":"label_smoothed_nll_loss","repo":"a-rios/ats-models","repo_kind":"listed","path":"ats_models/metrics.py","file_url":"https://github.com/a-rios/ats-models/blob/HEAD/ats_models/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9c78ceb4210479cf"}},{"code_sha256_prefix":"69ca0d84582f00bd","entry":"local_nd_distance","repo":"facebookresearch/xformers","repo_kind":"listed","path":"xformers/components/attention/attention_patterns.py","file_url":"https://github.com/facebookresearch/xformers/blob/HEAD/xformers/components/attention/attention_patterns.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"69ca0d84582f00bd"}},{"code_sha256_prefix":"2a87d1deca0f2b1a","entry":"local_nd_pattern","repo":"facebookresearch/xformers","repo_kind":"listed","path":"xformers/components/attention/attention_patterns.py","file_url":"https://github.com/facebookresearch/xformers/blob/HEAD/xformers/components/attention/attention_patterns.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"2a87d1deca0f2b1a"}},{"code_sha256_prefix":"bec22b3675334717","entry":"mask_invalid_locations","repo":"allenai/longformer","repo_kind":"official","path":"longformer/longformer.py","file_url":"https://github.com/allenai/longformer/blob/HEAD/longformer/longformer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bec22b3675334717"}},{"code_sha256_prefix":"337700a5796189df","entry":"pad_sequence","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/deep_malware_detection/dataset.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/deep_malware_detection/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"337700a5796189df"}},{"code_sha256_prefix":"e566c3f105753aa6","entry":"predict","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/deep_malware_detection/utils.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/deep_malware_detection/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e566c3f105753aa6"}},{"code_sha256_prefix":"bce6838014c76d1e","entry":"remove_special_tokens","repo":"a-rios/ats-models","repo_kind":"listed","path":"ats_models/finetune_mbart.py","file_url":"https://github.com/a-rios/ats-models/blob/HEAD/ats_models/finetune_mbart.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bce6838014c76d1e"}},{"code_sha256_prefix":"e71dea05795c03bf","entry":"train_val_test_split","repo":"jaketae/pytorch-malware-detection","repo_kind":"listed","path":"src/deep_malware_detection/dataset.py","file_url":"https://github.com/jaketae/pytorch-malware-detection/blob/HEAD/src/deep_malware_detection/dataset.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e71dea05795c03bf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}