AGI Hunt· devel0mer·· 1 小时前AI 评分49
text-chipper 开源:严格 token 预算,514.3MiB 文件仅增约 56MB 内存
Rust 写 RAG 分块器 text-chipper:严格 token 预算,514MB 文件仅增 56MB 内存
AI 导读
作者发布开源 Rust crate text-chipper,并提供 Python 绑定,用于 RAG 管线文本分块。它严格控制每个 chunk 的 token 数不超过 maxlength,支持 Unicode 字素安全与 Markdown 感知处理。流式处理 514.3MiB 文件仅增加约 56MB 内存,而整读入 Python 字符串再分块约需 4.6GB。
来源:AGI Hunt · agihunt.info