Instructions to use rmihaylov/bert-base-ner-theseus-bg with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rmihaylov/bert-base-ner-theseus-bg with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="rmihaylov/bert-base-ner-theseus-bg")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("rmihaylov/bert-base-ner-theseus-bg") model = AutoModelForTokenClassification.from_pretrained("rmihaylov/bert-base-ner-theseus-bg", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "/content/drive/MyDrive/ColabModels/MBERT_NER_THESEUS/pytorch_model/", | |
| "architectures": [ | |
| "BertForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "by_layer_is_trainable": { | |
| "0": true, | |
| "1": true, | |
| "10": true, | |
| "11": true, | |
| "12": true, | |
| "13": true, | |
| "14": true, | |
| "15": true, | |
| "16": true, | |
| "17": true, | |
| "18": true, | |
| "19": true, | |
| "2": true, | |
| "20": true, | |
| "21": true, | |
| "22": true, | |
| "23": true, | |
| "3": true, | |
| "4": true, | |
| "5": true, | |
| "6": true, | |
| "7": true, | |
| "8": true, | |
| "9": true | |
| }, | |
| "classifier_dropout": null, | |
| "cls_trainable": true, | |
| "directionality": "bidi", | |
| "embedding_postprocessor_trainable": true, | |
| "embeddings_layer_norm_trainable": true, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "O", | |
| "1": "[PAD]", | |
| "2": "[SEP]", | |
| "3": "B-PRO", | |
| "4": "I-PRO", | |
| "5": "B-PER", | |
| "6": "I-PER", | |
| "7": "B-ORG", | |
| "8": "I-ORG", | |
| "9": "B-LOC", | |
| "10": "I-LOC", | |
| "11": "B-EVT", | |
| "12": "I-EVT" | |
| }, | |
| "init_optimizer_variables": true, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "B-EVT": 11, | |
| "B-LOC": 9, | |
| "B-ORG": 7, | |
| "B-PER": 5, | |
| "B-PRO": 3, | |
| "I-EVT": 12, | |
| "I-LOC": 10, | |
| "I-ORG": 8, | |
| "I-PER": 6, | |
| "I-PRO": 4, | |
| "O": 0, | |
| "[PAD]": 1, | |
| "[SEP]": 2 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 6, | |
| "pad_token_id": 0, | |
| "pooler_fc_size": 768, | |
| "pooler_num_attention_heads": 12, | |
| "pooler_num_fc_layers": 3, | |
| "pooler_size_per_head": 128, | |
| "pooler_trainable": true, | |
| "pooler_type": "first_token_transform", | |
| "position_embedding_type": "absolute", | |
| "position_embeddings_trainable": true, | |
| "token_type_trainable": true, | |
| "torch_dtype": "float32", | |
| "transformer_trainable": true, | |
| "transformers_version": "4.18.0", | |
| "type_vocab_size": 2, | |
| "use_cache": true, | |
| "vocab_size": 119547, | |
| "word_embeddings_trainable": true | |
| } | |