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
manual edit
Browse files
README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
| 2 |
library_name: keras-nlp
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
---
|
|
|
|
|
|
|
| 5 |
This is a [`GPT2` model](https://keras.io/api/keras_nlp/models/gpt2) uploaded using the KerasNLP library.
|
| 6 |
This model is related to a `CausalLM` task.
|
| 7 |
|
|
|
|
| 2 |
library_name: keras-nlp
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
---
|
| 5 |
+
** This Model Card has been manually edited **
|
| 6 |
+
|
| 7 |
This is a [`GPT2` model](https://keras.io/api/keras_nlp/models/gpt2) uploaded using the KerasNLP library.
|
| 8 |
This model is related to a `CausalLM` task.
|
| 9 |
|