bhadresh-savani
commited on
Commit
•
90a5f86
1
Parent(s):
ff7ce40
added flax and tensorflow model
Browse files- config.json +3 -2
- 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,11 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "
|
3 |
"architectures": [
|
4 |
"RobertaForSequenceClassification"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
|
|
8 |
"eos_token_id": 2,
|
9 |
"gradient_checkpointing": false,
|
10 |
"hidden_act": "gelu",
|
@@ -36,7 +37,7 @@
|
|
36 |
"pad_token_id": 1,
|
37 |
"position_embedding_type": "absolute",
|
38 |
"problem_type": "single_label_classification",
|
39 |
-
"transformers_version": "4.
|
40 |
"type_vocab_size": 1,
|
41 |
"use_cache": true,
|
42 |
"vocab_size": 50265
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "./",
|
3 |
"architectures": [
|
4 |
"RobertaForSequenceClassification"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
"eos_token_id": 2,
|
10 |
"gradient_checkpointing": false,
|
11 |
"hidden_act": "gelu",
|
|
|
37 |
"pad_token_id": 1,
|
38 |
"position_embedding_type": "absolute",
|
39 |
"problem_type": "single_label_classification",
|
40 |
+
"transformers_version": "4.11.0.dev0",
|
41 |
"type_vocab_size": 1,
|
42 |
"use_cache": true,
|
43 |
"vocab_size": 50265
|
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:d8d9c4de04e014b5bab9eeadc461b045b2a486bd709d74d5d4913692d62524ee
|
3 |
+
size 498608205
|
tf_model.h5
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d220a4f6b3167f6de5649d5570267bce1780a9c7590f9fe31af8aa1e01580e5f
|
3 |
+
size 498890624
|