/BERT-Fine_tune

A fine-tune framework based on pytorch-pretrained-BERT

Primary LanguagePythonMIT LicenseMIT

Bert-Fine_tune

Install dependency

pip install -r requirements.txt

Train

python main.py --mode train --batch_size 8 --eval_steps 1000 --data_name {data} --data_path ./data --learning_rate 3e-5 --num_train_epochs 3 --pytorch_dump_path saved/saved.model --data_format {data_format} --output_path predict.{data} --model_type {model_type}

Test

python main.py --mode test --data_name {data} --data_path ./data --pytorch_dump_path saved/saved.model.1 --data_format {data_format} --output_path predict.{data} --model_type {model_type}

Current supported datasets

  1. Sequence Classification
  1. Sequence Pair Classification
  • Information Retrieval datasets from Anserini
    • Robust04
    • Microblog
  • Semantic Textual Similarity
  1. Sequence Token Classification
  • Name Entity Recoginition
    • ResumeNER
    • OntoNote 4.0 Chinese
    • MSRA