news 2026/4/17 22:23: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/4/18 5:42:14

Qwen3.5 的起步档:0.6B 与 1.7B,差的不只是参数量

本篇分析把小模型选型的问题拉回到工程本身&#xff1a;关键不在参数大小&#xff0c;而在任务是否需要持续推理和可复现的中间状态。0.6B 适合当“语言算子”&#xff0c;1.7B 更像可托付给流程的组件&#xff0c;落地时往往能减少系统复杂度。实践中&#xff0c;可以结合 Rol…

作者头像 李华
网站建设 2026/4/16 15:30:30

AI方向的就业机会将集中在哪些岗位?春招应届生如何提前筹备?

2025 年 AI 求职真的太火了&#xff01;作为过来人学长&#xff0c;最近不少学弟学妹都来问我怎么蹭上这个风口&#xff0c;毕竟现在 AI 相关岗位不仅招聘量暴涨&#xff0c;薪资还高得让人眼红。今天就结合最新招聘数据&#xff0c;给大家拆解不同学历、专业该怎么选岗位&…

作者头像 李华
网站建设 2026/4/15 9:13:02

Java:float 和 double

在 Java 中&#xff0c;float 和 double 都是用于表示浮点数的数据类型&#xff0c;但它们在精度、内存占用和适用场景上有所不同。 1. ‌精度与位数‌‌float‌ 是单精度浮点数&#xff0c;占用 4 个字节&#xff08;32 位&#xff09;&#xff0c;提供大约 6 到 7 位十进制有…

作者头像 李华
网站建设 2026/4/16 8:58:59

罗技G系列游戏外设全解析及G304X入门游戏鼠标推荐

一、罗技G系列&#xff1a;游戏外设的核心战略布局罗技作为全球外设巨头&#xff0c;其产品体系清晰分为两大核心系列&#xff1a;G系列&#xff08;游戏系列&#xff09;与办公系列。其中&#xff0c;G系列以“专业电竞”为核心定位&#xff0c;聚焦游戏场景的高性能需求&…

作者头像 李华
网站建设 2026/4/17 2:58:11

雷鸟创新背着10亿闯三关

拿了资本的钱&#xff0c;还需要蹚出自己的路。作者|安德鲁编辑|古廿作为智能眼镜领域的垂直玩家&#xff0c;刚拿到10亿元融资的雷鸟创新&#xff0c;正在进入一个并不轻松的阶段。甜蜜在于&#xff0c;行业窗口终于被打开。过去几年持续押注智能眼镜的雷鸟&#xff0c;开始真…

作者头像 李华
网站建设 2026/4/8 21:22:20

大数据领域数据运营的数据分析可视化

深入浅出&#xff1a;大数据领域数据运营的数据分析可视化 摘要/引言 在大数据时代&#xff0c;数据运营已成为企业决策的关键驱动力。然而&#xff0c;海量的数据若不经过有效处理和呈现&#xff0c;就如同深埋于矿山中的宝藏&#xff0c;难以发挥其价值。数据分析可视化作为…

作者头像 李华