Instructions to use PaddleCI/tiny-random-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- paddlenlp
How to use PaddleCI/tiny-random-bert with paddlenlp:
from paddlenlp.transformers import AutoTokenizer, BertForMaskedLM tokenizer = AutoTokenizer.from_pretrained("PaddleCI/tiny-random-bert", from_hf_hub=True) model = BertForMaskedLM.from_pretrained("PaddleCI/tiny-random-bert", from_hf_hub=True) - Notebooks
- Google Colab
- Kaggle
Download model_config.json from PaddleCI/tiny-random-bert: direct link, hf CLI and curl.
- Browser
- Download file 475 Bytes
-
https://huggingface.co/PaddleCI/tiny-random-bert/resolve/main/model_config.json
- Command line
-
hf download hf://PaddleCI/tiny-random-bert/model_config.json
-
curl -L -o model_config.json https://huggingface.co/PaddleCI/tiny-random-bert/resolve/main/model_config.json
475 Bytes
| { | |
| "init_args": [ | |
| { | |
| "attention_probs_dropout_prob": 0.1, | |
| "hidden_act": "relu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 8, | |
| "intermediate_size": 8, | |
| "initializer_range": 0.02, | |
| "max_position_embeddings": 512, | |
| "num_attention_heads": 2, | |
| "num_hidden_layers": 2, | |
| "type_vocab_size": 2, | |
| "vocab_size": 30522, | |
| "pad_token_id": 0, | |
| "init_class": "BertModel" | |
| } | |
| ], | |
| "init_class": "BertForMaskedLM" | |
| } |