bhadresh-savani
commited on
Commit
•
ba72176
1
Parent(s):
5d36c15
added pytorch and tensorflow model
Browse files- config.json +3 -3
- convert_flax_to_pytorch.py +3 -0
- convert_pytorch_to_flax.py +3 -0
- convert_pytorch_to_tensorflow.py +3 -0
- flax_model.msgpack +3 -0
- tf_model.h5 +3 -0
config.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"activation": "gelu",
|
4 |
"architectures": [
|
5 |
"DistilBertForSequenceClassification"
|
6 |
],
|
7 |
-
|
8 |
"dim": 768,
|
9 |
"dropout": 0.1,
|
10 |
"finetuning_task": "sst2",
|
@@ -30,6 +30,6 @@
|
|
30 |
"sinusoidal_pos_embds": false,
|
31 |
"tie_weights_": true,
|
32 |
"torch_dtype": "float32",
|
33 |
-
"transformers_version": "4.
|
34 |
"vocab_size": 28996
|
35 |
}
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "./",
|
3 |
"activation": "gelu",
|
4 |
"architectures": [
|
5 |
"DistilBertForSequenceClassification"
|
6 |
],
|
7 |
+
"attention_dropout": 0.1,
|
8 |
"dim": 768,
|
9 |
"dropout": 0.1,
|
10 |
"finetuning_task": "sst2",
|
|
|
30 |
"sinusoidal_pos_embds": false,
|
31 |
"tie_weights_": true,
|
32 |
"torch_dtype": "float32",
|
33 |
+
"transformers_version": "4.11.0.dev0",
|
34 |
"vocab_size": 28996
|
35 |
}
|
convert_flax_to_pytorch.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import AutoModelForSequenceClassification
|
2 |
+
model = AutoModelForSequenceClassification.from_pretrained("./", from_flax=True)
|
3 |
+
model.save_pretrained("./")
|
convert_pytorch_to_flax.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import FlaxAutoModelForSequenceClassification
|
2 |
+
model = FlaxAutoModelForSequenceClassification.from_pretrained("./", from_pt=True)
|
3 |
+
model.save_pretrained("./")
|
convert_pytorch_to_tensorflow.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import TFAutoModelForSequenceClassification
|
2 |
+
model = TFAutoModelForSequenceClassification.from_pretrained("./", from_pt=True)
|
3 |
+
model.save_pretrained("./")
|
flax_model.msgpack
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f3be41725be41336d92d410cbeae93b4dc2a34648b232e5b4ecd1526952e6fd3
|
3 |
+
size 263135829
|
tf_model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f4bc3ec52b550e50fd957d5ac563dcbc3bc10a854044b447018711510b20e2ac
|
3 |
+
size 263264024
|