Views
No views yet
1from transformers import AutoTokenizer, AutoModel
2ckpt_path = "Mar2Ding/songcomposer_sft"
3tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
4model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
5prompt = 'Create a song on brave and sacrificing with a rapid pace.'
6model.inference(prompt, tokenizer)1from transformers import AutoTokenizer, AutoModel
2ckpt_path = "Mar2Ding/songcomposer_sft"
3tokenizer = AutoTokenizer.from_pretrained(ckpt_path, trust_remote_code=True)
4model = AutoModel.from_pretrained(ckpt_path, trust_remote_code=True).cuda().half()
5prompt = 'Create a song on brave and sacrificing with a rapid pace.'
6model.inference(prompt, tokenizer)