upload model c897255
Averie So commited on
How to use garNER/bert-base-chinese-zh with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="garNER/bert-base-chinese-zh") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("garNER/bert-base-chinese-zh")
model = AutoModelForTokenClassification.from_pretrained("garNER/bert-base-chinese-zh", device_map="auto")