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