inference icon indicating copy to clipboard operation
inference copied to clipboard

xinference transformer形式 目前不支持qwen的function call 之前老版本是支持的

Open Songjiadong opened this issue 8 months ago • 3 comments

System Info / 系統信息

xinference transformer形式 目前不支持qwen的function call 之前老版本是支持的 报错:'str' object has no attribute 'get'

Running Xinference with Docker? / 是否使用 Docker 运行 Xinfernece?

  • [ ] docker / docker
  • [x] pip install / 通过 pip install 安装
  • [ ] installation from source / 从源码安装

Version info / 版本信息

xinference 1.4.0

The command used to start Xinference / 用以启动 xinference 的命令

cd /data/galileo/models/xinference . xinference/bin/activate xinference-local --host 0.0.0.0 --port 8888

Reproduction / 复现过程

正常通过langchain prompt转化结构

 __doc_abstract_template = """你是一名负责写文章总结摘要(Summary)的工作者。
                                     工作职责要求
                                      将给的文章进行总结,总结要突出文章的主题以及中心思想;总结内容要求层次清晰;总结内容要涉及时间、主要人物、发生的事件、事件的结果
                                     限制
                                     1.总结的长度必须是至多包含3个句子,总字数不超过150字
                                     2.使用给定文章的语言进行总结,如果无法判定则默认使用:中文
                                     3.直接给出摘要文字,不要出现任何推理、以及“总结如下:”等字样
                                     4.总结的内容不能有重复的语句
                                     
                                     提供的文章标题:{title}
                                     提供的文章上下文内容:
                                        {document}
                                     
                                     注意
                                      1.总结的口吻应以第一人称的口吻进行撰写;并以叙述事件的口吻进行撰写;
                                      2.使用短小精炼的句子,让核心观点一目了然,避免复杂的表达让读者失去耐心;
                                      3.开篇不绕弯子,直接切入文章的核心话题,抓住读者的注意力;
                                      4.摘要内容精简,避免不必要的赘述,保持每句话都有意义;
                                      5.摘要层层递进,逻辑清晰,逐步引导读者进入更深的思考
                                     
                                     {format_instructions}
                                     
                                     总结摘要:\n
                                    """
        parser = PydanticOutputParser(pydantic_object=Summary)
        prompt = PromptTemplate.from_template(template=__doc_abstract_template, partial_variables={
            "format_instructions": parser.get_format_instructions()})
        self.abstract_chain = {"document": itemgetter("document"), "title": itemgetter("title")} | prompt | llm | parser

调用代码

summary: Summary = await self.generate_abstract_async(title=galileo_spider.get("Title"),
                                                                          document=galileo_spider.get("Content"))

Expected behavior / 期待表现

summary结构化代码,目前报错,但是如果使用vllm结果正常,不过之前老版本是支持的transformer

Songjiadong avatar Apr 15 '25 08:04 Songjiadong

@codingl2k1 Could you look at this?

qinxuye avatar Apr 15 '25 09:04 qinxuye

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar Apr 22 '25 19:04 github-actions[bot]

@codingl2k1 Could you look at this?

我看看

codingl2k1 avatar Apr 23 '25 20:04 codingl2k1

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar May 01 '25 19:05 github-actions[bot]

@codingl2k1 有结果了么? 什么原因

Songjiadong avatar May 06 '25 03:05 Songjiadong

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar May 13 '25 19:05 github-actions[bot]

@qinxuye 能帮忙看看么?

Songjiadong avatar May 14 '25 01:05 Songjiadong

@amumu96 tool calls 的问题统一看下。

qinxuye avatar May 14 '25 02:05 qinxuye

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar May 21 '25 19:05 github-actions[bot]

@qinxuye 有结论了么?

Songjiadong avatar May 22 '25 02:05 Songjiadong

@qinxuye 是否需要继续升级呢

Songjiadong avatar May 22 '25 02:05 Songjiadong

预计要等下个版本。

qinxuye avatar May 22 '25 03:05 qinxuye

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] avatar May 29 '25 19:05 github-actions[bot]

This issue was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Jun 04 '25 19:06 github-actions[bot]