news 2026/5/30 16:53:44

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/5/28 21:50:51

数据中台建设中的主数据管理(MDM)实践

友情提示&#xff1a;全文约 1.1 万字&#xff0c;阅读时间 35–45 min。建议先收藏&#xff0c;再跟着代码边做边读。 从零到一&#xff1a;数据中台主数据管理&#xff08;MDM&#xff09;落地实践 副标题&#xff1a;用一套可落地的开源技术栈&#xff0c;带你走完“主数据识…

作者头像 李华
网站建设 2026/5/29 2:07:06

Java打造旅行攻略及搭子匹配系统源码

Java旅行攻略及搭子匹配系统源码深度解析&#xff08;架构功能代码&#xff09; 一、技术架构&#xff1a;高并发与实时交互的基石 微服务架构设计 Spring Boot 3.0 Spring Cloud Alibaba&#xff1a;构建用户服务、攻略服务、匹配服务、支付服务等独立微服务&#xff0c;通…

作者头像 李华
网站建设 2026/5/28 22:56:04

赋能数据决策!10款好用的BI工具核心能力速览,适配多行业场景

在数据被普遍视为核心资产的时代&#xff0c;企业决策的范式正从“经验驱动”全面转向“数据驱动”。面对市场上琳琅满目的商业智能&#xff08;BI&#xff09;工具&#xff0c;决策者往往陷入选择困境&#xff1a;是追求极致的数据可视化效果&#xff0c;还是拥抱强大的AI智能…

作者头像 李华
网站建设 2026/5/28 18:00:26

LLM教程 | 第1讲:RAG原理解读:让检索增强生成不再是黑盒

本文将首先介绍大模型的基础&#xff0c;包括定义、工作原理与挑战&#xff0c;逐步探讨其应用场景与局限性。接着将介绍RAG技术的崛起&#xff0c;分析其如何通过结合外部知识库来增强大模型的能力&#xff0c;并详细阐述RAG的工作流程、核心组件、功能以及主要类型与变体。最…

作者头像 李华
网站建设 2026/5/30 11:35:51

PingApi接口开发平台4.0发布

PingApi 是一款 API 接口开发平台&#xff0c;企业级接口管理、SQL2API 平台。支持动态数据源、动态 SQL 和标签&#xff0c; 支持接入&#xff08;mysql、oracle、达梦、TiDB、hive、es 和hbase&#xff09;等 SQL 或 NoSQL 数据源&#xff0c;在线可视化编写 SQL 快速发布接口…

作者头像 李华
网站建设 2026/5/29 19:10:51

玩手机看手机打电话检测数据集VOC+YOLO格式2332张2类别

注意数据集中存在少量增强&#xff0c;且图片里面人脸都经过遮挡处理数据集格式&#xff1a;Pascal VOC格式YOLO格式(不包含分割路径的txt文件&#xff0c;仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件)图片数量(jpg文件个数)&#xff1a;2332标注数量(xml文件个…

作者头像 李华