{"by":"hessdalenlight","descendants":35,"id":43652968,"kids":[43673635,43671297,43672718,43671086,43672904,43671108,43673599,43671099,43672628,43671492,43671855,43674901,43673143,43672388,43672657,43671018,43673634,43672799],"score":169,"text":"TLDR: I’ve made a transformer model and a wrapper library that segments text into meaningful semantic chunks.<p>The current text splitting approaches rely on heuristics (although one can use neural embedder to group semantically related sentences).<p>I propose a fully neural approach to semantic chunking.<p>I took the base distilbert model and trained it on a bookcorpus to split concatenated text paragraphs into original paragraphs. Basically it’s a token classification task. Model fine-tuning took day and a half on a 2x1080ti.<p>The library could be used as a text splitter module in a RAG system or for splitting transcripts for example.<p>The usage pattern that I see is the following: strip all the markup tags to produce pure text and feed this text into the model.<p>The problem is that although in theory this should improve overall RAG pipeline performance I didn’t manage to measure it properly. Other limitations: the model only supports English for now and the output text is downcased.<p>Please give it a try. I&#x27;ll appreciate a feedback.<p>The Python library: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;mirth&#x2F;chonky\">https:&#x2F;&#x2F;github.com&#x2F;mirth&#x2F;chonky</a><p>The transformer model: <a href=\"https:&#x2F;&#x2F;huggingface.co&#x2F;mirth&#x2F;chonky_distilbert_base_uncased_1\" rel=\"nofollow\">https:&#x2F;&#x2F;huggingface.co&#x2F;mirth&#x2F;chonky_distilbert_base_uncased_...</a>","time":1744373919,"title":"Show HN: Chonky – a neural approach for text semantic chunking","type":"story","url":"https://github.com/mirth/chonky"}