Instructions to use dieumerci/mountain-recognition-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dieumerci/mountain-recognition-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="dieumerci/mountain-recognition-ner")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("dieumerci/mountain-recognition-ner") model = AutoModelForTokenClassification.from_pretrained("dieumerci/mountain-recognition-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Mountain Name Recognition (NER) Model
Overview
This repository contains a pre-trained Named Entity Recognition (NER) model for mountain name recognition. The model is based on the dslim/bert-large-NER architecture and was fine-tuned on a relabeled subset of the DFKI-SLT/few-nerd dataset. The model achieves an F1 Score of 87.42% on the test set.
Inference
Here's a sample code for performing inference using the model:
from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline
model = AutoModelForTokenClassification.from_pretrained("dieumerci/mountain-recognition-ner")
tokenizer = AutoTokenizer.from_pretrained("dieumerci/mountain-recognition-ner")
classifier = pipeline("ner", model=model, tokenizer=tokenizer)
text = "Next on our list is Denali Peak, also known as Mount McKinley, in Alaska."
result = classifier(text)
print(result)
- Downloads last month
- 8