Instructions to use samanehs/gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use samanehs/gpt2 with KerasHub:
import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://samanehs/gpt2") - Keras
How to use samanehs/gpt2 with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://samanehs/gpt2") - Notebooks
- Google Colab
- Kaggle
Commit History
-
keras-hub migration (#1)
Verified signature- keras hub migration (b878dd8f540e8812294164dbe5778fb6f2ab8b4d) Co-authored-by: Martin Görner <martin-gorner@users.noreply.huggingface.co>43eb5c3
-
Upload folder using huggingface_hub
Verified signature9e30b5f -
manual edit
Verified signatured5cb661 -
Upload folder using huggingface_hub
Verified signaturea5a6878 -
initial commit
Verified signatureac77c8e