Repository navigation
feat: Adaptive Batch Processing for Large Codebases - #1
Merged
Merged
Conversation
Major performance improvements for local LLM processing: - Adaptive chunking with token-aware sizing for different model context limits - Batch processing: 3-5 chunks per LLM call (60-80% fewer API calls) - Progress persistence with resume capability (.rknowledge_progress.json) - Smart document selection for large codebases (100+ docs) - Automatic context overflow detection and retry with smaller chunks - Optimized Ollama provider with connection pooling and better timeout handling Implements: - src/parser/adaptive_chunker.rs - Token estimation and context-aware chunking - src/llm/adaptive_processor.rs - Overflow detection and retry logic - src/llm/batch_processor.rs - Batch processing and document selection - OLLAMA_OPTIMIZATION.md - Documentation and usage guide Tested with llama3.2 on 389-document codebase (17MB).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds major performance optimizations for processing large codebases with local LLMs (Ollama).
Key Features
🚀 Batch Processing (5x Speedup)
🔄 Resume Capability
📚 Smart Document Selection
🧠 Adaptive Context-Aware Processing
Files Added
Files Modified
Testing
Performance Impact
Security Check
Ready for review! 🎉