wangyulong
commited on
Commit
·
1f63158
1
Parent(s):
e34c6a3
Update README.md
Browse files
README.md
CHANGED
@@ -4,11 +4,20 @@ language:
|
|
4 |
- zh
|
5 |
pipeline_tag: text-generation
|
6 |
widget:
|
7 |
-
- text: "
|
8 |
|
9 |
---
|
10 |
|
11 |
-
|
12 |
|
|
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
- zh
|
5 |
pipeline_tag: text-generation
|
6 |
widget:
|
7 |
+
- text: "中国的首都是"
|
8 |
|
9 |
---
|
10 |
|
11 |
+
This model is based on [bigscience/bloom-1b1](https://huggingface.co/bigscience/bloom-1b1).
|
12 |
|
13 |
+
We pruned its vocabulary from 250880 to 46145 with Chinese corpus to reduce GPU memory usage. So the total parameter is 389m now.
|
14 |
|
15 |
+
# How to use
|
16 |
+
```python
|
17 |
+
from transformers import BloomTokenizerFast, BloomForCausalLM
|
18 |
+
|
19 |
+
tokenizer = BloomTokenizerFast.from_pretrained('Langboat/bloom-800m-zh')
|
20 |
+
model = BloomForCausalLM.from_pretrained('Langboat/bloom-800m-zh')
|
21 |
+
|
22 |
+
print(tokenizer.batch_decode(model.generate(tokenizer.encode('中国的首都是', return_tensors='pt'))))
|
23 |
+
```
|