You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 15, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: scripts/conversion_toolkits/README.md
+32-23Lines changed: 32 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,8 @@ The testing step mentioned above are controlled by the flag `--test`, in which t
12
12
tolerance of 1e-3 between gluon model with converted weights and original tensorflow model.
13
13
In addition, we can use GPU in all converting scripts by adding `--gpu 0`.
14
14
15
+
For RoBERTa XLM-R and BART model, please instal the [fairseq](https://github.com/pytorch/fairseq#requirements-and-installation) package locally as `pip install git+https://github.com/pytorch/fairseq.git@master`.
16
+
15
17
## BERT
16
18
Convert model from [BERT LIST](https://tfhub.dev/google/collections/bert/1).
17
19
@@ -37,25 +39,42 @@ do
37
39
done
38
40
```
39
41
40
-
## RoBERTa
42
+
## ELECTRA
43
+
The TF Hub is not available for ELECTRA model currently.
44
+
Thus, you will need to clone the [electra repository](https://github.com/ZheyuYe/electra)
45
+
and download the checkpoint. The parameters are converted from local checkpoints.
46
+
By running the following command, you can convert + verify the ELECTRA model with both the discriminator and the generator.
47
+
48
+
Notice: pleas set up the `--electra_path` with the cloned path ~~or get this electra repository packaged by `pip install -e .`.~~
0 commit comments