frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Model2vec-Rs – Fast Static Text Embeddings in Rust

https://github.com/MinishLab/model2vec-rs
45•Tananon•7h ago
Hey HN! We’ve just open-sourced model2vec-rs, a Rust crate for loading and running Model2Vec static embedding models with zero Python dependency. This allows you to embed text at (very) high throughput; for example, in a Rust-based microservice or CLI tool. This can be used for semantic search, retrieval, RAG, or any other text embedding usecase.

Main Features:

- Rust-native inference: Load any Model2Vec model from Hugging Face or your local path with StaticModel::from_pretrained(...).

- Tiny footprint: The crate itself is only ~1.7 mb, with embedding models between 7 and 30 mb.

Performance:

We benchmarked single-threaded on a CPU:

- Python: ~4650 embeddings/sec

- Rust: ~8000 embeddings/sec (~1.7× speedup)

First open-source project in Rust for us, so would be great to get some feedback!

Comments

noahbp•3h ago
What is your preferred static text embedding model?

For someone looking to build a large embedding search, fast static embeddings seem like a good deal, but almost too good to be true. What quality tradeoff are you seeing with these models versus embedding models with attention mechanisms?

Tananon•3h ago
It depends a bit on the task and language, but my go-to is usually minishlab/potion-base-8M for every task except retrieval (classification, clustering, etc). For retrieval minishlab/potion-retrieval-32M works best. If performance is critical minishlab/potion-base-32M is best, although it's a bit bigger (~100mb).

There's definitely a quality trade-off. We have extensive benchmarks here: https://github.com/MinishLab/model2vec/blob/main/results/REA.... potion-base-32M reaches ~92% of the performance of MiniLM while being much faster (about 70x faster on CPU). It depends a bit on your constraints: if you have limited hardware and very high throughput, these models will allow you to still make decent quality embeddings, but ofcourse an attention based model will be better, but more expensive.

Havoc•3h ago
Surprised it is so much faster. I would have thought the python one is C under the hood
Tananon•3h ago
Indeed, I also didn't expect it to be so much faster! I think it's because most of the time is actually spent on tokenization (which also happens in Rust in the Python package), but there is some transfer overhead there between Rust and Python. The other operations should be the same speed I think.

Show HN: I modeled the Voynich Manuscript with SBERT to test for structure

https://github.com/brianmg/voynich-nlp-analysis
241•brig90•5h ago•67 comments

Show HN: Vaev – A browser engine built from scratch (It renders google.com)

https://github.com/skift-org/vaev
77•monax•4h ago•26 comments

Show HN: Python Simulator of David Deutsch’s "Constructor Theory of Time"

https://github.com/gvelesandro/constructor-theory-simulator
25•SandroG•1h ago•3 comments

Show HN: Buckaroo – Data table UI for Notebooks

https://github.com/paddymul/buckaroo
64•paddy_m•6h ago•6 comments

Show HN: Hardtime.nvim – break bad habits and master Vim motions

https://github.com/m4xshen/hardtime.nvim
147•m4xshen•9h ago•56 comments

Show HN: Model2vec-Rs – Fast Static Text Embeddings in Rust

https://github.com/MinishLab/model2vec-rs
45•Tananon•7h ago•4 comments

Show HN: Stack Error – ergonomic error handling for Rust

https://github.com/gmcgoldr/stackerror
16•garrinm•3h ago•6 comments

Show HN: A Wolfenstein3D-like raycaster made in Windows Batch

https://github.com/nTh0rn/batch-raycaster
2•nthornton•43m ago•0 comments

Show HN: A web browser agent in your Chrome side panel

https://github.com/parsaghaffari/browserbee
118•parsabg•10h ago•52 comments

Show HN: Racketmeter – Measure Badminton String Tension Using Sound Frequency

https://www.racketmeter.com/
26•zhacker•4h ago•11 comments

Show HN: Chat with 19 years of HN

https://app.camelai.com/log-in?next=/hn/
114•vercantez•18h ago•82 comments

Show HN: DeepShot – an open-source NBA predictor with ML, EWMA, and live UI

https://github.com/saccofrancesco/deepshot
2•saccofrancesco•1h ago•0 comments

Show HN: Turn any workflow diagram into compilable, running and stateful code

https://workflows.diagrid.io/
95•yaronsc•4d ago•21 comments

Show HN: I built a knife steel comparison tool

https://new.knife.day/blog/knife-steel-comparisons/all
135•p-s-v•1d ago•82 comments

Show HN: Pixelagent – Build your Stateful Agent Framework in 200 lines of code

https://github.com/pixeltable/pixelagent
26•pierrebrunelle•3d ago•14 comments

Show HN: HTML QR Codes (Animated, Interactive, Programmable)

https://qrbrd.com/
4•Ciaranio•6h ago•3 comments

Show HN: Public database of sites for backlinks

https://backlinksitesdb.com
3•zygo•6h ago•0 comments

Show HN: Merliot – plugging physical devices into LLMs

https://github.com/merliot/hub
79•sfeldma•1d ago•23 comments

Show HN: I built a site to binge the best engineering blog posts

https://www.codecrawl.co/
4•shanesnotes•8h ago•0 comments

Show HN: MCP Server for secure code execution (Python, Ruby, C, and more)

https://github.com/taybenlor/runno/tree/main/packages/mcp
3•benno128•8h ago•0 comments

Show HN: I cloned a YC funded app in a day as an MVP

https://ai-tutor.mvpwrappers.com/
23•eashish93•1d ago•7 comments

Show HN: Fahmatrix – A Lightweight, Pandas-Like DataFrame Library for Java

https://github.com/moustafa-nasr/fahmatrix
46•mousomashakel•1d ago•13 comments

Show HN: Solidis – Tiny TS Redis client, no deps, for serverless

https://github.com/vcms-io/solidis
68•jayl-e-e•2d ago•8 comments

Show HN: Visual flow-based programming for Erlang, inspired by Node-RED

https://github.com/gorenje/erlang-red
243•Towaway69•2d ago•101 comments

Show HN: SQL-tString a t-string SQL builder in Python

https://github.com/pgjones/sql-tstring
85•pgjones•2d ago•35 comments

Show HN: Muscle-Mem, a behavior cache for AI agents

https://github.com/pig-dot-dev/muscle-mem
223•edunteman•4d ago•51 comments

Show HN: Rv, a Package Manager for R

https://github.com/A2-ai/rv
75•Keats•2d ago•31 comments

Show HN: Workflow Use – Deterministic, self-healing browser automation (RPA 2.0)

https://github.com/browser-use/workflow-use
68•gregpr07•2d ago•22 comments

Show HN: Real-Time Gaussian Splatting

https://github.com/axbycc/LiveSplat
142•markisus•3d ago•51 comments

Show HN: We created a new protocol and wallet that supports it for Bitcoin

https://akron.io
7•ca98am79•23h ago•1 comments