news 2026/6/25 22:48:11

qwen 系列模型涉及到的部署、推理

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
qwen 系列模型涉及到的部署、推理

来源 https://qwen.readthedocs.io/en/latest/quantization/awq.html

  • 其中关于智能体部分
importos from qwen_agent.agentsimportAssistant# Define LLMllm_cfg={# Use a custom endpoint compatible with OpenAI API by vLLM/SGLang:'model':'Qwen/Qwen3-32B','model_server':'http://localhost:8000/v1',# api_base'api_key':'EMPTY',# 'generate_cfg': {# # When using vLLM/SGLang OAI API, pass the parameter of whether to enable thinking mode in this way# 'extra_body': {# 'chat_template_kwargs': {'enable_thinking': False}# },## # Add: When the content is `<think>this is the thought</think>this is the answer`# # Do not add: When the response has been separated by reasoning_content and content# # This parameter will affect the parsing strategy of tool call# # 'thought_in_content': True,# },}# llm_cfg = {# # Use the model service provided by DashScope:# 'model': 'qwen3-235b-a22b',# 'model_type': 'qwen_dashscope',## # 'generate_cfg': {# # # When using the Dash Scope API, pass the parameter of whether to enable thinking mode in this way# # 'enable_thinking': False,# # },# }# llm_cfg = {# # Use the OpenAI-compatible model service provided by DashScope:# 'model': 'qwen3-235b-a22b',# 'model_server': 'https://dashscope.aliyuncs.com/compatible-mode/v1',# 'api_key': os.getenv('DASHSCOPE_API_KEY'),## # 'generate_cfg': {# # # When using Dash Scope OAI API, pass the parameter of whether to enable thinking mode in this way# # 'extra_body': {# # 'enable_thinking': False# # },# # },# }# Define Toolstools=[{'mcpServers':{# You can specify the MCP configuration file'time':{'command':'uvx','args':['mcp-server-time','--local-timezone=Asia/Shanghai']},"fetch":{"command":"uvx","args":["mcp-server-fetch"]}}},'code_interpreter',# Built-in tools]# Define Agentbot=Assistant(llm=llm_cfg,function_list=tools)# Streaming generationmessages=[{'role':'user','content':'https://qwenlm.github.io/blog/ Introduce the latest developments of Qwen'}]forresponsesinbot.run(messages=messages): pass print(responses)
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/6/25 23:18:10

大模型从入门到精通:产业链、应用场景与市场前景全解析

本文全景分析人工智能大模型&#xff0c;详述其定义、分类、发展历程及产业链结构。大模型产业链包括基础层(算力、数据、算法)、模型层(通用和行业大模型)、应用层(To B和To C)及支撑服务&#xff0c;形成完整闭环。市场前景广阔&#xff0c;预计2028年全球AI支出将达6320亿美…

作者头像 李华
网站建设 2026/6/23 15:37:31

【面板数据】地市工业三废数据集(2003-2023年)

数据简介&#xff1a;工业三废是工业生产过程中产生的三类主要废弃物&#xff0c;包括废水、废气和废渣。它们若未经有效处理直接排放&#xff0c;会对环境、生态和人体健康造成严重危害。认识工业三废的危害&#xff0c;在于通过科学治理实现“环境-经济-社会”的多赢。它要求…

作者头像 李华
网站建设 2026/6/25 15:16:23

毕业论文盲审在即,现在还没动笔?

还有一个月左右就要提交毕业论文参加盲审&#xff0c;而你现在还面临着“零起步”的困境&#xff0c;这对于任何一位本科毕业生来说&#xff0c;无疑是一场巨大的心理考验。盲审环节的严格性不言而喻&#xff0c;它直接决定了你能否顺利拿到学位证书。在这种时间紧、任务重、要…

作者头像 李华
网站建设 2026/6/25 20:21:29

【SRC】抓包环境搭建与并发漏洞实战全解

本文仅用于技术研究&#xff0c;禁止用于非法用途。 Author:枷锁 小程序安全&#xff1a;抓包环境搭建与并发漏洞实战全解 在当前的网络安全渗透测试&#xff08;特别是 SRC 众测&#xff09;中&#xff0c;微信小程序已成为漏洞产出的“重灾区” 。小程序功能迭代快、与移动端…

作者头像 李华