Instructions to use 9pinus/macbert-base-chinese-medicine-recognition with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 9pinus/macbert-base-chinese-medicine-recognition with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="9pinus/macbert-base-chinese-medicine-recognition")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("9pinus/macbert-base-chinese-medicine-recognition") model = AutoModelForTokenClassification.from_pretrained("9pinus/macbert-base-chinese-medicine-recognition", device_map="auto") - Notebooks
- Google Colab
- Kaggle
AssertionError: Non-consecutive added token 'θ' found. Should have index 21170 but has index 21128 in saved vocabulary.
#1
by HokyeeJau - opened
There is something wrong with the Chinese character indexes.
When I first loaded the tokenizer, according to the screenshot attached, it seemed the index is wrong.
Following the tips, I changed the index in the added_tokens.json file, but there is another wrong information for the same reason that came out.
I am wondering if I could do anything to avoid this kind of error.
Thank you.