SmartChunk: CPU-only document chunk enrichment with zero API calls

I wanted a document chunking tool for my local RAG setup that doesn't phone home to OpenAI. Built one. Free mode (zero network calls): - Recursive, semantic, and heading-based chunking - Regex entity extraction (money, dates, emails, orgs) - TF-IDF keyword extraction - Parent context tracking - Previous/next chunk linking - Boundary quality scoring What you need: - Python 3.9+ - sentence-transformers (~80MB, for semantic mode) - PyMuPDF (for PDFs) - CPU only. No CUDA. No API key. Benchmarks on my homelab (i5-10400, 16GB RAM): - 50-page PDF: ~3 seconds (heuristic mode) - Memory peak: ~400MB Optional LLM mode: Plug in gpt-4o-mini or Ollama via LiteLLM. But the free mode is good enough for 80% of queries. MIT license. Local-first by design. Repo in comments.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论