#375375th of 433 in ML frameworks and libraries
bert4torch
PyTorch library for loading BERT and LLM weights to fine-tune and serve
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts bert4torch on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.bert4torch is on your watch list. Its new releases and problems show there.
- Stars
- 1.3k
- License
- MIT
- Last commit
- May 2026
- Last release
- May 2026
- Language
- Python
1,318 on 6 May 20261,323 on 25 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
bert4torch is a PyTorch library that loads pretrained BERT-family encoders (bert, roberta, albert, nezha, electra, ernie, roformer, ModernBERT) and open LLMs such as chatglm, llama, baichuan and Qwen for fine-tuning and inference. It has a Keras-style fit loop with training tricks, and a `bert4torch serve` command that runs a model in CLI, Gradio or OpenAI-compatible mode. Maintained by one person; latest release is 0.6.2.
Who it is for: PyTorch users fine-tuning BERT-style or open LLM models, especially Chinese NLP
Strengths
- One `serve` command exposes a model as CLI, Gradio web UI or OpenAI-compatible API
- Loads Hugging Face weights by name or local folder with a bert4torch_config.json
- Covers many Chinese BERT variants plus recent LLMs such as Qwen3-moe and qwen3_vl
- Version 0.6.0 added GPTQ and AWQ quantized model support
Weaknesses
- Maintained by one person; the README lists this as a drawback versus transformers
- README is mostly in Chinese
- pip release lags the git version, and some weights need conversion
- Serving is a thin wrapper; no batching or scaling features are described
What it needs
- GPU optional
- Needs torch, Hugging Face Hub (weight download), gradio (web mode), peft (LoRA)
- Models: bert, roberta, albert, nezha, electra
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in ML frameworks and libraries
See all 433| Rank | Project | Score |
|---|---|---|
| #373 | robosatPipeline for extracting buildings and roads from satellite imagery as GeoJSON | 25 out of 100 |
| #374 | pytorch_scatterPyTorch extension for scatter and segment reduce operations | 25 out of 100 |
| #376 | neural-structured-learningTensorFlow library for training neural networks with graph and adversarial signals | 25 out of 100 |
| #377 | lightwoodAutoML framework that generates ML pipelines from a declarative JSON-AI spec | 25 out of 100 |
| #378 | transmogrifaiScala AutoML library on Apache Spark for structured data | 24 out of 100 |