{"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/citrus-chunked-instruction-aware-state","title":"CItruS: Chunked Instruction-aware State Eviction for Long Sequence Modeling","arxiv_id":"2406.12018","date":"2024-06-17","proceeding":null,"authors":["Yu Bai","Xiyuan Zou","Heyan Huang","Sanxing Chen","Marc-Antoine Rondeau","Yang Gao","Jackie Chi Kit Cheung"],"abstract":"Long sequence modeling has gained broad interest as large language models (LLMs) continue to advance. Recent research has identified that a large portion of hidden states within the key-value caches of Transformer models can be discarded (also termed evicted) without affecting the perplexity performance in generating long sequences. However, we show that these methods, despite preserving perplexity performance, often drop information that is important for solving downstream tasks, a problem which we call information neglect. To address this issue, we introduce Chunked Instruction-aware State Eviction (CItruS), a novel modeling technique that integrates the attention preferences useful for a downstream task into the eviction process of hidden states. In addition, we design a method for chunked sequence processing to further improve efficiency. Our training-free method exhibits superior performance on long sequence comprehension and retrieval tasks over several strong baselines under the same memory budget, while preserving language modeling perplexity. The code and data have been released at https://github.com/ybai-nlp/CItruS.","url_abs":"https://arxiv.org/abs/2406.12018v2","url_pdf":"https://arxiv.org/pdf/2406.12018v2.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":"citrus-chunked-instruction-aware-state","repo_url":"https://github.com/ybai-nlp/CItruS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"retrieval","task_name":"Retrieval"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.12018","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.12018"}},"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":"deterministic:regex_extraction","url":"https://github.com/ybai-nlp/CItruS","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/gkamradt/LLMTest_","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"summary":{"ran_fixture":5,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"repositories":1}},"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":10,"samples":[{"code_sha256_prefix":"feb1b3f32d2a6b1d","entry":"apply_rotary_pos_emb_single","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"feb1b3f32d2a6b1d"}},{"code_sha256_prefix":"bcbb23a09017e873","entry":"get_past_key_values_instruction_aware_single","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bcbb23a09017e873"}},{"code_sha256_prefix":"536f4a58379b992a","entry":"get_past_key_values_standard","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"536f4a58379b992a"}},{"code_sha256_prefix":"99816d85ee9c97a0","entry":"get_past_key_values_with_instruction_aware_double","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"99816d85ee9c97a0"}},{"code_sha256_prefix":"fba04c2f8cfb0944","entry":"llama_pos_shift_attention_forward","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fba04c2f8cfb0944"}},{"code_sha256_prefix":"56f48a4c656eed1b","entry":"decoding","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.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":"56f48a4c656eed1b"}},{"code_sha256_prefix":"54e3e8b62733f14d","entry":"enable_llama_pos_shift_attention","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.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":"54e3e8b62733f14d"}},{"code_sha256_prefix":"ada54363a9f4af14","entry":"enable_mistral_pos_shift_attention","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.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":"ada54363a9f4af14"}},{"code_sha256_prefix":"401a35fa33f1eb57","entry":"generate_with_citrus","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.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":"401a35fa33f1eb57"}},{"code_sha256_prefix":"d1c34504b6b5a6a8","entry":"mistral_pos_shift_attention_forward","repo":"ybai-nlp/CItruS","repo_kind":"official","path":"src/citrus_methods.py","file_url":"https://github.com/ybai-nlp/CItruS/blob/HEAD/src/citrus_methods.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":"d1c34504b6b5a6a8"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}