This script loads a pretrained GPT-2 language model using KerasHub, applies a preprocessing pipeline, and performs text generation. It sets TensorFlow as the Keras backend and enables mixed-precision for faster inference. After loading the GPT-2 causal language model, it generates a continuation for the given input prompt and prints both the model output and the total time taken.
-
Notifications
You must be signed in to change notification settings - Fork 0
thejunghare/genai
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
A curated collection of Generative AI tools and experiments, including all code, demos, and resources from my GenAI YouTube series.