A cutting-edge foundation for your very own LLM.
? TigerBot • ? Hugging Face
Github
https://github.com/TigerResearch/TigerBot
Usage
from modelscope.utils.constant import Tasks
from modelscope.pipelines import pipeline
pipe = pipeline(task=Tasks.text_generation, model='AI-ModelScope/tigerbot-7b-sft', model_revision='v1.0.0')
tok_ins = "\n\n### Instruction:\n"
tok_res = "\n\n### Response:\n"
prompt_input = tok_ins + "{instruction}" + tok_res
input_text = "What is the next number after this list: [1, 2, 3, 5, 8, 13, 21]"
input_text = prompt_input.format_map({'instruction': input_text})
result = pipe(input_text)
print(result)
输出
{'text': '34'}
评论