Update README.md
Browse files
README.md
CHANGED
@@ -28,7 +28,7 @@ We release SongComposer series in two versions:
|
|
28 |
### Import from Transformers
|
29 |
To load the SongComposer_pretrain model using Transformers, use the following code:
|
30 |
```python
|
31 |
-
from transformers import AutoTokenizer,
|
32 |
ckpt_path = "Mar2Ding/songcomposer_pretrain"
|
33 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
34 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|
@@ -39,7 +39,7 @@ model.inference_pretrain(prompt, tokenizer, model)
|
|
39 |
### 通过 Transformers 加载
|
40 |
通过以下的代码加载 SongComposer_pretrain 模型
|
41 |
```python
|
42 |
-
from transformers import AutoTokenizer,
|
43 |
ckpt_path = "Mar2Ding/songcomposer_pretrain"
|
44 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
45 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|
|
|
28 |
### Import from Transformers
|
29 |
To load the SongComposer_pretrain model using Transformers, use the following code:
|
30 |
```python
|
31 |
+
from transformers import AutoTokenizer, AutoModel
|
32 |
ckpt_path = "Mar2Ding/songcomposer_pretrain"
|
33 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
34 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|
|
|
39 |
### 通过 Transformers 加载
|
40 |
通过以下的代码加载 SongComposer_pretrain 模型
|
41 |
```python
|
42 |
+
from transformers import AutoTokenizer, AutoModel
|
43 |
ckpt_path = "Mar2Ding/songcomposer_pretrain"
|
44 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
45 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|