bhadresh-savani commited on
Commit
d2b8df9
1 Parent(s): ff8ee48

added tf and flax model support

Browse files
config.json CHANGED
@@ -40,7 +40,7 @@
40
  "summary_type": "first",
41
  "summary_use_proj": true,
42
  "torch_dtype": "float32",
43
- "transformers_version": "4.17.0",
44
  "type_vocab_size": 2,
45
  "use_cache": true,
46
  "vocab_size": 30522
 
40
  "summary_type": "first",
41
  "summary_use_proj": true,
42
  "torch_dtype": "float32",
43
+ "transformers_version": "4.19.0.dev0",
44
  "type_vocab_size": 2,
45
  "use_cache": true,
46
  "vocab_size": 30522
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 TFElectraForSequenceClassification
2
+ model = TFElectraForSequenceClassification.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:170ecccf79b9816ef99d7c20e5ba6c75e79a487e4441442be43e5a8eaad8050e
3
+ size 134321308
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c961459cf5b946592a4972f216002b259b6c22048b6b123e675dca766536f73
3
+ size 134603600