/ Модель

Характеристики

Контекст
512 токенов
Параметры
143 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Опубликована
9 июн 2022

bert-ancient-chinese

Заполнение пропусковТекст → текст3 профессии

BERT-модель для предсказания пропущенных токенов и автоматической обработки древнекитайских текстов.

1 406скачиваний за 30 дней32лайкавеса обновлены20 фев 2023

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Jihuai/bert-ancient-chinese — это модель BERT для работы с классическим китайским языком, разработанная Pengyu Wang и Zhichen Ren. Она создана для автоматической обработки древнекитайских текстов в задачах цифровой гуманитаристики и дообучена на основе bert-base-chinese с использованием крупного корпуса древнекитайских текстов.

Модель имеет архитектуру BERT с 142,6 млн параметров и контекстом до 512 токенов. Её словарь расширен до 38 208 токенов, включая редкие иероглифы традиционного китайского письма. Основная задача — предсказание пропущенных токенов; модель также применялась как основа для дообучения на сегментацию слов и разметку частей речи. Доступна в формате PyTorch.

Модель рассчитана на классический китайский язык и может быть полезна для анализа исторических текстов, филологических исследований и обучения традиционной культуре. Результаты в downstream-задачах зависят от набора данных и параметров дообучения. Лицензия — Apache-2.0.

Сценарии применения

  • восстановление пропущенных иероглифов в классическом китайском тексте
  • подготовка модели для сегментации слов в древнекитайских текстах
  • дообучение для разметки частей речи в классическом китайском
  • анализ исторических корпусов и текстов китайской филологии

Ограничения

Для сегментации слов и разметки частей речи модель требуется дообучить на соответствующей задаче. Результаты зависят от данных и параметров обучения.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

bert-ancient-chinese

Introduction

With the current wave of Artificial Intelligence and Digital Humanities sweeping the world, the automatic analysis of modern Chinese has achieved great results. However, the automatic analysis and research of ancient Chinese is relatively weak, and it is difficult to meet the actual needs of Sinology, history, philology, Chinese history and the education of Sinology and traditional culture. There are many controversies about characters, words and parts of speech in ancient Chinese, and there are many difficulties in resource construction. Digital Humanities research requires large-scale corpora and high-performance ancient natural language processing tools. In view of the fact that pre-trained language models have greatly improved the accuracy of text mining in English and modern Chinese texts, there is an urgent need for pre-trained models for the automatic processing of ancient texts.

In 2022, we took part in EvaHan 2022, the first NLP tool evaluation competition in the field of ancient Chinese. bert-ancient-chinese is trained to further optimize the model effect in open environment.

If you want to refer to our work, you can refer to this paper:

@inproceedings{wang2022uncertainty,
  title={The Uncertainty-based Retrieval Framework for Ancient Chinese CWS and POS},
  author={Wang, Pengyu and Ren, Zhichen},
  booktitle={Proceedings of the Second Workshop on Language Technologies for Historical and Ancient Languages},
  pages={164--168},
  year={2022}
}

You can view the introduction of the Chinese version through this link.

Further Pre-training

Compared with the previous pre-trained models, bert-ancient-chinese mainly has the following characteristics:

  • Ancient Chinese texts mostly appear in traditional Chinese characters and contain a large number of uncommon Chinese characters, which makes the vocab table (vocabulary) of the pre-trained model without some uncommon Chinese characters. bert-ancient-chinese further expands the vocab (dictionary) of the pre-trained model by learning in a large-scale corpus. The final vocab table size is 38208, compared to bert-base-chinese vocabulary size of 21128, siku-bert vocabulary size of 29791, bert-ancient-chinese has a larger vocabulary, and also includes more uncommon vocabulary word, which is more conducive to improving the performance of the model in downstream tasks. The vocab table is the vocabulary table, which is included in the vocab.txt in the pre-trained model.

  • bert-ancient-chinese uses a larger training set. Compared with siku-bert only using "Siku Quanshu" as training dataset, we use a larger-scale dataset (about six times that of "Siku Quanshu"), covering from the Ministry of Cong, the Ministry of Taoism, the Ministry of Buddhism, the Ministry of Confucianism, the Ministry of Poetry, the Ministry of History, the Ministry of Medicine, the Ministry of Art, the Ministry of Yi, and the Ministry of Zi, are richer in content and wider in scope than the "Siku Quanshu".

  • Based on the idea of Domain-Adaptive Pretraining, bert-ancient-chinese was trained on the basis of bert-base-chinese and was combined with ancient Chinese corpus to obtain a pre-trained model for the field of automatic processing of ancient Chinese.

How to use

Huggingface Transformers

The from_pretrained method based on Huggingface Transformers can directly obtain bert-ancient-chinese model online.

from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("Jihuai/bert-ancient-chinese")

model = AutoModel.from_pretrained("Jihuai/bert-ancient-chinese")

Download PTM

The model we provide is the PyTorch version.

From Huggingface

Download directly through Huggingface's official website, and the model on the official website has been updated to the latest version simultaneously:

From Cloud Disk

Download address:

ModelLink
bert-ancient-chineseLink Extraction code: qs7x

Evaluation & Results

We tested and compared different pre-trained models on the training and test sets provided by the competition EvaHan 2022. We compare the performance of the models by fine-tuning them on the downstream tasks of Chinese Word Segmentation(CWS) and part-of-speech tagging(POS Tagging).

We use BERT+CRF as the baseline model to compare the performance of siku-bert, siku-roberta and bert-ancient-chinese on downstream tasks. To fully utilize the entire training dataset, we employ K-fold cross-validation, while keeping other hyperparameters the same. The evaluation index is the F1 value.

Citing

If our content is helpful for your research work, please quote it in the paper.

Disclaim

The experimental results presented in the report only show the performance under a specific data set and hyperparameter combination, and cannot represent the essence of each model. The experimental results may change due to random number seeds and computing equipment. Users can use the model arbitrarily within the scope of the license, but we are not responsible for the direct or indirect losses caused by using the content of the project.

Acknowledgment

bert-ancient-chinese is based on bert-base-chinese to continue training.

Thanks to Prof. Xipeng Qiu and the Natural Language Processing Laboratory of Fudan University.

Contact us

Pengyu Wang:wpyjihuai@gmail.com

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · fill-mask

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForMaskedLM
Ревизия весов
1eb4c20

0 моделей