← all repositories

bojone/bert4keras

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

5.4k stars Python ML FrameworksLanguage Models
bert4keras
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.

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