当前位置: 首页 > wzjs >正文

温州做公众号和做网站的地方2024小学生时事新闻十条

温州做公众号和做网站的地方,2024小学生时事新闻十条,wordpress交易网站,国产网站开发工具公司文章目录 0 Qwen31 平台与环境安装1 模型下载2 模型测试 0 Qwen3 今天,通义千问Qwen团队正式开源推出 Qwen3,这是 Qwen 系列大型语言模型的最新成员。最新的Qwen3系列模型具备双模推理能力(深入思考/快速响应)、支持119种语言及方…

文章目录

  • 0 Qwen3
  • 1 平台与环境安装
  • 1 模型下载
  • 2 模型测试

0 Qwen3

今天,通义千问Qwen团队正式开源推出 Qwen3,这是 Qwen 系列大型语言模型的最新成员。最新的Qwen3系列模型具备双模推理能力(深入思考/快速响应)、支持119种语言及方言,并强化了Agent功能与代码执行能力,全面满足复杂问题处理与全球化应用需求。

Github: https://github.com/QwenLM/Qwen3

Blog:https://qwenlm.github.io/zh/blog/qwen3/

模型合集:https://www.modelscope.cn/collections/Qwen3-9743180bdc6b48
在这里插入图片描述

b站视频:https://www.bilibili.com/video/BV1spG1zEEYR

1 平台与环境安装

使用GPU平台: https://www.autodl.com/home

在这里插入图片描述
PyTorch / 2.3.0 / 3.12(ubuntu22.04) / 12.1

安装transformers、accelerate

source /etc/network_turbopip install transformerspip install accelerate

1 模型下载

Qwen3 模型广场:https://bailian.console.aliyun.com/?tab=model#/model-market
在这里插入图片描述
通过魔塔社区下载模型:https://www.modelscope.cn/collections/Qwen3-9743180bdc6b48
在这里插入图片描述

选择一个模型Qwen3-0.6B:https://www.modelscope.cn/models/Qwen/Qwen3-0.6B/files
在这里插入图片描述

使用SDK下载下载:

开始前安装

source /etc/network_turbopip install modelscope
# source /etc/network_turbo
from modelscope import snapshot_download# 指定模型的下载路径
cache_dir = '/root/autodl-tmp'
# 调用 snapshot_download 函数下载模型
model_dir = snapshot_download('Qwen/Qwen3-0.6B', cache_dir=cache_dir)
# model_dir = snapshot_download('Qwen/Qwen3-8B', cache_dir=cache_dir)
# model_dir = snapshot_download('Qwen/Qwen3-14B', cache_dir=cache_dir)print(f"模型已下载到: {model_dir}")

或者:

modelscope download --model Qwen/Qwen3-0.6Bmv /root/.cache/modelscope/hub/models/Qwen/ /root/autodl-tmp/Qwen

2 模型测试

from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Qwen/Qwen3-0.6B"
# model_name = "Qwen/Qwen3-8B"
# model_name = "Qwen/Qwen3-14B"# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name,torch_dtype="auto",device_map="auto"
)# prepare the model input
prompt = "Give me a short introduction to large language models."
messages = [{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages,tokenize=False,add_generation_prompt=True,enable_thinking=True # Switches between thinking and non-thinking modes. Default is True.
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)# conduct text completion
generated_ids = model.generate(**model_inputs,max_new_tokens=32768
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() # the result will begin with thinking content in <think></think> tags, followed by the actual response
print(tokenizer.decode(output_ids, skip_special_tokens=True))

enable_thinking=True的结果
在这里插入图片描述
enable_thinking=False的结果
在这里插入图片描述

http://www.dtcms.com/wzjs/210308.html

相关文章:

  • 网站开发有哪些认证企业网站开发费用
  • 100部看黄禁用免费在线东莞网络营销优化
  • seo文章优化方法seo效果分析
  • seo在网站建设中的作用微商怎么引流被加精准粉
  • 北京比较好的网站建设公司高端网站定制开发
  • 婚礼婚庆网站建设需求分析简易的旅游网页制作
  • 做网站需要哪些条件网站分为哪几种类型
  • 网站建设350元电商平台运营方案思路
  • 网站开发公司会计电商运营培训班
  • 公司的网站哪个部门做seo关键字怎么优化
  • 厦门做网站优化公司秦皇岛seo招聘
  • app网页设计网站河南推广网站的公司
  • 做网站的过程某网站seo诊断分析
  • 房产网站怎么做异地楼盘成都seo正规优化
  • 本地搭建多个网站按效果付费的网络推广方式
  • 武汉微信网站开发网络营销期末总结
  • 用c 做网站设计系统的项目作业免费视频网站推广软件
  • 网站建设步骤软文范例200字
  • 一步一步网站建设教程电商运营方案计划书
  • 百度 手机网站收录精准营销平台
  • 外贸行业网站建设公司排名网站搜索关键词优化
  • 旅游网站建设调研seo优化轻松seo优化排名
  • 郑州网站优化的微博_腾讯微博在哪里查关键词排名
  • 丰都网站建设哪家好对百度竞价排名的看法
  • 做照片书哪个网站好在线超级外链工具
  • 小程序服务器可以做网站吗磁力天堂最佳搜索引擎入口
  • 分享设计的网站成人厨师短期培训班
  • 网络营销推广的主要特点苏州搜索引擎优化
  • 做黄色 网站视频号视频怎么看下载链接
  • wordpress伪春菜seo优化工作