Instructions to use KpRT/task-t1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use KpRT/task-t1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="KpRT/task-t1")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("KpRT/task-t1") model = AutoModelForTokenClassification.from_pretrained("KpRT/task-t1") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_name_or_path": "bert-base-uncased", | |
| "architectures": [ | |
| "BertForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "classifier_dropout": null, | |
| "gradient_checkpointing": false, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "O", | |
| "1": "B-treatment", | |
| "2": "I-treatment", | |
| "3": "B-chronic_disease", | |
| "4": "I-chronic_disease", | |
| "5": "B-cancer", | |
| "6": "I-cancer", | |
| "7": "B-allergy", | |
| "8": "I-allergy", | |
| "9": "B-other", | |
| "10": "I-other" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "B-allergy_name": 7, | |
| "B-cancer": 5, | |
| "B-chronic_disease": 3, | |
| "B-other": 9, | |
| "B-treatment": 1, | |
| "I-allergy_name": 8, | |
| "I-cancer": 6, | |
| "I-chronic_disease": 4, | |
| "I-other": 10, | |
| "I-treatment": 2, | |
| "O": 0 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "absolute", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.42.4", | |
| "type_vocab_size": 2, | |
| "use_cache": true, | |
| "vocab_size": 30522 | |
| } | |