Downloads · 30 days
10
18% of all-time downloads
zeromodels/gpt
gpt is a text generation model from zeromodels. Use it when you need the model to write or continue text. It is set up for zeromodels. The card lists the license as mit.
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/gpt/)
Downloads · 30 days
10
18% of all-time downloads
All-time downloads
57
Public
Repo size
466 MB
Likes
0
Public
Click a slice to open those files.
.h5466 MB · 100%
From the Hugging Face model README
Paper: Improving Language Understanding by Generative Pre-Training (Radford et al., 2018)
GPT (the original GPT-1) is OpenAI's first generative pre-trained transformer: a
12-layer decoder-only model with learned position embeddings (512-token context),
gelu_new activations, and a byte-pair-encoding tokenizer, trained on BookCorpus.
This is the 117M base completion model (no chat template).
For more details, see the upstream model card.
Pure-Keras 3 conversion of openai-community/openai-gpt for
zeromodels. One implementation runs unmodified on
TensorFlow / Torch / JAX.
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from zeromodels.models.gpt import GptTextGenerate, GptTokenizer
model = GptTextGenerate.from_weights("zeromodels/gpt")
tokenizer = GptTokenizer.from_weights("zeromodels/gpt")
inputs = tokenizer("the meaning of life is")
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0]))
KERAS_BACKEND before importing Keras / zeromodels.hf: prefix, e.g.
GptTextGenerate.from_weights("hf:openai-community/openai-gpt").A huge thank you to the OpenAI GPT authors for creating and releasing this model.
License: MIT, inherited from the upstream OpenAI GPT release.