Views
No views yet
transformers/google/bert_uncased_L-8_H-512_A-8,
converted to Lucid-native safetensors.| Tag | Params | GFLOPs | Size | Source |
|---|---|---|---|---|
WIKIPEDIA_BOOKSCORPUS (default) | 41.4M | — | 157.84 MB | transformers |
1import lucid
2import lucid.models as models
3from lucid.models.weights import BertMediumWeights
4
5# default tag
6model = models.bert_medium(pretrained=True)
7
8# explicit tag (enum or string)
9model = models.bert_medium(weights=BertMediumWeights.WIKIPEDIA_BOOKSCORPUS)
10model = models.bert_medium(pretrained="WIKIPEDIA_BOOKSCORPUS")
11
12# feed token ids (tokenize with the matching lucid.utils.tokenizer)
13input_ids = lucid.tensor([[101, 7592, 2088, 102]], dtype=lucid.int64)
14out = model(input_ids)
15hidden = out.last_hidden_state # (B, T, hidden_size)transformers/google/bert_uncased_L-8_H-512_A-8 via
python -m tools.convert_weights bert_medium --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.