bojone/bert4keras
A lightweight Keras reimplementation of BERT and transformer models with support for fine-tuning and pretraining.

Velocity · 7d
+2.2
★ / day
Trend
→steady
star history
This project provides a clean, lightweight implementation of transformer models (BERT, RoBERTa, ALBERT) built on Keras. It supports loading pretrained weights for fine-tuning, implements necessary attention masks for language modeling and seq2seq tasks, and includes complete pretraining code supporting TPU and multi-GPU setups. The library is compatible with both Keras and tf.keras backends.