Commit
•
e2df214
1
Parent(s):
c5e4f2e
Update README.md
Browse files
README.md
CHANGED
@@ -8,7 +8,7 @@ tags: []
|
|
8 |
```python
|
9 |
from transformers import AutoTokenizer, GPT2Config, GPT2LMHeadModel
|
10 |
|
11 |
-
config = GPT2Config(n_positions=512, n_embd=32, n_layer=5, n_head=4, n_inner=37, is_decoder=True)
|
12 |
model = GPT2LMHeadModel(config)
|
13 |
tokenizer = AutoTokenizer.from_pretrained("openai-community/gpt2")
|
14 |
|
|
|
8 |
```python
|
9 |
from transformers import AutoTokenizer, GPT2Config, GPT2LMHeadModel
|
10 |
|
11 |
+
config = GPT2Config(n_positions=512, n_embd=32, n_layer=5, n_head=4, n_inner=37, pad_token_id=1023, is_decoder=True)
|
12 |
model = GPT2LMHeadModel(config)
|
13 |
tokenizer = AutoTokenizer.from_pretrained("openai-community/gpt2")
|
14 |
|