HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
guillaume-be
rust-bert
Rust2020–2025
guillaume-be / rust-bert

rust-bert

Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)

5Distinct people
9Mentions
0Explicit recommenders
3.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year9 dated mentions

Observed mentions: 2020-09-20 15:16:04 UTC to 2025-09-23 15:49:57 UTC.

02462020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC606
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC110
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC110

What Hacker News says

9 sources
catlover76·Jan 7, 2024Submission

Ask HN: ML/NLP Ecosystems of Haskell, OCaml, Rust?

What are the respective ecosystems of these languages like for ML/NLP stuff? From what I can tell, the one with the most mature/active ecosystem is Rust. There is both Candle, a PyTorch equivalent, and a lib that (per my understanding) seeks to be 1:1 with the HuggingFace Python Transformers library (https://github.com/guillaume-be/rust-bert). Haskell has HaskTorch, and OCaml has some OCaml thing that for some reason invokes PyTorch under the hood instead of just interfacing with the C++ deps directly. But it looks like there isn't support for doing things like replicating the Transformers library, and similarly maybe not a lot of support for issues and needs I haven't even run into yet (?)
2 points · Open discussion
I'd like to use this transformer model in rust (because it's on the backend, because I can use data munging and it will be faster, and for other reasons). It looks like a good model! But, it doesn't compile on Apple Silicon for wierd linking issues that aren't apparent - https://github.com/guillaume-be/rust-bert/issues/338. I've spent a large part of today and yesterday attempting to find out why. The only other library that I've found for doing this kind of thing programmatically (particularly sentiment analysis) is this (https://github.com/JohnSnowLabs/spark-nlp). Some of the models look a little older, which is OK, but it does mean that I'd have to do this in another language. Does anyone know of any sentiment analysis software that can be tuned (other than VADER - I'm looking for more along the lines of a transformer model) - like BER
Read the rest
T, but is pretrained and can be used in Rust or Python? Otherwise I'll probably using spark-nlp and having to spin another process. Thanks.
In Transformers.js
Not at all, I've got 2 models running free-of-charge on Oracle Cloud right now. Just playing with it locally is completely free, the hardest part is getting your Python environment to work. I wrote mine in Rust and even that isn't super complex. It mostly boils down to defining your settings and feeding it your prompt: https://github.com/guillaume-be/rust-bert/blob/master/exampl... Training is more difficult, but this will be plenty for your purposes I think.
In Ask HN: Could we have stupid AI instead?
Give this a look: https://github.com/guillaume-be/rust-bert https://github.com/guillaume-be/rust-bert/blob/master/exampl... If you have Pytorch configured correctly, this should "just work" for a lot of the smaller models. It won't be a 1:1 ChatGPT replacement, but you can build some pretty cool stuff with it. > it's basically Python or bust in this space More or less, but that doesn't have to be a bad thing. If you're on Apple Silicon, you have plenty of performance headroom to deploy Python code for this. I've gotten this library to work on systems with as little as 2gb of memory, so outside of ultra-low-end use cases, you should be fine.
In Running large language models like ChatGPT on a single GPU
I suspect something similar is possible with ChatGPT. Using the GPT-neo-125m model I've been able to get some really convincing (if lackluster) answers on 4 core ARM hardware and less than 2gb of memory. With enough sampling, you can get legible paragraph-length responses out in less than 10 seconds; that's pretty good for an offline program in my book. I'm using rust-bert to serve it over a Discord bot, similar to one of their examples[0]. It's running on Oracle VCPUs right now, but with dedi hardware and ML acceleration I bet it would scream! [0] https://github.com/guillaume-be/rust-bert/blob/master/exampl...
In Self-hosted Whisper-based voice recognition server for open Android phones
Not as far as I'm aware, but it's probably possible on a smaller, hobbyist scale. I've been playing with a few GPT libraries this week (namely rust-bert[0]) and I've been really impressed with local generation results on my crappy 2 core netbook. I can get 2 sentences to generate in ~5 seconds, which is pretty good in my book. Armed with a Pi-style SBC and your AI library of choice, I bet you could get pretty far implementing some toy-like behavior. Bonus points if you use Whisper for speech-to-text, and double brownie points if you can get an AI voice to read the generation back. [0] https://github.com/guillaume-be/rust-bert/
In Ask HN: Has anyone made a toy that integrates ChatGPT with voice recognition?

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.