{
  "id": 1430,
  "kind": "paper",
  "title": "TokenGate: Adapting LLMs for Fast and Memory-Efficient Prefill with Learned Token Pruning",
  "summary": "Problem: a transformer processes every input token through every layer, so long-context prefill (quadratic attention, linear MLP + KV growth) dominates serving cost. Prior work splits into training-free token-pruning heuristics (attention-score based; limited speedup before accuracy degrades) and architectural conditional compute (needs pretraining from scratch). TokenGate instead retrofits a trained model. Mechanism: a gate module sits inside one layer L (L=1 in the main experiments; multiple gates generalize). A small scoring MLP reads each prunable token's normalized post-attention residual at layer L and emits a scalar, RMS-normalized across the sequence into an importance score b_j; a top-K selector forwards S = top-K prunable tokens ∪ the non-prunable set (instructions, the question, answer/decoded tokens — in the code API, everything outside a marked {state} document span). Pruned tokens' residual streams stop at L: layers above L never process them and never generate KV entries for them, so the method is both prefill-compute skipping and upper-layer KV-cache reduction (layers ≤ L keep full KV by default; pruning those too is optional). The trainability trick is token-gated attention: in layers above the gate, each kept key's attention logit gets an additive bias softplus(γ^{ℓh})·b_j (head-wise learnable gains), under a temperature τ scaled by log(kept rank)/log(original position) (SSMax-inspired) that recalibrates softmax sharpness after pruning and generalizes across budgets — this gives gradients through the non-differentiable top-K, the same way MoE routers learn. Implemented as a FlashAttention-based kernel (custom FA2 key-bias kernel in the repo; FlexAttention fallback). Training: NOT from scratch and no sparsity/auxiliary loss — LoRA co-adaptation (r=16, α=32 on Q/V projections; backbone otherwise frozen; Muon for the gate matrices) plus gate parameters, plain next-token CE. Each step averages a full-context loss (K = all prunable tokens; anchors full-context accuracy and gives pruned tokens gradient) with a pruned loss at K ~ LogUniform(1, |𝒫|/2), so one trained gate serves every budget K at inference; the scoring MLP is zero-initialized. Training contexts 2k–16k tokens; a step costs 1.3× standard SFT but converges in fewer steps on 4 of 5 tasks, so total training time is comparable to or below LoRA SFT (mean 0.8× A100-hours at 1.7B). Results (Qwen3-1.7B, five tasks — NIAH 16k, RepoBench-P mean 11k/max 39k, 2WikiMultihopQA mean 7.5k, MultiNews, BioDEX): Pareto-dominant on all five; TTFT 1.4–11.3× faster and peak prefill memory 1.5–3.4× lower at no accuracy degradation vs the LoRA-fine-tuned full-context model, and up to 6.4× faster / ~2× lower memory than the best prior pruning baseline at matched accuracy (baselines: FastKV, SlimInfer, DASH, GemFilter; sparse-attention FlexPrefill, MInference). Launch-figure numbers at matched accuracy: NIAH TTFT 425→37 ms (11.3×; best prior 235 ms), peak memory 2.4→0.7 GB (3.4×); RepoBench TTFT 286→72 ms (3.9×; best prior 201 ms), memory 1.6→0.6 GB (2.8×). A more typical operating point: 2WikiMultihopQA at 95% of full-context accuracy = 3.0× faster, 2.7× less memory. Extrapolation: a gate trained at 16k holds accuracy at 32k/64k/128k with TTFT speedup rising to ~13× (memory reduction flat ~3.43×, since peak memory is dominated by the below-gate full forward). Ablations: the learned selector beats random-K and FastKV's attention-score selector at the same layer by wide margins; co-adaptation independently helps (random-K on the TokenGate-trained model beats random-K on the plain fine-tuned model — training redistributes information into kept tokens); learned keep-patterns are task-dependent (answer keywords for QA, phrase-final stopwords for summarization). Repo's held-out test table (batch 1, one H100): NIAH-16k @K=2000 accuracy 1.000 vs raw base 0.993 at 6.3× TTFT, still 1.000 at K=100 (8.1×); a 32k haystack demo answers the needle with 144 of 32,191 tokens retained above the gate. Hybrid architectures: on Qwen3.5-2B (24 layers; full attention at layers 3,7,11,…,23, Gated DeltaNet elsewhere) TokenGate can sit inside DeltaNet layers 1–2 — where attention-heuristic pruners cannot operate at all (FastKV can only prune at full-attention layers) — reaching up to 7.8× faster prefill within 6% of standard accuracy; at layer 3 it gives 3.8× lower TTFT at no accuracy loss, 2.1× better than the best FastKV run; token-gated attention applies only in full-attention layers above the gate, and DeltaNet layers above run on kept tokens only, their recurrent state built from kept tokens. Decoding (appendix): generated tokens attend to kept + generated tokens in layers above the gate, full context at/below it, with the gate bias precomputed once at prefill as a constant per-key bias — all headline claims are prefill/TTFT claims, no decode-speed claim. NOT GateSkip: the OpenReview/ICLR-2026 GateSkip paper (\"What Layers When,\" Laitenberger et al., HU Berlin/UvA/UT Nuremberg, arXiv 2510.13876) is a different work by different authors — residual gates for token-wise layer skipping (15–50% FLOP savings), uncited here.",
  "body": "",
  "notes": "Discovery: Hudson shared @lianapatel_'s launch thread 2026-10-21 (\"Token-Gated Language Models … conditional computation over a new scaling axis: context tokens\"). Claim hygiene: the \"up to 11×\" is the range top on NIAH retrieval — the most prunable task — at accuracy matched to the fine-tuned model; the cross-task range is 1.4–11.3× and RepoBench is 3.9×. \"No accuracy degradation\" is measured against the LoRA-adapted full-context model, not the raw base — task adaptation itself lifts raw-base accuracy substantially (RepoBench ES 0.285→0.587, BioDEX F1 0.056→0.284 unpruned), so don't conflate the adaptation gain with the pruning result; at matched adaptation, pruning to K=2000 costs little (RepoBench 0.587→0.550). Evidence scale is small: 1.7B/2B models, ≤16k training contexts, 128k shown only as NIAH extrapolation; no limitations section; first-party results only. Relevance: (1) a third conditional-compute axis — tokens, alongside MoE's parameters and MoD/GateSkip's depth; prefill-side, so it complements rather than competes with #91 JetSpec++ (decode) and #75 LoopQuant (weights). (2) Hudson's stack: the paper's hybrid is a Gated-DeltaNet hybrid, not SWA — but two points transfer: the gate works inside layers with no global attention scores (the property that blocks heuristic pruners, shared by sliding-window layers), and the kernel is FlashAttention-based. His standing note applies in reverse: DeltaNet isn't faster than his Transformer baseline below 16k in his stack, and TokenGate's hybrid numbers are ≤16k at 2B — treat the 7.8× as directional. (3) LOTUS angle: Patel's semantic data processing runs long documents through LLMs where prefill is the cost; TokenGate's prune-the-document/never-the-question split is exactly the LOTUS operator shape — the serving-side complement to her data systems. | License: paper CC BY 4.0 (verified); code Apache-2.0 (verified)",
  "url": "https://arxiv.org/abs/2610.26754",
  "links": [],
  "authors": [
    "Liana Patel",
    "Rishabh Ranjan",
    "Carlos Guestrin — Stanford University",
    "Ion Stoica",
    "Matei Zaharia — UC Berkeley. (Patel: LOTUS/ACORN/DeepScholar data-systems line",
    "Zaharia/Stoica orbit.)"
  ],
  "tags": [],
  "topics": "",
  "venue": "arXiv cs.CL preprint v1, submitted 19 Oct 2026 (no venue stated)",
  "publisher": "",
  "source": "arxiv",
  "language": "en",
  "access": "free",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-10-21T00:00:00.000Z",
  "verified_at": "2026-10-21T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "channel": "Hudson",
    "legacy_paper_id": "1737"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-11-01T12:56:26.833Z",
  "updated_at": "2026-11-01T12:56:26.833Z",
  "page": "https://papers.projxon.ai/entries/1430",
  "markdown": "https://papers.projxon.ai/entries/1430.md",
  "api": "https://papers.projxon.ai/api/entries/1430",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 851,
      "kind": "paper",
      "title": "Harness Learning Enables Generalizable Test-Time Adaptation",
      "summary": "Introduces harness learning: instead of updating model weights at test time, train a proposer model to revise the solver's executable harness — the program organizing model calls, tool use, and information flow — using execution feedback. Framed as meta-learning over executable programs, with harness revisions playing the role of weight updates; the proposer is trained with RL using revised harnesses' task performance as reward, and candidate harnesses run under a frozen solver. On 21 unseen Reasoning Gym families, SFT followed by RL raises mean single-revision score from 0.32 (base proposer) to 0.62, and the trained 4B proposer beats its 35B teacher on average. A QA proposer trained with RL only on HotpotQA transfers to MuSiQue and 2WikiMultihopQA, with ten revision rounds nearly doubling exact match. Policies trained on single revisions keep improving harnesses over multiple rounds, suggesting harness design can become a reusable adaptation skill.",
      "url": "https://arxiv.org/abs/2609.35738",
      "authors": [
        "Alvin Zhang",
        "Xuecheng Liu",
        "Zixuan Wang",
        "Fahim Tajwar",
        "Daman Arora",
        "Ruslan Salakhutdinov",
        "Daniel Khashabi",
        "Yuda Song",
        "Andrea Zanette"
      ],
      "tags": [
        "harness-learning",
        "harness-optimization",
        "test-time-adaptation",
        "meta-learning",
        "proposer-model",
        "execution-feedback",
        "reasoning-gym",
        "hotpotqa",
        "musique",
        "continual-learning-agents"
      ],
      "venue": "arXiv:2609.35738 (cs.CL), submitted 28 Sep 2026",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-01T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/851",
      "markdown": "https://papers.projxon.ai/entries/851.md",
      "api": "https://papers.projxon.ai/api/entries/851"
    },
    {
      "id": 1092,
      "kind": "post",
      "title": "Introducing Adapt-1 Preview: A Pretraining-Free Substrate for Test-Time Learning",
      "summary": "Rei Labs HTML report dated Aug 6, 2026. Core is not a language model: applications declare a Domain (admissible observations, alternatives, outcomes, prediction targets, evidence gates); Core maintains persistent composite state (episodes, Hebbian associations, hypergraphs, induced rules, policy/transition posteriors, latent regimes) with outcome-gated updates. LLM/vision models may supply typed evidence or consume state; they do not own learning. Controlled prequential stream (10 seeds x 900 events): structural Adapt-1 mean balanced accuracy 0.760 / kappa 0.520 vs Adaptive Random Forest 0.725 / 0.451. External evals from a clean Core with no offline task training include POPGym HigherLowerHard, frozen RoboSpatial-Home, and BOP-Ask-core. Formal academic paper promised later. Preview app + API; GitHub replication artifacts, no LICENSE file.",
      "url": "https://reilabs.org/blog/introducing-adapt-1-preview",
      "authors": [
        "Rei Labs (unsigned",
        "GitHub org 0xReisearch",
        "no personal byline)"
      ],
      "tags": [
        "adapt-1",
        "rei-labs",
        "neuro-symbolic",
        "test-time-learning",
        "hopfield-memory",
        "popgym",
        "robospatial",
        "bop-ask",
        "research-preview",
        "vendor-blog"
      ],
      "venue": "Rei Labs",
      "source": "web",
      "license": "",
      "published_year": null,
      "added_at": "2026-09-01T17:39:11.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1092",
      "markdown": "https://papers.projxon.ai/entries/1092.md",
      "api": "https://papers.projxon.ai/api/entries/1092"
    },
    {
      "id": 735,
      "kind": "paper",
      "title": "Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation",
      "summary": "Shares layers across recursion steps and routes individual tokens to different recursion depths, giving adaptive per-token compute: easy tokens get shallow passes, hard tokens recurse deeper. Experiments span 135M-1.7B parameter models.",
      "url": "https://arxiv.org/abs/2507.10524",
      "authors": [
        "Sangmin Bae",
        "Yujin Kim",
        "Reza Bayat",
        "Sungnyun Kim",
        "Jiyoun Ha",
        "Tal Schuster",
        "Adam Fisch",
        "Hrayr Harutyunyan",
        "Ziwei Ji",
        "Aaron Courville",
        "Se-Young Yun"
      ],
      "tags": [
        "architecture",
        "adaptive-compute",
        "recursion",
        "efficiency",
        "pretraining"
      ],
      "venue": "arXiv",
      "source": "arxiv",
      "license": "",
      "published_year": 2025,
      "added_at": "2026-09-29T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 138,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/735",
      "markdown": "https://papers.projxon.ai/entries/735.md",
      "api": "https://papers.projxon.ai/api/entries/735"
    },
    {
      "id": 582,
      "kind": "paper",
      "title": "T-FREE: Tokenizer-Free Generative LLMs via Sparse Representations for Memory-Efficient Embeddings",
      "summary": "T-FREE splits on whitespace/digits/specials, represents each word as n×m hashed character triplets into a v-entry embedding (best v=8k, m=10 at 1B), and trains a multi-label BCE head. Cuts embedding+head params >85% vs a 64k Unigram baseline (1B: 0.84B vs 1.07B params) at competitive 18-benchmark scores. Duplicate-token rate 0% vs 15–35% for BPE/Unigram. Fertility closer to 1.0 across EN/DE/RU/VI/AR than English-centric tokenizers. 3B English→German continual pretrain gains ~5 pp on German HellaSwag/ARC while the Unigram baseline barely moves. Code https://github.com/Aleph-Alpha/trigrams.",
      "url": "https://arxiv.org/abs/2406.19223",
      "authors": [
        "Björn Deiseroth",
        "Manuel Brack",
        "Patrick Schramowski",
        "Kristian Kersting",
        "Samuel Weinbach"
      ],
      "tags": [
        "t-free",
        "tokenizer-free",
        "trigrams",
        "embeddings",
        "aleph-alpha",
        "multilingual",
        "fertility",
        "hash-embeddings"
      ],
      "venue": "arXiv / Aleph Alpha / TU Darmstadt / hessian.AI / DFKI",
      "source": "",
      "license": "CC BY-NC-SA 4.0",
      "published_year": 2024,
      "added_at": "2026-10-01T16:45:06.278Z",
      "has_dataset_profile": false,
      "license_class": "non-commercial",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 11,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/582",
      "markdown": "https://papers.projxon.ai/entries/582.md",
      "api": "https://papers.projxon.ai/api/entries/582"
    },
    {
      "id": 456,
      "kind": "paper",
      "title": "Zero-Mem: Zero-Token Memory Operations for LLM Agents",
      "summary": "Keeps original interaction traces as the source of record and builds two non-generative views: an entity–context graph (spaCy NER, co-occurrence + adjacency, Personalized PageRank) and a temporal hierarchy (turn/window/episode/local). Query routing fuses the views, then deterministic calibration filters and ranks evidence; only the final-QA reader invokes an LLM. On LoCoMo with GPT-4o-mini, average F1 59.15 vs GAM 53.75; HotpotQA 56K–448K also leads. Memory-operation LLM tokens are 0 and latency falls 57.6% vs LightMem. Official code promised after peer review.",
      "url": "https://arxiv.org/abs/2607.29377",
      "authors": [
        "Yilin Xiao",
        "Zhehan Zhu",
        "Yujing Zhang",
        "Jin Chen",
        "Zijin Hong",
        "Luyao Zhuang",
        "Qinggang Zhang",
        "Shengyuan Chen",
        "Xiaocao Ouyang",
        "Lingfei Ren",
        "Xiao Huang"
      ],
      "tags": [
        "agent-memory",
        "zero-token",
        "locomo",
        "hotpotqa",
        "graph-memory",
        "temporal-hierarchy",
        "ppr",
        "bm25",
        "bge-m3"
      ],
      "venue": "arXiv",
      "source": "arxiv",
      "license": "CC BY-NC-SA 4.0",
      "published_year": 2026,
      "added_at": "2026-08-14T16:32:00.000Z",
      "has_dataset_profile": false,
      "license_class": "non-commercial",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 2,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/456",
      "markdown": "https://papers.projxon.ai/entries/456.md",
      "api": "https://papers.projxon.ai/api/entries/456"
    },
    {
      "id": 540,
      "kind": "paper",
      "title": "Continual Learning via Sparse Memory Finetuning",
      "summary": "Replaces one mid-stack FFN with a 1M-slot memory layer (k=32, 4 heads) and finetunes only the top-t slots that are highly accessed on the current batch relative to DCLM pretraining (TF-IDF). On a 1.3B model, TriviaQA 1K fact stream: NaturalQuestions F1 drops 11% vs 89% full finetuning and 71% LoRA at matched target learning; document-stream SimpleQA shows the same Pareto pattern. Naive memory FT and TF-only ranking forget more. No official code on abs.",
      "url": "https://arxiv.org/abs/2510.15103",
      "authors": [
        "Jessy Lin",
        "Luke Zettlemoyer",
        "Gargi Ghosh",
        "Wen-Tau Yih",
        "Aram Markosyan",
        "Vincent-Pierre Berges",
        "Barlas Oğuz"
      ],
      "tags": [
        "sparse-memory-finetuning",
        "continual-learning",
        "catastrophic-forgetting",
        "memory-layers",
        "lora",
        "tf-idf",
        "fair",
        "meta"
      ],
      "venue": "arXiv / Meta FAIR / UC Berkeley",
      "source": "",
      "license": "",
      "published_year": 2025,
      "added_at": "2026-10-01T16:45:05.207Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 21,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/540",
      "markdown": "https://papers.projxon.ai/entries/540.md",
      "api": "https://papers.projxon.ai/api/entries/540"
    }
  ]
}
