Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Long Context Python Packages

Python packages with the GitHub topic long-context. Sorted by monthly downloads, with stars and forks.
rajveer43
veloxquant-mlx

Fast KV-cache quantization for Apple Silicon (MLX) — 43 research-adapted compression methods with Metal kernels

19K 37 11
smartfind
loop-memory

Local-first, agent-agnostic memory system that closes the agent loop on any AI agent. Watches any agent's transcript directory on disk and distils long sessions into a curated wiki that re-injects into the next turn. Out of the box: hooks for Codex / Claude / Hermes / OpenClaw; SDK + generic watcher CLI for the rest.

4K 2 0
lucidrains
ring-attention-pytorch

Implementation of 💍 Ring Attention, from Liu et al. at Berkeley AI, in Pytorch

3K 549 36
kapildhinwa2010-dev
fluidlayer

A bounded memory layer for language models, with exact recall for retained token IDs. NumPy core; optional PyTorch adapter.

2K 4 0
lucidrains
megabyte-pytorch

Implementation of MEGABYTE, Predicting Million-byte Sequences with Multiscale Transformers, in Pytorch

2K 659 55
sumitnemade
longloom

Weave documents of any length through LLM map/merge/repair — any LLM, any storage, measured no-loss

2K 0 0
426ai
forkreduce

Share one long context across many LLM queries: cached prefix, parallel forks, semantic reduce. Built on Pydantic AI.

1K 2 0
lucidrains
recurrent-memory-transformer-pytorch

Implementation of Recurrent Memory Transformer, Neurips 2022 paper, in Pytorch

870 426 20
lucidrains
infini-transformer-pytorch

Implementation of Infini-Transformer in Pytorch

866 112 4
compactbench
compactbench

Open benchmark for LLM context compaction methods — measures what survives when you replace conversation history with a compacted artifact. Multi-cycle drift, hidden ranked set.

824 11 2
IonDen
mlx-train-perf

Logit-free cross-entropy, sequence packing, Qwen 3.5 GatedDelta training and a RAM-fit planner for MLX LoRA fine-tuning

652 6 1
zamax14
laya-finetune

Fine-tune Laya, the open System One decision model, for any typed-decision task: synthetic data, RLCD, calibration and long context.

560 7 0
AetherAI3
aether-context

Unlimited Context — virtual memory for an LLM's attention. Local-first, numpy-only core.

524 54 9
VectifyAI
pageindex-condb

ConDB: The KV-Cache Native Context Database

340 71 10
yuplin2333
mcp-long-context-reader

An MCP server for overcoming context window limitations when processing extensive documents.

285 5 1
teilomillet
kvfit

Will a Hugging Face LLM fit your GPU or DGX? Plan weights, KV cache or recurrent state, context, TP/DP, and measured calibration

272 0 0
tina4stack
tina4-groundwire

Groundwire: a retrieval + verification layer that grounds an LLM in your own source. Off-GPU corpus, only the top-k reaches the model. Ships a long-context NIAH recall harness.

265 1 0
mo-tunn
tokenpack-rag

Query-aware semantic chunk selection under LLM context-window budgets.

252 14 0
lucidrains
perceiver-ar-pytorch

Implementation of Perceiver AR, Deepmind's new long-context attention network based on Perceiver architecture, in Pytorch

243 95 5
forhaoliu
ringattention

RingAttention for Transformers with Arbitrarily Large Context.

236 778 52
B4K2
recall-bench

Zero-shot long-range recall benchmark for genomic language models

188 0 0
skindeepai
ctxkeeper

An OpenAI-compatible proxy that lets an agent keep working far past the model's context window: notes, an archive and a recall tool

164 0 0
nilsperssonsuorra
nearlossless-context

Training-free long-context KV compression under fixed VRAM

151 0 0
cultwlpbmx
three-layer-agent-memory

A filesystem-native, version-controllable long-memory paradigm for AI agents. Surface/Middle/Deep layers + recall/writeback/consolidate protocol. Pure Markdown, zero infra, drives agent self-evolution.

151 1 0
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology