Skip to content

Add preset for roformerV2 #2324

@pass-lin

Description

@pass-lin

RoFormerV2 is a native Keras-2 model that has never been incorporated into Hugging Face, and its original author (Jianlin Su) did not host the weights on either ModelScope or Hugging Face. Instead, he distributed them only through Chinese Baidu Cloud Drive.
I first upgraded the original bert4keras library (built for Keras 2.3.1) to the Keras-3 compatible bert4keras3 so the RoFormerV2 weights could be loaded.

In short, the existing conversion scripts in tools/ cannot handle RoFormerV2. I therefore manually converted the weights from the bert4keras3 format into the keras-hub format. Could these converted weights be directly added as presets for RoFormer?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions