legacy-datasets/wikipedia
Updated • 112k • 634
Lucid port of transformers/google-bert/bert-large-uncased,
converted to Lucid-native safetensors.
| Tag | Params | GFLOPs | Size | Source |
|---|---|---|---|---|
WIKIPEDIA_BOOKSCORPUS (default) |
336.2M | — | 1401.87 MB | transformers |
import lucid
import lucid.models as models
from lucid.models.weights import BertLargeMLMWeights
# default tag
model = models.bert_large_mlm(pretrained=True)
# explicit tag (enum or string)
model = models.bert_large_mlm(weights=BertLargeMLMWeights.WIKIPEDIA_BOOKSCORPUS)
model = models.bert_large_mlm(pretrained="WIKIPEDIA_BOOKSCORPUS")
# 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)
logits = out.logits # (B, T, vocab_size)
Converted from transformers/google-bert/bert-large-uncased via
python -m tools.convert_weights bert_large_mlm --tag WIKIPEDIA_BOOKSCORPUS.
Key mapping + numerical parity verified against the source.
apache-2.0 — inherited from the original weights.
Devlin et al., "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding", NAACL 2019. Miniatures: Turc et al., "Well-Read Students Learn Better", 2019.