KerasKeras 3 API documentationKerasNLPPretrained ModelsGPT2GPT2Original Link : https://keras.io/api/keras_nlp/models/gpt2/Last Checked at : 2024-11-26GPT2Tokenizer GPT2Tokenizer classfrom_preset methodGPT2Backbone model GPT2Backbone classfrom_preset methodtoken_embedding propertyGPT2CausalLM model GPT2CausalLM classfrom_preset methodgenerate methodbackbone propertypreprocessor propertyGPT2CausalLMPreprocessor layer GPT2CausalLMPreprocessor classfrom_preset methodgenerate_preprocess methodgenerate_postprocess methodtokenizer property