{"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/self-attention-does-not-need-o-n-2-memory","title":"Self-attention Does Not Need $O(n^2)$ Memory","arxiv_id":"2112.05682","date":"2021-12-10","proceeding":null,"authors":["Markus N. Rabe","Charles Staats"],"abstract":"We present a very simple algorithm for attention that requires $O(1)$ memory with respect to sequence length and an extension to self-attention that requires $O(\\log n)$ memory. This is in contrast with the frequently stated belief that self-attention requires $O(n^2)$ memory. While the time complexity is still $O(n^2)$, device memory rather than compute capability is often the limiting factor on modern accelerators. Thus, reducing the memory requirements of attention allows processing of longer sequences than might otherwise be feasible. We provide a practical implementation for accelerators that requires $O(\\sqrt{n})$ memory, is numerically stable, and is within a few percent of the runtime of the standard implementation of attention. We also demonstrate how to differentiate the function while remaining memory-efficient. For sequence length 16384, the memory overhead of self-attention is reduced by 59X for inference and by 32X for differentiation.","url_abs":"https://arxiv.org/abs/2112.05682v3","url_pdf":"https://arxiv.org/pdf/2112.05682v3.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":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/google-research/google-research/tree/master/memory_efficient_attention","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"jax","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch","is_official":0,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/AminRezaei0x443/memory-efficient-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/BirgerMoell/SwedishLLMBenchmark","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/Peter-Devine/multilingual_mt_bench","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/SforAiDl/vformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/X-iZhang/Libra","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/aqlaboratory/openfold","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/baaivision/judgelm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/beckschen/llavolta","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/jihaonew/mm-instruct","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/lightblue-tech/multilingual-mt-bench","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/lm-sys/fastchat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/lucidrains/En-transformer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/lucidrains/flash-cosine-sim-attention","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/stability-ai/fastchat","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"self-attention-does-not-need-o-n-2-memory","repo_url":"https://github.com/facebookresearch/xformers/blob/main/xformers/ops/fmha/__init__.py","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2112.05682","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.05682"}},"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/aqlaboratory/openfold","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/flash-cosine-sim-attention","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/baaivision/judgelm","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/beckschen/llavolta","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/X-iZhang/Libra","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jihaonew/mm-instruct","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lightblue-tech/multilingual-mt-bench","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Peter-Devine/multilingual_mt_bench","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/memory-efficient-attention-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-research/google-research/tree/master/memory_efficient_attention","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lm-sys/fastchat","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/facebookresearch/xformers/blob/main/xformers/ops/fmha/__init__.py","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/AminRezaei0x443/memory-efficient-attention","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/SforAiDl/vformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/En-transformer","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/BirgerMoell/SwedishLLMBenchmark","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/stability-ai/fastchat","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":6,"ran_fixture":2,"ran_draft_wrong":7,"ran_honours":1,"ran":1,"unverified":19},"by_repo_kind":{"named_in_paper":{"samples":7,"ran":5,"repositories":1},"listed":{"samples":28,"ran":11,"repositories":7}},"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":2,"samples":[{"code_sha256_prefix":"856d86b39c6005b4","entry":"divisible_by","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"856d86b39c6005b4"}},{"code_sha256_prefix":"68b3637c9b987a61","entry":"create_tensors","repo":"facebookresearch/xformers","repo_kind":"listed","path":"xformers/benchmarks/benchmark_mem_eff_attention.py","file_url":"https://github.com/facebookresearch/xformers/blob/HEAD/xformers/benchmarks/benchmark_mem_eff_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"68b3637c9b987a61"}},{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/cosine_sim_flash_attention.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/cosine_sim_flash_attention.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"915fbeb88e13d4a3","entry":"default","repo":"lucidrains/flash-cosine-sim-attention","repo_kind":"listed","path":"flash_cosine_sim_attention/flash_cosine_sim_attention.py","file_url":"https://github.com/lucidrains/flash-cosine-sim-attention/blob/HEAD/flash_cosine_sim_attention/flash_cosine_sim_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"915fbeb88e13d4a3"}},{"code_sha256_prefix":"6b1a95182607abd6","entry":"efficient_dot_product_attention","repo":"AminRezaei0x443/memory-efficient-attention","repo_kind":"listed","path":"memory_efficient_attention/attention_jax.py","file_url":"https://github.com/AminRezaei0x443/memory-efficient-attention/blob/HEAD/memory_efficient_attention/attention_jax.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6b1a95182607abd6"}},{"code_sha256_prefix":"c16aee9490eb8729","entry":"eval_decorator","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/autoregressive_wrapper.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/autoregressive_wrapper.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c16aee9490eb8729"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/autoregressive_wrapper.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/autoregressive_wrapper.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"592b3c1a88f93d7c","entry":"expand2square","repo":"jihaonew/mm-instruct","repo_kind":"listed","path":"llava/mm_utils.py","file_url":"https://github.com/jihaonew/mm-instruct/blob/HEAD/llava/mm_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"592b3c1a88f93d7c"}},{"code_sha256_prefix":"42a46570620cd9fa","entry":"get_chunk","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/eval_vqa_libra.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/eval_vqa_libra.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"42a46570620cd9fa"}},{"code_sha256_prefix":"bae18947b56f2be1","entry":"is_none","repo":"jihaonew/mm-instruct","repo_kind":"listed","path":"llava/eval/model_vqa_mmbench.py","file_url":"https://github.com/jihaonew/mm-instruct/blob/HEAD/llava/eval/model_vqa_mmbench.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bae18947b56f2be1"}},{"code_sha256_prefix":"3eb58dae620046d3","entry":"l2norm","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/cosine_sim_flash_attention.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/cosine_sim_flash_attention.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3eb58dae620046d3"}},{"code_sha256_prefix":"9b3c1cb391672ccb","entry":"load_image","repo":"jihaonew/mm-instruct","repo_kind":"listed","path":"predict.py","file_url":"https://github.com/jihaonew/mm-instruct/blob/HEAD/predict.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9b3c1cb391672ccb"}},{"code_sha256_prefix":"c3ee9d07c900dd55","entry":"load_image_from_base64","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/mm_utils.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/mm_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c3ee9d07c900dd55"}},{"code_sha256_prefix":"f2fe51a4a5646c6f","entry":"max_neg_value","repo":"lucidrains/En-transformer","repo_kind":"listed","path":"en_transformer/en_transformer.py","file_url":"https://github.com/lucidrains/En-transformer/blob/HEAD/en_transformer/en_transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f2fe51a4a5646c6f"}},{"code_sha256_prefix":"0bf414a2b44babe6","entry":"raise_warning_for_incompatible_cpu_offloading_configuration","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/model/model_adapter.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/model/model_adapter.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0bf414a2b44babe6"}},{"code_sha256_prefix":"076c252c52cbb161","entry":"split_list","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/eval_vqa_libra.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/eval_vqa_libra.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"076c252c52cbb161"}},{"code_sha256_prefix":"3b65d5d77510c964","entry":"top_k","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/autoregressive_wrapper.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/autoregressive_wrapper.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3b65d5d77510c964"}},{"code_sha256_prefix":"640155bcba1f2f92","entry":"attention","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/memory_efficient_attention.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/memory_efficient_attention.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":"640155bcba1f2f92"}},{"code_sha256_prefix":"36090e75c451149f","entry":"calculate_tem_score","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/temporal_f1.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/temporal_f1.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":"36090e75c451149f"}},{"code_sha256_prefix":"46c06fec5aedf4a4","entry":"clean_text","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/radiology_report.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/radiology_report.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":"46c06fec5aedf4a4"}},{"code_sha256_prefix":"cb00b798f297e5f3","entry":"clean_text","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/temporal_f1.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/temporal_f1.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":"cb00b798f297e5f3"}},{"code_sha256_prefix":"80dde39da1ba3708","entry":"compress","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/model/compression.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/model/compression.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":"80dde39da1ba3708"}},{"code_sha256_prefix":"bdb24836d5607016","entry":"efficient_dot_product_attention","repo":"AminRezaei0x443/memory-efficient-attention","repo_kind":"listed","path":"memory_efficient_attention/attention_torch.py","file_url":"https://github.com/AminRezaei0x443/memory-efficient-attention/blob/HEAD/memory_efficient_attention/attention_torch.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":"bdb24836d5607016"}},{"code_sha256_prefix":"1fe910f8046380d4","entry":"expand2square","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/mm_utils.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/mm_utils.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":"1fe910f8046380d4"}},{"code_sha256_prefix":"c17fb3de0d47f94a","entry":"extract_entities","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/temporal_f1.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/temporal_f1.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":"c17fb3de0d47f94a"}},{"code_sha256_prefix":"fa3bb9e402f7460c","entry":"extract_sections","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/radiology_report.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/radiology_report.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":"fa3bb9e402f7460c"}},{"code_sha256_prefix":"f545ae5663fedf88","entry":"generate_stream_codet5p","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/model/model_codet5p.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/model/model_codet5p.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":"f545ae5663fedf88"}},{"code_sha256_prefix":"c5824da57107fe8c","entry":"get_compressed_list","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/model/compression.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/model/compression.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":"c5824da57107fe8c"}},{"code_sha256_prefix":"2613e53cccc8a4b4","entry":"get_conv_template","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/conversation.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/conversation.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":"2613e53cccc8a4b4"}},{"code_sha256_prefix":"8dacf011c6f243dc","entry":"load_compress_model","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/model/compression.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/model/compression.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":"8dacf011c6f243dc"}},{"code_sha256_prefix":"a3698e4aaee89be7","entry":"load_json","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/eval/radiology_report.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/eval/radiology_report.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":"a3698e4aaee89be7"}},{"code_sha256_prefix":"344dff4791fd1381","entry":"process_images","repo":"jihaonew/mm-instruct","repo_kind":"listed","path":"llava/mm_utils.py","file_url":"https://github.com/jihaonew/mm-instruct/blob/HEAD/llava/mm_utils.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":"344dff4791fd1381"}},{"code_sha256_prefix":"012fae59ee4131ba","entry":"process_images","repo":"X-iZhang/Libra","repo_kind":"listed","path":"libra/mm_utils.py","file_url":"https://github.com/X-iZhang/Libra/blob/HEAD/libra/mm_utils.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":"012fae59ee4131ba"}},{"code_sha256_prefix":"dc21db7cf25bfe72","entry":"process_response","repo":"stability-ai/fastchat","repo_kind":"listed","path":"fastchat/model/model_chatglm.py","file_url":"https://github.com/stability-ai/fastchat/blob/HEAD/fastchat/model/model_chatglm.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":"dc21db7cf25bfe72"}},{"code_sha256_prefix":"44fab12a908ab057","entry":"read_img","repo":"jihaonew/mm-instruct","repo_kind":"listed","path":"llava/eval/model_vqa_loader.py","file_url":"https://github.com/jihaonew/mm-instruct/blob/HEAD/llava/eval/model_vqa_loader.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":"44fab12a908ab057"}},{"code_sha256_prefix":"1f7d4befc2e41402","entry":"route_args","repo":"lucidrains/memory-efficient-attention-pytorch","repo_kind":"named_in_paper","path":"memory_efficient_attention_pytorch/reversible.py","file_url":"https://github.com/lucidrains/memory-efficient-attention-pytorch/blob/HEAD/memory_efficient_attention_pytorch/reversible.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":"1f7d4befc2e41402"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}