Instructions to use THemidli/applied-ner-stage4-bert-tiny-improved with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use THemidli/applied-ner-stage4-bert-tiny-improved with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="THemidli/applied-ner-stage4-bert-tiny-improved")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("THemidli/applied-ner-stage4-bert-tiny-improved") model = AutoModelForTokenClassification.from_pretrained("THemidli/applied-ner-stage4-bert-tiny-improved", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "stage": 4, | |
| "model_path": "models/stage4-bert-tiny-ner-improved", | |
| "records": 40, | |
| "patterns": 10, | |
| "overall": { | |
| "true_positive": 62.0, | |
| "gold_spans": 98.0, | |
| "predicted_spans": 114.0, | |
| "precision": 0.543859649122807, | |
| "recall": 0.6326530612244898, | |
| "f1": 0.5849056603773586 | |
| }, | |
| "error_counts": { | |
| "boundary": 18, | |
| "false_positive": 20, | |
| "missed_entity": 4, | |
| "wrong_label": 14 | |
| }, | |
| "label_confusions": { | |
| "LOCATION->ORGANIZATION": 1, | |
| "ORGANIZATION->PRODUCT": 1, | |
| "ORGANIZATION->WORKOFART": 1, | |
| "PERSON->PRODUCT": 1, | |
| "PRODUCT->ORGANIZATION": 3, | |
| "PRODUCT->PERSON": 1, | |
| "PRODUCT->WORKOFART": 1, | |
| "TIMEDATE->ORGANIZATION": 1, | |
| "TIMEDATE->PRODUCT": 1, | |
| "WORKOFART->LOCATION": 1, | |
| "WORKOFART->ORGANIZATION": 1, | |
| "WORKOFART->PERSON": 1 | |
| }, | |
| "by_pattern": { | |
| "amount_boundary": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 8.0, | |
| "gold_spans": 8.0, | |
| "predicted_spans": 8.0, | |
| "precision": 1.0, | |
| "recall": 1.0, | |
| "f1": 1.0 | |
| }, | |
| "error_counts": {}, | |
| "records_with_errors": 0 | |
| }, | |
| "company_product": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 4.0, | |
| "gold_spans": 10.0, | |
| "predicted_spans": 10.0, | |
| "precision": 0.4, | |
| "recall": 0.4, | |
| "f1": 0.4000000000000001 | |
| }, | |
| "error_counts": { | |
| "boundary": 1, | |
| "false_positive": 1, | |
| "missed_entity": 1, | |
| "wrong_label": 4 | |
| }, | |
| "records_with_errors": 4 | |
| }, | |
| "institution_context": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 7.0, | |
| "gold_spans": 9.0, | |
| "predicted_spans": 11.0, | |
| "precision": 0.6363636363636364, | |
| "recall": 0.7777777777777778, | |
| "f1": 0.7000000000000001 | |
| }, | |
| "error_counts": { | |
| "boundary": 1, | |
| "false_positive": 2, | |
| "wrong_label": 1 | |
| }, | |
| "records_with_errors": 3 | |
| }, | |
| "job_boundary": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 8.0, | |
| "gold_spans": 13.0, | |
| "predicted_spans": 16.0, | |
| "precision": 0.5, | |
| "recall": 0.6153846153846154, | |
| "f1": 0.5517241379310345 | |
| }, | |
| "error_counts": { | |
| "boundary": 5, | |
| "false_positive": 3 | |
| }, | |
| "records_with_errors": 3 | |
| }, | |
| "namedness_repetition": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 8.0, | |
| "gold_spans": 9.0, | |
| "predicted_spans": 9.0, | |
| "precision": 0.8888888888888888, | |
| "recall": 0.8888888888888888, | |
| "f1": 0.8888888888888888 | |
| }, | |
| "error_counts": { | |
| "wrong_label": 1 | |
| }, | |
| "records_with_errors": 1 | |
| }, | |
| "person_alias_handle": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 9.0, | |
| "gold_spans": 12.0, | |
| "predicted_spans": 12.0, | |
| "precision": 0.75, | |
| "recall": 0.75, | |
| "f1": 0.75 | |
| }, | |
| "error_counts": { | |
| "boundary": 1, | |
| "wrong_label": 2 | |
| }, | |
| "records_with_errors": 2 | |
| }, | |
| "product_work": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 2.0, | |
| "gold_spans": 9.0, | |
| "predicted_spans": 17.0, | |
| "precision": 0.11764705882352941, | |
| "recall": 0.2222222222222222, | |
| "f1": 0.15384615384615383 | |
| }, | |
| "error_counts": { | |
| "boundary": 2, | |
| "false_positive": 9, | |
| "missed_entity": 1, | |
| "wrong_label": 4 | |
| }, | |
| "records_with_errors": 4 | |
| }, | |
| "software_namedness": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 6.0, | |
| "gold_spans": 10.0, | |
| "predicted_spans": 11.0, | |
| "precision": 0.5454545454545454, | |
| "recall": 0.6, | |
| "f1": 0.5714285714285713 | |
| }, | |
| "error_counts": { | |
| "boundary": 1, | |
| "false_positive": 2, | |
| "missed_entity": 1, | |
| "wrong_label": 2 | |
| }, | |
| "records_with_errors": 3 | |
| }, | |
| "timedate_boundary": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 8.0, | |
| "gold_spans": 10.0, | |
| "predicted_spans": 12.0, | |
| "precision": 0.6666666666666666, | |
| "recall": 0.8, | |
| "f1": 0.7272727272727272 | |
| }, | |
| "error_counts": { | |
| "boundary": 2, | |
| "false_positive": 2 | |
| }, | |
| "records_with_errors": 2 | |
| }, | |
| "work_title_boundary": { | |
| "records": 4, | |
| "metrics": { | |
| "true_positive": 2.0, | |
| "gold_spans": 8.0, | |
| "predicted_spans": 8.0, | |
| "precision": 0.25, | |
| "recall": 0.25, | |
| "f1": 0.25 | |
| }, | |
| "error_counts": { | |
| "boundary": 5, | |
| "false_positive": 1, | |
| "missed_entity": 1 | |
| }, | |
| "records_with_errors": 4 | |
| } | |
| }, | |
| "method": "Forty fresh, manually gold-labeled policy probes; exact character-span comparison; errors classified by deterministic overlap rules and then manually reviewed." | |
| } | |