Update README.md
Browse files
README.md
CHANGED
@@ -21,7 +21,7 @@ As we all know, the single direction language model based on decoder structure h
|
|
21 |
### load model
|
22 |
```python
|
23 |
from transformers import GPT2Tokenizer, GPT2Model
|
24 |
-
tokenizer = GPT2Tokenizer.from_pretrained('IDEA-CCNL/
|
25 |
model = GPT2Model.from_pretrained('IDEA-CCNL/Wenzhong-GPT2-3.5B')
|
26 |
text = "Replace me by any text you'd like."
|
27 |
encoded_input = tokenizer(text, return_tensors='pt')
|
@@ -31,7 +31,7 @@ output = model(**encoded_input)
|
|
31 |
```python
|
32 |
from transformers import pipeline, set_seed
|
33 |
set_seed(55)
|
34 |
-
generator = pipeline('text-generation', model='IDEA-CCNL/
|
35 |
generator("北京位于", max_length=30, num_return_sequences=1)
|
36 |
|
37 |
```
|
|
|
21 |
### load model
|
22 |
```python
|
23 |
from transformers import GPT2Tokenizer, GPT2Model
|
24 |
+
tokenizer = GPT2Tokenizer.from_pretrained('IDEA-CCNL/Wenzhong2.0-GPT2-3.5B-chinese')
|
25 |
model = GPT2Model.from_pretrained('IDEA-CCNL/Wenzhong-GPT2-3.5B')
|
26 |
text = "Replace me by any text you'd like."
|
27 |
encoded_input = tokenizer(text, return_tensors='pt')
|
|
|
31 |
```python
|
32 |
from transformers import pipeline, set_seed
|
33 |
set_seed(55)
|
34 |
+
generator = pipeline('text-generation', model='IDEA-CCNL/Wenzhong2.0-GPT2-3.5B-chinese')
|
35 |
generator("北京位于", max_length=30, num_return_sequences=1)
|
36 |
|
37 |
```
|