albert_pytorch
albert_pytorch
英語版|中文版说明
このリポジトリには、ペーパーからのアルバートモデルのPytorchの実装が含まれています
自己教師の学習言語表現のためのライトバート
Zhenzhong Lan。ミンダチェン....
公式ダウンロードリンク:Google Albert
このバージョンに適応して、Pytorch Model(Google Drive)をダウンロードしてください。
V1
V2
1。 config.jsonと30k-clean.model prev_trained_model/albert_base_v2ディレクトリに配置します。例:
├── prev_trained_model
| └── albert_base_v2
| | └── pytorch_model.bin
| | └── config.json
| | └── 30k-clean.model
2. Albert TFチェックポイントをPytorchに導きます
python convert_albert_tf_checkpoint_to_pytorch . py
- - tf_checkpoint_path = . / prev_trained_model / albert_base_tf_v2
- - bert_config_file = . / prev_trained_model / albert_base_v2 / config . json
- - pytorch_dump_path = . / prev_trained_model / albert_base_v2 / pytorch_model . bin一般的な言語理解評価(接着剤)ベンチマークは、自然言語理解システムを評価および分析するための9つの文または文章の言語理解タスクのコレクションです。
これらの接着剤タスクの誰かを実行する前に、このスクリプトを実行して接着剤データをダウンロードして、ディレクトリ$ data_dirに解凍する必要があります。
3.runsh sh scripts/run_classifier_sst2.shから微調整アルバートモデル
DEVのシングルモデルセットアップを使用した接着剤ベンチマーク結果でのアルバートのパフォーマンス:
| コーラ | SST-2 | mnli | sts-b | |
|---|---|---|---|---|
| メトリック | Matthews_corrcof | 正確さ | 正確さ | ピアソン |
| モデル | コーラ | SST-2 | mnli | sts-b |
|---|---|---|---|---|
| albert_base_v2 | 0.5756 | 0.926 | 0.8418 | 0.9091 |
| albert_large_v2 | 0.5851 | 0.9507 | 0.9151 | |
| albert_xlarge_v2 | 0.6023 | 0.9221 |