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
22•Tananon•3h 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•27m 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•14m 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•22m ago
Surprised it is so much faster. I would have thought the python one is C under the hood
Tananon•11m 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.

The Fall of Roam

https://every.to/superorganizers/the-fall-of-roam
1•ingve•4m ago•0 comments

Gen Z Loves China, and Nobody Knows Why [video]

https://www.youtube.com/watch?v=vonCsR-Jnko
1•toomuchtodo•4m ago•0 comments

Ask HN: What salutation do you use at townhalls?

1•jjmarr•6m ago•0 comments

What Is the Difference Between a Block, a Proc, and a Lambda in Ruby? (2013)

https://blog.awaxman.com/what-is-the-difference-between-a-block-a-proc-and-a-lambda-in-ruby
1•Tomte•7m ago•0 comments

What is the deal with NULLs? (2009)

http://thoughts.davisjeff.com/2009/08/02/what-is-the-deal-with-nulls/
1•Tomte•7m ago•0 comments

Traffic Enforcement Dwindled in the Pandemic. In Many Places, It Hasnt Come Back

https://www.nytimes.com/interactive/2024/07/29/upshot/traffic-enforcement-dwindled.html
3•Michelangelo11•10m ago•0 comments

Breaking the Sorting Barrier for Directed Single-Source Shortest Paths

https://arxiv.org/abs/2504.17033
1•thomasahle•12m ago•0 comments

Noyb sends Meta 'cease and desist' letter over AI training

https://noyb.eu/en/noyb-sends-meta-cease-and-desist-letter-over-ai-training-european-class-action-potential-next-step
3•sarnowski•13m ago•0 comments

What Your Brain Looks Like When You Solve a Problem

https://gizmodo.com/this-is-what-your-brain-looks-like-when-you-solve-a-problem-2000602759
3•WarOnPrivacy•15m ago•0 comments

Why does advice work so poorly?

https://greyenlightenment.com/2025/05/16/why-does-advice-work-so-poorly/
2•paulpauper•15m ago•0 comments

Are We at the End of Science Fiction? (2017)

https://writersofthefuture.com/are-we-at-the-end-of-science-fiction/
2•jslakro•16m ago•0 comments

No one seems to know if AI will take our jobs or make us productive superstars

https://www.businessinsider.com/ai-replace-jobs-or-increase-worker-productivity-2025-5
3•rntn•16m ago•1 comments

Grok's 'white genocide' responses show gen AI tampered with 'at will'

https://www.cnbc.com/2025/05/17/groks-white-genocide-responses-show-gen-ai-tampered-with-at-will.html
8•zhengiszen•16m ago•1 comments

Kerrisdale Capital on D-Wave Quantum (QBTS)

https://www.kerrisdalecap.com/investments/qbts/
1•marbu•18m ago•0 comments

Ask HN: Extract text and translate on every PR

1•danielandrews43•18m ago•0 comments

Google fixes high severity Chrome flaw with public exploit

https://www.bleepingcomputer.com/news/security/google-fixes-high-severity-chrome-flaw-with-public-exploit/
6•akyuu•23m ago•0 comments

You are invited to the AEGIS waiting list

https://www.earlyaccesshq.com/p/aegis
1•yessGlory•25m ago•0 comments

Putting Scaffolding Around Vibe Coding to Build More Complex Apps

https://www.robinlinacre.com/structured_vibe_coding/
1•RobinL•29m ago•0 comments

Show HN: Claude Code in the Cloud is better than CodeX

https://cloudcoding.ai/
1•sean_•31m ago•0 comments

Ask HN: How can we get close to Full Dive VR?

1•babuloseo•34m ago•0 comments

I Learned to Stop Worrying and Love Building My Own Solar System

https://medium.com/@joe_5312/pg-e-sucks-or-how-i-learned-to-stop-worrying-and-love-building-my-own-solar-system-acf0c9f03f3b
1•JKCalhoun•34m ago•0 comments

Xiaomi's XRing 01 SoC leaked – 10-core Arm Cortex CPU plus 16-core Mali G925 GPU

https://www.tomshardware.com/pc-components/cpus/xiaomis-in-house-xring-01-soc-leaked-melds-10-core-arm-cortex-cpu-plus-16-core-mali-g925-gpu
1•rbanffy•36m ago•0 comments

The Chores Rota (#3 in the `Itertools` Series • `Cycle()` and Combining Tools)

https://www.thepythoncodingstack.com/p/itertools-cycle-and-iterator-algebra-the-chores-rota-3-in-the-itertools-series
1•rbanffy•37m ago•0 comments

Show HN: Vibe Coded GitHub PR Bot for Integrating a GitHub Action

https://vetpkg.dev/gha
1•abhisek•38m ago•0 comments

Sell your sass bro – feedback appreciated

https://sellyoursass.idontknowhatimdoing.com/
2•daRepo90•39m ago•0 comments

Built a Job Search AI That Gets Interviews (+How We Got 2M TikTok Views with $0)

https://www.woberry.com/
1•frankvienna•39m ago•1 comments

Europe Built Trains. America Built Highways and Regret.

https://www.nytimes.com/2025/05/18/opinion/europe-train-travel.html
5•mitchbob•40m ago•1 comments

Sci-fi/fantasy books about an ordinary man in extraordinary circumstances

https://shepherd.com/best-books/scifi-fantasy-regular-men-doing-amazing-things
1•bwb•42m ago•0 comments

Next Generation Solar Panels Are Revolutionizing Clean Energy

https://oilprice.com/Alternative-Energy/Renewable-Energy/Next-Generation-Solar-Panels-Are-Revolutionizing-Clean-Energy.html
1•PaulHoule•43m ago•0 comments

The Long Arc of Semiconductor Scaling – By Austin Lyons

https://www.chipstrat.com/p/the-long-arc-of-semiconductor-scaling
1•rbanffy•46m ago•0 comments