Instructions to use ille255/spotsync-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ille255/spotsync-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ille255/spotsync-ner")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ille255/spotsync-ner", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| language: | |
| - ko | |
| license: apache-2.0 | |
| tags: | |
| - ner | |
| - token-classification | |
| - korean | |
| - place-search | |
| - bert | |
| library_name: transformers | |
| pipeline_tag: token-classification | |
| # SpotSync NER - Korean Place Search NER Model | |
| Korean Named Entity Recognition model used in the **SpotSync** intelligent place search pipeline. | |
| Extracts **Location (LOC)**, **Brand (BRAND)**, **Category (CAT)**, and **Attribute (ATTR)** from natural language queries. | |
| ## Labels | |
| | Label | Description | Example | | |
| |-------|-------------|---------| | |
| | `B-LOC` / `I-LOC` | Location/region | Hongdae, Gangnam, Sinchon Station | | |
| | `B-BRAND` / `I-BRAND` | Brand/store name | Starbucks, McDonald's | | |
| | `B-CAT` / `I-CAT` | Business category | Cafe, Restaurant, Gym | | |
| | `B-ATTR` / `I-ATTR` | Attribute/characteristic | Quiet, Good atmosphere, 24 hours | | |
| ## Usage | |
| ```python | |
| from transformers import AutoTokenizer, AutoModelForTokenClassification | |
| import torch | |
| model_id = "ille255/spotsync-ner" | |
| tokenizer = AutoTokenizer.from_pretrained(model_id) | |
| model = AutoModelForTokenClassification.from_pretrained(model_id) | |
| text = "Hongdae nearby cozy cafe" | |
| tokens = text.split() | |
| inputs = tokenizer(tokens, is_split_into_words=True, return_tensors="pt") | |
| with torch.no_grad(): | |
| outputs = model(**inputs) | |
| predictions = torch.argmax(outputs.logits, dim=2)[0] | |
| id2label = model.config.id2label | |
| for token, pred in zip(tokens, predictions[1:-1]): | |
| print(f"{token}: {id2label[pred.item()]}") | |
| ``` | |
| ## Model Architecture | |
| - **Base**: BERT (BertForTokenClassification) | |
| - **Hidden Size**: 768 | |
| - **Attention Heads**: 12 | |
| - **Layers**: 12 | |
| - **Vocab Size**: 32,000 | |
| ## Related Links | |
| - ONNX Quantized version: [ille255/spotsync-ner-onnx](https://huggingface.co/ille255/spotsync-ner-onnx) | |
| - GitHub: [SpotSync Project](https://github.com/IlleJiViN/comp_team) | |