gpt2 / README.md
IMvision12's picture
Upload folder using huggingface_hub
45728fd verified
|
Raw
History Blame Contribute Delete
731 Bytes
---
pipeline_tag: text-generation
license: mit
base_model: openai-community/gpt2
library_name: kerasformers
tags:
- keras
- kerasformers
- text-generation
- gpt2
- pytorch
- jax
- tf
---
# gpt2
Pure-Keras 3 GPT2 weights for [kerasformers](https://github.com/IMvision12/KerasFormers), converted from [openai-community/gpt2](https://huggingface.co/openai-community/gpt2).
## Usage
```python
from kerasformers.models.gpt2 import GPT2Generate, GPT2Tokenizer
model = GPT2Generate.from_weights("kerasformers/gpt2")
tokenizer = GPT2Tokenizer.from_weights("kerasformers/gpt2")
ids = tokenizer("The meaning of life is")
print(model.generate(ids, max_length=40))
```
License: **mit**, inherited from the upstream source.