# guillaume-be/rust-bert

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

Repository: https://github.com/guillaume-be/rust-bert
Canonical: https://ross.abutalabs.com/products/rust-bert
Homepage: https://docs.rs/crate/rust-bert
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: deep-learning, nlp, transformer, bert, rust-lang, rust, machine-learning, ner, sentiment-analysis, question-answering, language-generation, gpt-2, roberta, gpt, bart, electra, translation
Last push: 2026-01-13T19:54:39+00:00

## Health v2 (maintenance only)
Score: 60/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 62, release rhythm 35, longevity 100
- inputs: {"age_days": 2412, "days_push": 232, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3076, forks 249 (observed 2026-08-28T04:07:41.766667+00:00)

## What it is
A Rust-native library providing ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT-2, RoBERTa, BART, etc.), ported from Hugging Face's Transformers. It supports multi-threaded tokenization, GPU inference via tch-rs or ONNX Runtime, and tasks like question answering, NER, translation, summarization, and text generation.

## Use cases
- run bert inference in rust
- named entity recognition without python
- question answering pipeline in rust
- translate text with a rust library
- summarize documents in rust
- generate text with gpt-2 in rust
- compute sentence embeddings in rust
- sentiment analysis in a rust application

## When to choose
- you need transformer-based NLP in a Rust program without a Python dependency
- you want GPU-accelerated or ONNX-based inference natively in Rust
- you need ready-made pipelines for common tasks like QA, NER, or translation

## When to avoid
- you need the latest models or the full Hugging Face ecosystem, which Python Transformers covers better
- you want to train or fine-tune models rather than run inference
- you need LLM-scale generative models beyond the supported transformer architectures

## Facets
- artifact type: library
- maturity: active
- function: nlp, machine-learning, deep-learning, transformers, llm-inference
- domain: machine-learning, deep-learning
- platform: rust, windows
- tags: bert, gpt-2, hugging-face-transformers, named-entity-recognition, sentiment-analysis, question-answering, translation, summarization, sentence-embeddings, onnx, libtorch, natural-language-processing, linux, macos, gpu

## Member repositories
- guillaume-be/rust-bert (main) score 60

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:41.766667+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:27:55.148556+00:00, confidence not recorded.
  - readme: https://github.com/guillaume-be/rust-bert (fetched 2026-08-28T04:07:41.766667+00:00, sha ff78af8a05f1)
  - homepage: https://docs.rs/crate/rust-bert (fetched 2026-08-29T09:43:16.408791+00:00, sha 0d20547ee191)
  - site_page: https://docs.rs/ (fetched 2026-08-29T09:43:16.419048+00:00, sha e44293712cec)
  - site_page: https://docs.rs/crate/rust-bert/latest/features (fetched 2026-08-29T09:43:16.420989+00:00, sha a1322ab1fa8d)
  - site_page: https://docs.rs/about (fetched 2026-08-29T09:43:16.422611+00:00, sha 29ab7986fbf5)
  - site_page: https://docs.rs/about/badges (fetched 2026-08-29T09:43:16.424268+00:00, sha 6588cac258af)
  - site_page: https://docs.rs/about/builds (fetched 2026-08-29T09:43:16.425805+00:00, sha 811231ca4680)
  - site_page: https://docs.rs/about/metadata (fetched 2026-08-29T09:43:16.427502+00:00, sha 0dcdccb2b2b2)
  - site_page: https://docs.rs/about/redirections (fetched 2026-08-29T09:43:16.429400+00:00, sha 1b1efd93105f)
  - site_page: https://docs.rs/about/download (fetched 2026-08-29T09:43:16.431203+00:00, sha 6793b0ab6541)
- Data as of 2026-08-30T08:39:29.467469+00:00.
