Code Monkey home page Code Monkey logo

ccpm-baseline's Introduction

CCPM-baseline

本项目为北京大学2021年秋季学期计算语言学课程项目,古诗文识记数据集的基线模型代码

本方案将该任务建模成 Multi-choice QA 任务, 利用 RoBERTa 作为 backbone 进行 fine-tuning, 供同学们参考。

训练集:21,778句;验证集:2,720 句;测试集:2,720 句。

数据集来自 BAAI CUGE benchmark:

@article{li2021CCPM,

title = {CCPM: A Chinese Classical Poetry Matching Dataset},

author = {Li, Wenhao and Qi, Fanchao and Sun, Maosong and Yi, Xiaoyuan and Zhang, Jiarui},

journal={arXiv preprint arXiv:2106.01979},

year = {2021} }

Environment Setup

推荐使用 Anaconda 进行虚拟环境的配置,命令如下:

conda create -n ccpm python=3.7
conda activate ccpm 
conda install pytorch torchvision cudatoolkit=11.3 -c pytorch
pip install transformers datasets 

Training

环境设置完毕后,使用提供的 run.sh 脚本即可启动训练和在验证集上进行验证, 结果如下:

***** eval metrics *****

epoch = 3.0

eval_accuracy = 0.8676

eval_loss = 0.4276

eval_runtime = 0:00:05.38

ccpm-baseline's People

Contributors

tobiaslee avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.