返回顶部
热门问答 更多热门问答
技术文章 更多技术文章

Qwen3:0.6b 性能小钢炮

[复制链接]
链载Ai 显示全部楼层 发表于 1 小时前 |阅读模式 打印 上一主题 下一主题

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">因为最新在做一些数据清洗方面的处理,而且目前很多白嫖的API都有速率限制,所以就想着机子上部署一个小模型来试试。

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">很多人会感觉这么小的参数有什么用?效果一定很差,根本不会考虑去使用到这些小参数的模型。

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">虽然现在模型是出的越来越大了,动辄就是几百上千亿的参数,本地部署基本无望,但是杀鸡也不需要用牛刀,在综合了多方面的考虑,最终尝试用Qwen3-0.6B,虽然参数量小,但该有的功能都有,而且对硬件资源消耗不大,哪怕没有显卡,一般笔记本都能流畅快速跑起来,确实非常适合在某些对语义理解要求不是特别高的场合应用。

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;border-left: 4px solid rgb(30, 136, 229);border-radius: 0px 4px 4px 0px;color: rgb(30, 136, 229);font-weight: bold;box-shadow: rgba(0, 0, 0, 0.03) 0px 1px 3px;">部署

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">直接使用Ollama来部署就好了,可以看到Qwen3-0.6B只有500M左右,资源占用小

qwen3_20.png

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;border-left: 4px solid rgb(30, 136, 229);border-radius: 0px 4px 4px 0px;color: rgb(30, 136, 229);font-weight: bold;box-shadow: rgba(0, 0, 0, 0.03) 0px 1px 3px;">使用

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">分别测试在不同任务中的实际应用和效果。

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 1.7;">

ingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: white;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 18px;border-left: 3px solid rgb(156, 39, 176);border-radius: 0px 3px 3px 0px;color: rgb(156, 39, 176);font-weight: bold;">文本分类

Markdown
请判断以下邮件是否为垃圾邮件,仅回答“是”或“否”:
“恭喜您中奖!点击链接领取100万现金,链接:http://xxx.com”
qwen3_31.png

小模型推理速度极快(单条响应<100ms),适合部署在邮件服务器或客户端实时过滤垃圾邮件。相比大模型,无需高算力设备,可直接在边缘设备(如路由器、IoT网关)运行,降低云端依赖。


电商评论情感分析

Markdown
分析以下评论的情感倾向(正面/中性/负面),直接输出分类结果:
“屏幕显示效果很棒,但电池续航太差,用一天就得充两次电。”
qwen3_32_2.png

小模型在情感分析任务中准确率可达 90%+,响应时间仅需几十毫秒。适合电商网站实时分析用户评论,快速反馈给运营团队,且单台服务器可同时处理数千条并发请求。


订单信息结构化提取

Markdown
将以下订单信息转换为JSON格式,保留原始数据字段:
客户姓名:张三,订单号:20231015-001,产品:无线耳机,数量:2,收货地址:北京市朝阳区XX路100号
qwen3_33.png

小模型对结构化数据转换任务效率极高,适合订单系统、物流管理等场景。单次处理耗时仅需 20ms,且无需复杂训练,通过少量示例即可快速适配业务需求。


多语言文档关键信息检索

Markdo
从以下文档中提取所有与“气候变化”相关的事实性信息,用中文简要总结:
“全球变暖导致极端天气频发。根据IPCC报告,2023年全球平均气温比工业化前高1.2℃。科学家指出,若升温超过1.5℃,将引发不可逆生态灾难。”
qwen3_34_2.png

MTEB Multilingual基准测试中,Qwen3-0.6B得分 64.64 分,超越部分更大规模模型。适合跨国企业多语言文档处理,单设备可同时处理数十个语言任务,资源消耗仅为大模型的 1/10。


工具调用

虽然这个模型参数很小,但是也能够支持本地tools调用,当然MCP也是支持的

qwen3_36_1.png

使用Cherry Studio内置的搜索功能,用的是必应搜索,查了都是英文网站,所以返回的都是英文,没有自动转换为中文输出,不过软件中也支持直接翻译。

qwen3_37.png

最佳实践

以下是官方对于这个模型的最佳性能推荐配置


采样参数

  • 对于思考模式(enable_thinking=True),使用Temperature=0.6TopP=0.95TopK=20,以及MinP=0不要使用贪婪解码,因为它可能导致性能下降和无尽重复。

  • 对于非思考模式(enable_thinking=False),我们建议使用Temperature=0.7TopP=0.8TopK=20,以及MinP=0

  • 于支持的框架,您可以在0到2之间调整presence_penalty参数以减少无尽重复。但是,使用较高的值偶尔会导致语言混杂并轻微降低模型性能。


充足的输出长度

对于大多数查询,我们建议使用 32,768 个令牌的输出长度。对于高度复杂的基准测试问题,如数学和编程竞赛中发现的问题,我们建议将最大输出长度设置为 38,912 个令牌。这为模型提供了足够的空间来生成详细而全面的回答,从而提高其整体性能。


标准化输出格式

  • 数学问题
    在提示中包含“请逐步推理,并将最终答案放在 \boxed{} 内。”
  • 选择题
    向提示中添加以下 JSON 结构以标准化回答:“请在answer字段中仅显示选项字母,例如,"answer": "C"。”

历史记录中不包含思考内容

在多轮对话中,历史模型输出应仅包括最终输出部分,不需要包含思考内容。这已在提供的Jinja2聊天模板中实现。然而,对于不直接使用Jinja2聊天模板的框架,开发者需要确保遵循最佳实践。


总结

这种小模型的优势:

  • 资源占用极低
    仅需1GB内存即可运行,普通手机或嵌入式设备即可部署。
  • 高并发处理
    单台服务器可支撑数千QPS(每秒查询数),适合高频轻量任务。
  • 微调成本低
    仅需10分钟微调即可适配特定领域(如医疗问答、法律条款解析),效果接近大模型。
  • 实时性要求高
    对响应速度敏感的场景(如客服机器人、实时翻译),小模型的延迟优势显著。

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

链载AI是专业的生成式人工智能教程平台。提供Stable Diffusion、Midjourney AI绘画教程,Suno AI音乐生成指南,以及Runway、Pika等AI视频制作与动画生成实战案例。从提示词编写到参数调整,手把手助您从入门到精通。
  • 官方手机版

  • 微信公众号

  • 商务合作

  • Powered by Discuz! X3.5 | Copyright © 2025-2025. | 链载Ai
  • 桂ICP备2024021734号 | 营业执照 | |广西笔趣文化传媒有限公司|| QQ