Commit
·
7cb5428
1
Parent(s):
8a44d5a
Update README.md
Browse files
README.md
CHANGED
|
@@ -52,12 +52,14 @@ GPT-J learns an inner representation of the English language that can be used to
|
|
| 52 |
|
| 53 |
### How to use
|
| 54 |
|
| 55 |
-
|
| 56 |
|
| 57 |
```python
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
[{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
|
| 63 |
```
|
|
|
|
| 52 |
|
| 53 |
### How to use
|
| 54 |
|
| 55 |
+
This model can be easily loaded using the `AutoModelForCausalLM` functionality:
|
| 56 |
|
| 57 |
```python
|
| 58 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 59 |
+
|
| 60 |
+
tokenizer = AutoTokenizer.from_pretrained("gpt2")
|
| 61 |
+
model = AutoModelForCausalLM.from_pretrained("gpt-j-6B")
|
| 62 |
+
|
| 63 |
|
| 64 |
[{'generated_text': 'EleutherAI has made a commitment to create new software packages for each of its major clients and has'}]
|
| 65 |
```
|