开发者社区 > ModelScope模型即服务 > 正文

ModelScope中,llm 和 vllm 的输入格式还不一样么?

"ModelScope中,llm 和 vllm 的输入格式还不一样么? history1 = resp_list[1]['history']
request_list = [{'query': '这有什么好吃的', 'history': history1}]
resp_list = inference_vllm(llm_engine, template, request_list) query = '浙江的省会在哪里?'
gen = inference_stream(model, template, query)
print(f'query: {query}')
for response, history in gen:
print(f'response: {response}')
query = '这有什么好吃的?'
gen = inference_stream(model, template, query, history)"

展开
收起
Lucidly 2024-05-01 09:06:27 17 0
1 条回答
写回答
取消 提交回答
  • 这里vllm也有inference_stream_vllm 。此回答整理自钉群“魔搭ModelScope开发者联盟群 ①”

    2024-05-01 16:09:46
    赞同 展开评论 打赏

ModelScope旨在打造下一代开源的模型即服务共享平台,为泛AI开发者提供灵活、易用、低成本的一站式模型服务产品,让模型应用更简单!欢迎加入技术交流群:微信公众号:魔搭ModelScope社区,钉钉群号:44837352

相关电子书

更多
PAI灵骏智算 构建全链路LLM服务的最佳实践 立即下载
视觉AI能力的开放现状及ModelScope实战 立即下载
ModelScope助力语音AI模型创新与应用 立即下载