Papers › Massive Activations in Large Language Models

Massive Activations in Large Language Models

27 Feb 2024arXiv:2402.17762archive 2025-07-28

MingJie Sun, Xinlei Chen, J. Zico Kolter, Zhuang Liu

We observe an empirical phenomenon in Large Language Models (LLMs) -- very few activations exhibit significantly larger values than others (e.g., 100,000 times larger). We call them massive activations. First, we demonstrate the widespread existence of massive activations across various LLMs and characterize their locations. Second, we find their values largely stay constant regardless of the input, and they function as indispensable bias terms in LLMs. Third, these massive activations lead to the concentration of attention probabilities to their corresponding tokens, and further, implicit bias terms in the self-attention output. Last, we also study massive activations in Vision Transformers. Code is available at https://github.com/locuslab/massive-activations.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.17762")

Code

Syntology Ran 4 of 22 code samples harvested from 2 repositories linked to this paper; 18 have no recorded run. Of those that ran: 1 ran · violated contract; 1 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 2 ran; community (archive-listed): 10 samples from 1 repository, 0 ran; 2 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

locuslab/massive-activations officialmentioned in papermentioned on GitHubpytorchMIT report
bluorion-com/refine_massive_activations mentioned on GitHubpytorchMIT report
jingyangxiang/dfrot mentioned on GitHubpytorch report
ruikangliu/IntactKV mentioned on GitHubpytorch report
vainf/tinyfusion mentioned on GitHubpytorchNOASSERTION report
gitlab.com/bachstelze/causal_generation mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 4 ran; 0 honoured the contract we drafted; 18 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · violated contract
1ran · our draft was wrong
2ran
18unverified

Licence: 2 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. Some samples are identical code Syntology first harvested from another repository; for those, this paper's copy is not located and its licence is not recorded. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

load_dinov2_linear_head locuslab/massive-activations/lib/load_model.py official repository ran MIT (permissive) · beb24f2f9700985a · report
setup_intervene_hook locuslab/massive-activations/lib/hook.py official repository ran MIT (permissive) · 5331cf7f35a3916e · report
fix_reg_mean locuslab/massive-activations/lib/eval_utils.py official repository unverified MIT (permissive) · 0a1741a6e7ed06cc · report
get_data locuslab/massive-activations/lib/load_data.py official repository unverified MIT (permissive) · 72267856fa2b021a · report
get_pg19 locuslab/massive-activations/lib/load_data.py official repository unverified MIT (permissive) · 30e312efd276f18f · report
get_wikitext locuslab/massive-activations/lib/load_data.py official repository unverified MIT (permissive) · 2925fa19b17e4124 · report
load_llm locuslab/massive-activations/lib/load_model.py official repository unverified MIT (permissive) · 56d56728226c0df7 · report
load_vit locuslab/massive-activations/lib/load_model.py official repository unverified MIT (permissive) · 61bb78b9e7903751 · report
setup_dinov2_model_for_eval locuslab/massive-activations/lib/eval_utils.py official repository unverified MIT (permissive) · f3b705c49b57ec48 · report
test_imagenet locuslab/massive-activations/lib/eval_utils.py official repository unverified MIT (permissive) · 95efeec4214462f4 · report
check_module_hidden_states bluorion-com/refine_massive_activations/utils/model.py community (archive-listed) unverified MIT (permissive) · fedac06eb6b7397d · report
get_data bluorion-com/refine_massive_activations/utils/data.py community (archive-listed) unverified MIT (permissive) · e9ecff7082bc2114 · report
get_layers bluorion-com/refine_massive_activations/utils/model.py community (archive-listed) unverified MIT (permissive) · 16dc8236499dd526 · report
get_test_data bluorion-com/refine_massive_activations/utils/data.py community (archive-listed) unverified MIT (permissive) · de38267cc96913a3 · report
gpt2_attention_custom_forward bluorion-com/refine_massive_activations/monkey_patch/gpt2_attn.py community (archive-listed) unverified MIT (permissive) · 918a72c6d010f93d · report
gpt2_attention_kvbias_custom_forward bluorion-com/refine_massive_activations/monkey_patch/gpt2_attn.py community (archive-listed) unverified MIT (permissive) · 57f24e1498cb806e · report
llama_attention_custom_forward bluorion-com/refine_massive_activations/monkey_patch/llama_attn.py community (archive-listed) unverified MIT (permissive) · f30d58738468dd83 · report
llama_attention_kvbias_custom_forward bluorion-com/refine_massive_activations/monkey_patch/llama_attn.py community (archive-listed) unverified MIT (permissive) · 2ce409aa896564d1 · report
load_model_and_tokenizer bluorion-com/refine_massive_activations/utils/model.py community (archive-listed) unverified MIT (permissive) · f9134816cda05113 · report
tokenize_data bluorion-com/refine_massive_activations/utils/data.py community (archive-listed) unverified MIT (permissive) · 37c41fc5246ced6c · report
is_pow2 identical code first harvested elsewhere ran · violated contract fingerprinted licence of this copy not recorded · e36d941e3a44f9df · report
to_numpy identical code first harvested elsewhere ran · our draft was wrong licence of this copy not recorded · 962843b3fc75bc61 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections