Update README.md
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ We release SongComposer series in two versions:
|
|
| 31 |
### Import from Transformers
|
| 32 |
To load the SongComposer_sft model using Transformers, use the following code:
|
| 33 |
```python
|
| 34 |
-
from transformers import AutoTokenizer,
|
| 35 |
ckpt_path = "Mar2Ding/songcomposer_sft"
|
| 36 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
| 37 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|
|
@@ -43,7 +43,7 @@ model.inference(prompt, tokenizer)
|
|
| 43 |
通过以下的代码加载 SongComposer_sft 模型
|
| 44 |
|
| 45 |
```python
|
| 46 |
-
from transformers import AutoTokenizer,
|
| 47 |
ckpt_path = "Mar2Ding/songcomposer_sft"
|
| 48 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
| 49 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|
|
|
|
| 31 |
### Import from Transformers
|
| 32 |
To load the SongComposer_sft model using Transformers, use the following code:
|
| 33 |
```python
|
| 34 |
+
from transformers import AutoTokenizer, AutoModel
|
| 35 |
ckpt_path = "Mar2Ding/songcomposer_sft"
|
| 36 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
| 37 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|
|
|
|
| 43 |
通过以下的代码加载 SongComposer_sft 模型
|
| 44 |
|
| 45 |
```python
|
| 46 |
+
from transformers import AutoTokenizer, AutoModel
|
| 47 |
ckpt_path = "Mar2Ding/songcomposer_sft"
|
| 48 |
tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
|
| 49 |
model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
|