bhavnicksm
i just had a tiny nerd snipe thinking about why models tokens are priced a certain way.
tldr: its very complicated.
but wanted to suggest an alternate reality to the one we live in, maybe one where we can have fixed magins on costs.
Hope you like the read! :)
This is pretty cool~ Thanks for suggesting this, I will read this in detail and add it to the next (0.5.0) release of memchunk.
Show HN: Catsu: A unified Python client for embedding APIs
We open-sourced catsu, a Python client for embedding APIs.The problem: every embedding provider has a different SDK with different bugs. OpenAI has undocumented token limits. VoyageAI's retry logic was broken until September. Cohere breaks downstream libraries every release. LiteLLM's embedding support is minimal.catsu provides:- One API for 11 providers (OpenAI, Voyage, Cohere, Jina, Mistral,...
Right now, some things are somewhat hard-coded to be Cloudflare compatible. If someone's willing, you can just deploy this without Cloudflare, but you'd need to dig into the code a little.
In the future releases, I'll make it possible to host it on VPCs and release a Dockerfile along with it, so that should help a little.
Thanks for checking the project out!
I couldn't find the right words to describe this, in comparison to something like Github Gist. I suppose "Own-your-data" since the D1 db generated is yours completely.
Happy to change the branding to be more reflective of this!
Show HN: Pbnj – A minimal, self-hosted pastebin you can deploy in 60 seconds
I'm sure folks here have seen pastebins a thousand times. There's no innovation left in this space – and that's kind of the point.When I wanted to self-host a pastebin, every option I found was too much. Git-based version control, OAuth, elaborate admin panels. I just wanted something I could deploy in under a minute with a CLI that actually works.So I built pbnj (yes, like the sandwich).What...
I hope that you will stick with Chonkie for the journey of making the 'perfect' chunking library!
Thanks again!
Is that what you meant?
Algorithmically, there's not much difference in TokenChunking between Chonkie and LangChain or any other TokenChunking algorithm you might want to use. (except Llamaindex, I don't know what mess they made for 33x slower algo)
If you only want TokenChunking (which I do not recommend completely), better than Chonkie or LangChain, just write your own for production :) At least don't install 80MiB packages for TokenChunking, Chonkie is 4x smaller than them.
That's just my honest response... And these benchmarks are just the beginning, future optimizations on SemanticChunking which would increase the speed-up from the current 2nd (2.5x right now) to even higher.
Thanks for responding, I'll try to make it easier to use something like that in Chonkie in the future!
Memory footprint of the chunking itself would vary widely based on the dataset, and it's not something we tested on... usually other providers don't test it either, as long as it doesn't bust up the computer/server.
If saving memory during runtime is important for your application, let me know! I'd run some benchmarks for it...
Thanks!
But, it's on the roadmap, so please hold on!
Show HN: Chonkie – A Fast, Lightweight Text Chunking Library for RAG
https://github.com/bhavnicksm/chonkie
I built Chonkie because I was tired of rewriting chunking code for RAG applications. Existing libraries were either too bloated (80MB+) or too basic, with no middle ground.Core features:- 21MB default install vs 80-171MB alternatives- 33x faster token chunking than popular alternatives- Supports multiple chunking strategies: token, word, sentence, and semantic- Works with all major tokenizers...