#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.

Stars
1.3k
License
MIT
Last commit
May 2026
Last release
May 2026
Language
Python
Stars, last 29 weeks+5
6 May 2026: 1,318 stars13 May 2026: 1,318 stars20 May 2026: 1,319 stars27 May 2026: 1,319 stars3 Jun 2026: 1,320 stars10 Jun 2026: 1,320 stars17 Jun 2026: 1,320 stars24 Jun 2026: 1,320 stars1 Jul 2026: 1,320 stars8 Jul 2026: 1,320 stars15 Jul 2026: 1,320 stars22 Jul 2026: 1,320 stars29 Jul 2026: 1,320 stars5 Aug 2026: 1,320 stars12 Aug 2026: 1,320 stars19 Aug 2026: 1,320 stars26 Aug 2026: 1,321 stars2 Sept 2026: 1,321 stars9 Sept 2026: 1,321 stars16 Sept 2026: 1,321 stars23 Sept 2026: 1,321 stars30 Sept 2026: 1,321 stars7 Oct 2026: 1,321 stars14 Oct 2026: 1,321 stars21 Oct 2026: 1,322 stars28 Oct 2026: 1,323 stars4 Nov 2026: 1,323 stars11 Nov 2026: 1,323 stars18 Nov 2026: 1,323 stars25 Nov 2026: 1,323 stars

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
Also in ML frameworks and libraries
RankProjectScore
#373robosatPipeline for extracting buildings and roads from satellite imagery as GeoJSON2.1k starsMIT25 out of 100
#374pytorch_scatterPyTorch extension for scatter and segment reduce operations1.7k starsMIT25 out of 100
#376neural-structured-learningTensorFlow library for training neural networks with graph and adversarial signals1k starsApache-2.025 out of 100
#377lightwoodAutoML framework that generates ML pipelines from a declarative JSON-AI spec515 starsGPL-3.025 out of 100
#378transmogrifaiScala AutoML library on Apache Spark for structured data2.3k starsBSD-3-Clause24 out of 100