Transformer-based models implemented in tensorflow 2.x(Keras)
Project description
transformers-keras
Transformer-based models implemented in tensorflow 2.x(Keras).
Installation
pip install -U transformers-keras
Models
- Transformer[DELETED]
- Attention Is All You Need.
- Here is a tutorial from tensorflow:Transformer model for language understanding
- BERT
- ALBERT
BERT
All the bert models pretrained by google-research/bert can be loaded:
from transformers_keras import Bert
model = Bert.from_pretrained('/path/to/pretrained/bert/model')
# then, use this model to fine-tune new model as a keras layer, or to do inference
model(model.dummy_inputs())
ALBERT
All the albert models pretrained by google-research/albert can be loaded:
from transformers_keras import Albert
model = Bert.from_pretrained('/path/to/pretrained/albert/model')
# then, use this model to fine-tune new model as a keras layer, or to do inference
model(model.dummy_inputs())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
transformers_keras-0.2.0.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for transformers_keras-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d18ebf01c1af8ad523124bf95f4c73a2efeefc24f59f095ec80cd4602e04bd5 |
|
MD5 | 6d8f2c1b1dff5efc53ff9bb02f5effbe |
|
BLAKE2b-256 | 147ebb806ee57c601a35985583c818800422ae93552682209157ad70bdd92a9f |