#135 · Primary category: Deep Learning Frameworks

bert4torch

belle bert bert4keras bert4torch chatglm large-language-models llama llm named-entity-recognition nlp pytorch relation-extraction seq2seq text-classification transformers

An elegent pytorch implement of transformers

Project last updated:05/16/26

GitHub Stars

1.3K

Forks

166

Contributors

11

License

MIT

Why we included this project

bert4torch reimplements the bert4keras design as a standalone PyTorch library, so you can load and fine-tune transformer models without adopting the full Hugging Face training stack. One uniform API covers classic checkpoints like BERT, RoBERTa, ALBERT, XLNet, ELECTRA, BART and T5 for jobs such as text classification, named-entity recognition and relation extraction, and the same interface can also load open-source LLM weights such as ChatGLM, Llama and BLOOM for inference and light fine-tuning. That is useful if you want a single codebase that moves from small encoder models to larger decoder LLMs. The implementation stays explicit and layer by layer, which makes it easier to read and modify than a black-box wrapper, a real plus for researchers and small teams who want to see what their model actually does. In short, it offers Keras-style training simplicity with PyTorch underneath.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category