bolin22 commited on
Commit
7b0a9a3
1 Parent(s): 757d4c1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -0
README.md CHANGED
@@ -1,3 +1,23 @@
1
  ---
2
  license: bigscience-bloom-rail-1.0
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: bigscience-bloom-rail-1.0
3
+ language:
4
+ - zh
5
+ pipeline_tag: text-generation
6
+ widget:
7
+ - text: "中国的首都是"
8
+
9
  ---
10
+
11
+ This model is based on [bigscience/bloom-3b](https://huggingface.co/bigscience/bloom-3b).
12
+
13
+ We pruned its vocabulary from 250880 to 46145 with Chinese corpus to reduce GPU memory usage. So the total parameter is 2b5 now.
14
+
15
+ # How to use
16
+ ```python
17
+ from transformers import BloomTokenizerFast, BloomForCausalLM
18
+
19
+ tokenizer = BloomTokenizerFast.from_pretrained('Langboat/bloom-2b5-zh')
20
+ model = BloomForCausalLM.from_pretrained('Langboat/bloom-2b5-zh')
21
+
22
+ print(tokenizer.batch_decode(model.generate(tokenizer.encode('中国的首都是', return_tensors='pt'))))
23
+ ```