Discover and explore top open-source AI tools and projects—updated daily.
Ayanami1314Context pruning for coding agents
Top 98.2% on SourcePulse
SWE-Pruner addresses the challenge of high token costs and latency in Large Language Model (LLM) agents for software development by introducing a novel, task-aware context pruning mechanism. It targets engineers and researchers building or utilizing coding agents, offering significant token savings and reduced latency without compromising the preservation of critical code details. The primary benefit is enabling more efficient and cost-effective LLM-driven software engineering workflows.
How It Works
SWE-Pruner employs a two-step, task-aware approach to context compression. First, it formulates explicit, task-specific goals to guide the pruning process, moving beyond generic metrics like perplexity. Second, it utilizes a lightweight, 0.6B neural skimmer model to dynamically select and preserve semantically critical lines of code. This method ensures that essential implementation details and logical structures are retained, mimicking how human programmers selectively focus on relevant code sections.
Quick Start & Requirements
The project utilizes uv for dependency management. Detailed installation instructions are available within subfolder READMEs. Models are tracked via git lfs and can be downloaded directly from Hugging Face (https://huggingface.co/ayanami-kitasan/code-pruner) or via the provided tutorial. Training scripts recommend Slurm with at least 4 GPUs. An inference tutorial is available for local setup.
Highlighted Details
Maintenance & Community
The project shows recent activity with updates in March 2026. Acknowledgements include the Bytedance Douyin Team and Alibaba Qwen Team. A Notion blog detailing technical approaches is available. No direct community channels like Discord or Slack were specified in the README.
Licensing & Compatibility
The project is licensed under the MIT license. This permissive license generally allows for commercial use and integration into closed-source projects without significant restrictions.
Limitations & Caveats
Training code and certain evaluation benchmarks (SWEQA) are marked as "coming soon," indicating ongoing development. Direct cloning via git may be cumbersome due to large model files managed by git lfs; downloading from Hugging Face is recommended. The project appears to be based on recent research (2026 paper).
5 days ago
Inactive