birgermoell
commited on
Commit
•
c8213eb
1
Parent(s):
49a91ba
Added pytorch model
Browse files- config.json +1 -1
- events.out.tfevents.1626182455.t1v-n-905ccd3e-w-0.38250.3.v2 +2 -2
- pytorch_model.bin +3 -0
- save_model.py +3 -3
config.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"activation_function": "gelu_new",
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"attn_pdrop": 0.0,
|
7 |
"bos_token_id": 50256,
|
|
|
1 |
{
|
2 |
"activation_function": "gelu_new",
|
3 |
"architectures": [
|
4 |
+
"GPT2Model"
|
5 |
],
|
6 |
"attn_pdrop": 0.0,
|
7 |
"bos_token_id": 50256,
|
events.out.tfevents.1626182455.t1v-n-905ccd3e-w-0.38250.3.v2
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:2b4a1ead764f0e1eedb1116e5d27078e1086488dc8b596af480cd5730f7ede04
|
3 |
+
size 1103462
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f0735a9f1b2acfbb15130aab162d2cc8b323dabdc0399b25a7f348d0bb0de2d
|
3 |
+
size 510397417
|
save_model.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from transformers.modeling_flax_pytorch_utils import load_flax_checkpoint_in_pytorch_model
|
2 |
-
from transformers import
|
3 |
-
config =
|
4 |
-
model =
|
5 |
load_flax_checkpoint_in_pytorch_model(model, "./flax_model.msgpack")
|
6 |
model.save_pretrained("./")
|
|
|
1 |
from transformers.modeling_flax_pytorch_utils import load_flax_checkpoint_in_pytorch_model
|
2 |
+
from transformers import GPT2Config, GPT2Model
|
3 |
+
config = GPT2Config.from_pretrained("./")
|
4 |
+
model = GPT2Model(config)
|
5 |
load_flax_checkpoint_in_pytorch_model(model, "./flax_model.msgpack")
|
6 |
model.save_pretrained("./")
|