zhinao-chinese-modernbert-novel-ner-large
Entity extraction from Chinese web novels
2 min readupdated
This model is designed for the automated detection and classification of terms, characters, locations, and other entities in Chinese web novel texts. Built on qihoo360/Zhinao-ChineseModernBert (with 0.23 billion parameters) via full fine-tuning, the model extracts 45 different BIOES tags (including characters, organizations, abilities, and items) with character-level boundary precision. It targets developers and researchers working with Chinese text processing and literature.
Key features
- Precise extraction: Character-level entity recognition with BIOES decoding support.
- Broad category coverage: Support for 45 tags, including characters (PER), organizations (ORG), locations (LOC), roles, abilities, and items.
- Optimized training: Trained on two T4 GPUs using DDP, FP16/FP32 mixed precision, and dynamic padding.
- High metrics: Validation F1-score of 0.81, with character-level accuracy reaching 96%.
What you can do
- Text analysis: Automatically find hero names, artifacts, power levels, and events in Chinese web novels.
- Knowledge graph construction: Extract entities to map relationships between characters and locations in literary works.
- Pipeline integration: Use the custom
NovelTermExtractorclass for easy execution and text processing in Python scripts.
Example
An example of using the custom extractor to find terms in a sentence:
from huggingface_hub import snapshot_download
from pathlib import Path
import sys
REPO = 'jubair239/zhinao-chinese-modernbert-novel-ner-large'
SUBFOLDER = ''
prefix = SUBFOLDER + '/' if SUBFOLDER else ''
path = snapshot_download(REPO, allow_patterns=[prefix+'*.py', prefix+'label_schema.json'])
sys.path.insert(0, str(Path(path) / SUBFOLDER))
from inference import NovelTermExtractor
extractor = NovelTermExtractor(REPO, subfolder=SUBFOLDER or None)
print(extractor.extract('韩立在黄枫谷修炼青元剑诀。'))
Read more
Details• Test metrics: F1-score 0.813, precision 0.822, recall 0.804.
• Architecture: Full-scale fine-tuning of the Zhinao-ChineseModernBert model (0.23 billion parameters).
• Training: Effective batch size of 64, 5 epochs, AdamW optimizer.
• Requirements: PyTorch >=2.6 and use of the specialized
NovelTermExtractor class.









Comments