GPT

https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf

Lucid port of transformers/openai-community/openai-gpt, converted to Lucid-native safetensors.

Available weights

Tag Params GFLOPs Size Source
BOOKCORPUS (default) 116.5M — 444.56 MB transformers

Usage

import lucid
import lucid.models as models
from lucid.models.weights import GptWeights

# default tag
model = models.gpt(pretrained=True)

# explicit tag (enum or string)
model = models.gpt(weights=GptWeights.BOOKCORPUS)
model = models.gpt(pretrained="BOOKCORPUS")

# feed token ids (tokenize with the matching lucid.utils.tokenizer)
input_ids = lucid.tensor([[101, 7592, 2088, 102]], dtype=lucid.int64)
out = model(input_ids)
hidden = out.last_hidden_state  # (B, T, hidden_size)

Conversion

Converted from transformers/openai-community/openai-gpt via python -m tools.convert_weights gpt --tag BOOKCORPUS. Key mapping + numerical parity verified against the source.

License

mit — inherited from the original weights.

Citation

Radford et al., "Improving Language Understanding by Generative Pre-Training", 2018 (GPT).
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train lucid-dl/gpt