Add pytorch weights
Browse files- clone_sentdex_model_tokenizer.py +5 -4
- config.json +1 -0
- pytorch_model.bin +3 -0
- saved_model/1/saved_model.pb +2 -2
- saved_model/1/variables/variables.data-00000-of-00001 +2 -2
- saved_model/1/variables/variables.index +2 -2
- tf_model.h5 +1 -1
- train.py +0 -0
clone_sentdex_model_tokenizer.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
#!/usr/bin/env python
|
2 |
-
from transformers import AutoTokenizer, TFAutoModelForCausalLM
|
3 |
import tensorflow as tf
|
4 |
|
5 |
tokenizer = AutoTokenizer.from_pretrained("Sentdex/GPyT")
|
6 |
-
|
7 |
-
|
8 |
tokenizer.save_pretrained(save_directory='./')
|
9 |
-
|
|
|
|
1 |
#!/usr/bin/env python
|
2 |
+
from transformers import AutoTokenizer, TFAutoModelForCausalLM, AutoModelForCausalLM
|
3 |
import tensorflow as tf
|
4 |
|
5 |
tokenizer = AutoTokenizer.from_pretrained("Sentdex/GPyT")
|
6 |
+
tf_model = TFAutoModelForCausalLM.from_pretrained("Sentdex/GPyT")
|
7 |
+
pytorch_model = AutoModelForCausalLM.from_pretrained("Sentdex/GPyT")
|
8 |
tokenizer.save_pretrained(save_directory='./')
|
9 |
+
tf_model.save_pretrained(save_directory='./', saved_model=True)
|
10 |
+
pytorch_model.save_pretrained(save_directory='./')
|
config.json
CHANGED
@@ -25,6 +25,7 @@
|
|
25 |
"summary_proj_to_labels": true,
|
26 |
"summary_type": "cls_index",
|
27 |
"summary_use_proj": true,
|
|
|
28 |
"transformers_version": "4.9.1",
|
29 |
"use_cache": true,
|
30 |
"vocab_size": 52000
|
|
|
25 |
"summary_proj_to_labels": true,
|
26 |
"summary_type": "cls_index",
|
27 |
"summary_use_proj": true,
|
28 |
+
"torch_dtype": "float32",
|
29 |
"transformers_version": "4.9.1",
|
30 |
"use_cache": true,
|
31 |
"vocab_size": 52000
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:813b4c1c121ea812773ceef131b206791e6265bcd41f803efa01f1af54307171
|
3 |
+
size 515755881
|
saved_model/1/saved_model.pb
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5489a6eeed5f4e07908b547e6d43b4a4c866a5d6f38eb73eca2cc4e7ba7d8079
|
3 |
+
size 5075538
|
saved_model/1/variables/variables.data-00000-of-00001
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7be84638458d0f43c1e177cf635acb3c96d5f796047fc7d240785f1f3525ab0e
|
3 |
+
size 503189630
|
saved_model/1/variables/variables.index
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:576740a66714ae9cbc48b5a1e8f2720cae9b335bed62085377955a63b30c8872
|
3 |
+
size 8801
|
tf_model.h5
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
size 503289416
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:05554bf7470cd63df842da5f54d56ec5c7472dd43b1d3864981bc5e4db7881dd
|
3 |
size 503289416
|
train.py
ADDED
File without changes
|