Instructions to use kerasformers/gpt2_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasFormers
How to use kerasformers/gpt2_large with KerasFormers:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Keras
How to use kerasformers/gpt2_large with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://kerasformers/gpt2_large") - Notebooks
- Google Colab
- Kaggle
metadata
pipeline_tag: text-generation
license: mit
base_model: openai-community/gpt2-large
library_name: kerasformers
tags:
- keras
- kerasformers
- text-generation
- gpt2
- pytorch
- jax
- tf
gpt2_large
Pure-Keras 3 GPT2 weights for kerasformers, converted from openai-community/gpt2-large.
Usage
from kerasformers.models.gpt2 import GPT2Generate, GPT2Tokenizer
model = GPT2Generate.from_weights("kerasformers/gpt2_large")
tokenizer = GPT2Tokenizer.from_weights("kerasformers/gpt2_large")
ids = tokenizer("The meaning of life is")
print(model.generate(ids, max_length=40))
License: mit, inherited from the upstream source.