Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Randeng-DAVAE-1.2B-General-Chinese
|
2 |
+
|
3 |
+
## 使用 Usage
|
4 |
+
```shell
|
5 |
+
git clone https://github.com/IDEA-CCNL/Fengshenbang-LM.git
|
6 |
+
cd Fengshenbang-LM
|
7 |
+
pip install --editable .
|
8 |
+
```
|
9 |
+
|
10 |
+
|
11 |
+
```python3
|
12 |
+
import argparse
|
13 |
+
import torch
|
14 |
+
from fengshen.models.DAVAE.DAVAEModel import DAVAEModel
|
15 |
+
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
16 |
+
vae_model = DAVAEModel.from_pretrained("IDEA-CCNL/Randeng-DAVAE-1.2B-General-Chinese").to(device)
|
17 |
+
input_texts = [
|
18 |
+
"针对电力系统中的混沌振荡对整个互联电网的危害问题,提出了一种基于非线性光滑函数的滑模控制方法.",
|
19 |
+
"超市面积不算大.挺方便附近的居民购买的. 生活用品也比较齐全.价格适用中.",
|
20 |
+
]
|
21 |
+
output_texts = vae_model.simulate_batch(input_texts)
|
22 |
+
print(output_texts)
|
23 |
+
|
24 |
+
```
|