Zimix commited on
Commit
6a0aad9
1 Parent(s): 19d6f53

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +11 -0
README.md CHANGED
@@ -9,6 +9,17 @@ widget:
9
  As we all know, the single direction language model based on decoder structure has strong generation ability, such as GPT model. **The 3.5 billion parameter Wenzhong-3.5B large model, using 100G chinese common data, 32 A100 training for 28 hours,** is the largest open source **GPT2 large model of chinese**. **Our model performs well in Chinese continuation generation.**
10
 
11
  ## Usage
 
 
 
 
 
 
 
 
 
 
 
12
  ```python
13
  from transformers import pipeline, set_seed
14
 
 
9
  As we all know, the single direction language model based on decoder structure has strong generation ability, such as GPT model. **The 3.5 billion parameter Wenzhong-3.5B large model, using 100G chinese common data, 32 A100 training for 28 hours,** is the largest open source **GPT2 large model of chinese**. **Our model performs well in Chinese continuation generation.**
10
 
11
  ## Usage
12
+
13
+ ### load model
14
+ ```python
15
+ from transformers import GPT2Tokenizer, GPT2Model
16
+ tokenizer = GPT2Tokenizer.from_pretrained('IDEA-CCNL/Wenzhong-3.5B')
17
+ model = GPT2Model.from_pretrained('IDEA-CCNL/Wenzhong-3.5B')
18
+ text = "Replace me by any text you'd like."
19
+ encoded_input = tokenizer(text, return_tensors='pt')
20
+ output = model(**encoded_input)
21
+ ```
22
+ ### generation
23
  ```python
24
  from transformers import pipeline, set_seed
25