← all repositories

MuQiuJun-AI/bert4pytorch

A lightweight PyTorch reimplementation of BERT with Chinese comments and support for BERT family models like ALBERT, T5, NEZHA, and ELECTRA.

416 stars Python Language Models
bert4pytorch
Not currently ranked — collecting fresh signals.
star history

This repository provides a clean, lightweight implementation of BERT in PyTorch with detailed Chinese comments for easy modification. It supports masked language modeling (MLM), sequence classification, and implements advanced training techniques such as adversarial training (FGM), focal loss, and label smoothing cross-entropy. The codebase follows the API structure of bert4keras and supports various BERT-family architectures.

Frequently asked

What is MuQiuJun-AI/bert4pytorch?
A lightweight PyTorch reimplementation of BERT with Chinese comments and support for BERT family models like ALBERT, T5, NEZHA, and ELECTRA.
Is bert4pytorch open source?
Yes — MuQiuJun-AI/bert4pytorch is an open-source project tracked on heatdrop.
What language is bert4pytorch written in?
MuQiuJun-AI/bert4pytorch is primarily written in Python.
How popular is bert4pytorch?
MuQiuJun-AI/bert4pytorch has 416 stars on GitHub.
Where can I find bert4pytorch?
MuQiuJun-AI/bert4pytorch is on GitHub at https://github.com/MuQiuJun-AI/bert4pytorch.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.