Instructions to use JIN223/gpt2_imdb with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- KerasHub
How to use JIN223/gpt2_imdb with KerasHub:
import keras_hub # Load CausalLM model (optional: use half precision for inference) causal_lm = keras_hub.models.CausalLM.from_preset("hf://JIN223/gpt2_imdb", dtype="bfloat16") causal_lm.compile(sampler="greedy") # (optional) specify a sampler # Generate text causal_lm.generate("Keras: deep learning for", max_length=64)import keras_hub # Create a Backbone model unspecialized for any task backbone = keras_hub.models.Backbone.from_preset("hf://JIN223/gpt2_imdb") - Keras
How to use JIN223/gpt2_imdb with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://JIN223/gpt2_imdb") - Notebooks
- Google Colab
- Kaggle
- Xet hash:
- 43ddd62d536800b4e4e7fd3d173732726ebe561d0e2c47eacfa3fd387e306b3d
- Size of remote file:
- 498 MB
- SHA256:
- e09148ceee1b8d2edb3aacd7555af35d26830b17bd6a45dbea26ff4686acef46
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.