The Cybertron Go package provides an interface for NLP technologies and pretrained Transformer models.
rust-bert
Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...).

About rust-bert
rust-bert is a Rust-native library providing pre-trained transformer models and ready-to-use NLP pipelines. It is a port of Hugging Face's Transformers library that uses tch-rs or onnxruntime bindings and pre-processing from rust-tokenizers, and it exposes the model base architecture, task-specific heads and end-to-end pipelines so common tasks can be run in a few lines of code.
Supported tasks include question answering, translation, summarization, multi-turn dialogue, zero-shot classification, sentiment analysis, named entity recognition, part-of-speech tagging, language generation, masked language modeling, sentence embeddings and keyword extraction. Model families covered include BERT, DistilBERT, RoBERTa, GPT, GPT2, GPT-Neo, GPT-J, BART, Marian, MBart, M2M100, NLLB, Electra, ALBERT, T5, LongT5, XLNet, Reformer, ProphetNet, Longformer, Pegasus, FNet, DeBERTa, MobileBERT and others, with each family supporting a subset of tasks. Setup requires the libtorch library, either installed manually or downloaded through the download-libtorch feature flag, and pretrained models are cached locally, with file sizes in the hundreds of megabytes to gigabytes.
Key features
- Ready-to-use pipelines for question answering, translation, summarization and more
- Task coverage includes sentiment analysis, NER, POS tagging and zero-shot classification
- Supports multi-threaded tokenization and GPU inference
- Model families include BERT, DistilBERT, GPT2, BART, T5 and others
- Built on tch-rs or onnxruntime bindings with rust-tokenizers preprocessing
- Optional automatic libtorch download via the download-libtorch feature flag
- Broad task coverage through exposed model architectures, task-specific heads and ready-to-use pipelines
- Supports multi-threaded tokenization and GPU inference
- Port of Hugging Face Transformers with preprocessing from rust-tokenizers
- Requires libtorch, which must be installed manually or downloaded; the CUDA-enabled version is several gigabytes and the first build may take several minutes
- Pretrained language models occupy hundreds of megabytes to gigabytes of local storage
- The libtorch version required when using rust-bert from crates.io may differ from the version documented in the repository
rust-bert at a glance
- Category
- Development › Programming Languages
- Type
- Open-source project
- Pricing
- Not confirmed. Check the site
- Open source
- Yes · Source code
- Language
- English
- Last checked
- Oct 5, 2026 · Online when checked
- Listed
- Oct 5, 2026
rust-bert alternatives
Tools and sites you could use instead, ranked by how closely they match.
The shimmytok project provides a pure Rust GGUF tokenizer compatible with llama.cpp and ready for WebAssembly.
Polyglot provides multilingual text processing tools for natural language processing.
The machinelearn.js project offers machine learning tools for web applications and Node.js.
ML.NET provides an open source, cross platform machine learning framework for .NET applications.
Scalable, Portable and Distributed Gradient Boosting (GBDT, GBRT or GBM) Library.
Popular in Programming Languages
Well-known listings from the same topic.
rust-bert FAQ
What does rust-bert require to build and run?
Where are the pretrained models stored?
Can rust-bert use a GPU?
Tell us and an editor will check it.
Claim the listing and suggest updates yourself. An editor checks every claim first.












