Zimix commited on
Commit
edb667b
1 Parent(s): 95c0cb5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -1
README.md CHANGED
@@ -1,5 +1,48 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
3
  ---
4
- test
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - zh
4
+
5
+ inference:
6
+ parameters:
7
+ max_new_tokens: 128
8
+ repetition_penalty: 25.0
9
+ top_p: 0.9
10
+ do_sample: True
11
+
12
+
13
+
14
  license: apache-2.0
15
  ---
16
+ # Wenzhong2.0-GPT2-3.5B model (chinese),one model of [Fengshenbang-LM](https://github.com/IDEA-CCNL/Fengshenbang-LM).
17
+ 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-GPT2-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.** ** Wenzhong2.0-GPT2-3.5B is a Chinese gpt2 model trained with cleaner data on the basis of Wenzhong-GPT2-3.5B. **
18
+
19
+ ## Usage
20
+
21
+ ### load model
22
+ ```python
23
+ from transformers import GPT2Tokenizer, GPT2Model
24
+ tokenizer = GPT2Tokenizer.from_pretrained('IDEA-CCNL/Wenzhong-GPT2-3.5B')
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')
28
+ output = model(**encoded_input)
29
+ ```
30
+ ### generation
31
+ ```python
32
+ from transformers import pipeline, set_seed
33
+ set_seed(55)
34
+ generator = pipeline('text-generation', model='IDEA-CCNL/Wenzhong-GPT2-3.5B')
35
+ generator("北京位于", max_length=30, num_return_sequences=1)
36
+
37
+ ```
38
 
39
+ ## Citation
40
+ If you find the resource is useful, please cite the following website in your paper.
41
+ ```
42
+ @misc{Fengshenbang-LM,
43
+ title={Fengshenbang-LM},
44
+ author={IDEA-CCNL},
45
+ year={2021},
46
+ howpublished={\url{https://github.com/IDEA-CCNL/Fengshenbang-LM}},
47
+ }
48
+ ```