Skip to content

LmYjQ/mindspore_bert

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

mindspore_bert

使用mindspore的bert做finetune

1.下载数据

来自https://github.com/CLUEbenchmark/CLUE里面的今日头条新闻数据集 华为对象存储下载预训练模型:/chz/bert_base.ckpt,并上传到自己的对象存储

2.预处理:转TFRecord(本地)

第一步:json转tsv

python preprocess.py 'train'
python preprocess.py 'dev'

第二步:tsv转TFRecord

sh run.sh

生成的tfrecord上传到对象存储

3.finetune(modelarts)

将bert目录上传到对象存储,modelarts执行的代码目录选它 执行finetune.py

4.评估(modelarts)

执行evaluation.py

About

使用mindspore的bert做finetune

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published