Instructions to use cyclone/cyclone-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyclone/cyclone-ner with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, BertCrfForNer tokenizer = AutoTokenizer.from_pretrained("cyclone/cyclone-ner") model = BertCrfForNer.from_pretrained("cyclone/cyclone-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from cyclone/cyclone-ner: direct link, hf CLI and curl.
- Browser
- Download file 612 Bytes
-
https://huggingface.co/cyclone/cyclone-ner/resolve/main/README.md
- Command line
-
hf download hf://cyclone/cyclone-ner/README.md
-
curl -L -o README.md https://huggingface.co/cyclone/cyclone-ner/resolve/main/README.md
612 Bytes
Cyclone Chinese NER
This model provides simplified Chinese NER model based on pretrained model BERT (specifically BERT + CRF) Currently, we only support 8 general type of entities ("address", "company", "government", "name", "organization", "position", "scene", "time")
Usage
from transformers import BertConfig
config = BertConfig.from_pretrained("bert-base-chinese", num_labels=num_labels)
model_path = "cyclone/cyclone-ner"
tokenizer = CNerTokenizer.from_pretrained(model_path, do_lower_case=True)
model = BertCrfForNer.from_pretrained(model_path, config=config)