Papers › Anchor-based Large Language Models

Anchor-based Large Language Models

12 Feb 2024arXiv:2402.07616archive 2025-07-28

Jianhui Pang, Fanghua Ye, Derek Fai Wong, Xin He, Wanshun Chen, Longyue Wang

Large language models (LLMs) predominantly employ decoder-only transformer architectures, necessitating the retention of keys/values information for historical tokens to provide contextual information and avoid redundant computation. However, the substantial size and parameter volume of these LLMs require massive GPU memory. This memory demand increases with the length of the input text, leading to an urgent need for more efficient methods of information storage and processing. This study introduces Anchor-based LLMs (AnLLMs), which utilize an innovative anchor-based self-attention network (AnSAN) and also an anchor-based inference strategy. This approach enables LLMs to compress sequence information into an anchor token, reducing the keys/values cache and enhancing inference efficiency. Experiments on question-answering benchmarks reveal that AnLLMs maintain similar accuracy levels while achieving up to 99% keys/values cache reduction and up to 3.5 times faster inference. Despite a minor compromise in accuracy, the substantial enhancements of AnLLMs employing the AnSAN technique in resource utilization and computational efficiency underscore their potential for practical LLM applications.

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.07616")

Code

Syntology Ran 6 of 12 code samples harvested from 1 repository linked to this paper; 6 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 5 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 6 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

pangjh3/anllm officialmentioned in papermentioned 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

12 samples harvested; 6 ran; 0 honoured the contract we drafted; 6 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 · our draft was wrong
5ran
6unverified

Licence: 12 of the 12 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 pangjh3/anllm. “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.

create_prompt pangjh3/anllm/inference.py official repository ran no licence file found · pointer only · 4a62d89cb68ccb26 · report
create_prompt pangjh3/anllm/analysis/get_infer_attention.py official repository ran no licence file found · pointer only · 65a7d55fbb2fbdf6 · report
create_prompt pangjh3/anllm/applications/translation/inference_allmnoacinput.py official repository ran no licence file found · pointer only · 6ed5904743254ffa · report
read_input pangjh3/anllm/inference.py official repository ran · our draft was wrong no licence file found · pointer only · 2a686c7dfc4f6740 · report
read_instruct pangjh3/anllm/inference.py official repository ran no licence file found · pointer only · 1a23d98ad0f9c590 · report
read_instruct pangjh3/anllm/analysis/get_infer_attention.py official repository ran no licence file found · pointer only · 341ad8f9aaad0613 · report
llamamodel_forward_noflashattn pangjh3/anllm/codes/llama_sft_forward_thisversion.py official repository unverified no licence file found · pointer only · 499b99e50f9e7aa2 · report
llamamodel_forward_onlyfortraining pangjh3/anllm/codes/fortest.py official repository unverified no licence file found · pointer only · af993c4bf4ab277b · report
llamamodel_forwardforinfer_onlykvcache_realtime pangjh3/anllm/codes/fortest.py official repository unverified no licence file found · pointer only · e0b319e22a605469 · report
llamamodel_forwardforinfer_realtime_asan pangjh3/anllm/codes/fortest.py official repository unverified no licence file found · pointer only · a902b911ae31d497 · report
llamamodel_forwardforinfer_realtime_asan pangjh3/anllm/codes/llama_sft_forward_thisversion.py official repository unverified no licence file found · pointer only · 6c2ee79bf4242e7b · report
llamamodel_forwardforinfer_realtime_asan pangjh3/anllm/codes/llama_sft_forward_thisversion_new.py official repository unverified no licence file found · pointer only · dcb6d4e3ddac178f · report

Tasks

Computational EfficiencyDecoderQuestion Answering

1 archive task tag without a task page not shown.

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