bookcorpus/bookcorpus
Updated • 21.3k • 354
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.
| Tag | Params | GFLOPs | Size | Source |
|---|---|---|---|---|
BOOKCORPUS (default) |
116.5M | — | 444.56 MB | transformers |
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)
Converted from transformers/openai-community/openai-gpt via
python -m tools.convert_weights gpt --tag BOOKCORPUS.
Key mapping + numerical parity verified against the source.
mit — inherited from the original weights.
Radford et al., "Improving Language Understanding by Generative Pre-Training", 2018 (GPT).