资讯动态

Qwen3 全栈实战指南:从 Transformers 快速推理到 vLLM/SGLang 生产部署

发布时间:2026/9/11 1:30:25 来源:尧图企业网站定制
Qwen3 全栈实战指南从 Transformers 快速推理到 vLLM/SGLang 生产部署【免费下载链接】Qwen1.5Qwen3 is the large language model series developed by Qwen team, Alibaba Cloud.项目地址: https://gitcode.com/GitHub_Trending/qw/Qwen1.5本篇技术指南以 Qwen3 开源模型家族为核心系统讲解其最新版本 Qwen3-2507Instruct 与 Thinking 两种变体的模型能力、基于 Transformers 的快速上手推理、思考模式切换机制、llama.cpp/Ollama 等本地运行方案以及 SGLang/vLLM/TensorRT-LLM 等大规模部署框架的完整实操命令。读者学完本篇后将能够独立完成 Qwen3 模型的下载、推理、部署与 API 化接入并理解长上下文YaRN、思维预算Thinking Budget、工具调用等进阶特性的底层原理与配置方法。Qwen3 模型家族概览Qwen3 是由 Qwen 团队阿里云开发的开源大语言模型系列权重以 Apache 2.0 协议公开包含稠密Dense与混合专家Mixture-of-ExpertsMoE两种架构。当前仓库对应的模型系列经历了两次主要发布Qwen3-2507最新版本在 Qwen3 初版发布后的三个月里持续探索模型潜力推出 Qwen3-Instruct-2507 与 Qwen3-Thinking-2507 两个变体覆盖 235B-A22B、30B-A3B、4B 三种尺寸。其中 A22B/A3B 表示 MoE 架构中的活跃参数量235B 总参数/22B 活跃参数30B 总参数/3B 活跃参数。Qwen3-2504初版即常说的 Qwen3 系列提供 0.6B、1.7B、4B、8B、14B、32B 稠密模型以及 30B-A3B、235B-A22B MoE 模型支持 100 语言与方言。Qwen3-Instruct-2507 关键增强Instruct 变体延续了此前 Qwen3 的 non-thinking非思考模式核心增强包括综合能力显著提升指令遵循、逻辑推理、文本理解、数学、科学、代码与工具使用能力均有明显改善长尾知识覆盖扩展跨多语言的知识覆盖范围大幅增加偏好对齐改善在主观性与开放式任务中与用户偏好的对齐程度明显提高生成的回复更有帮助性、文本质量更高长上下文能力256K token 长上下文理解能力增强可进一步扩展至 100 万 token1M tokens见 2025.08.08 更新说明。Qwen3-Thinking-2507 关键增强Thinking 变体延续了 Qwen3 思考模型的路线提升推理质量与深度推理任务性能显著提升在逻辑推理、数学、科学、代码以及通常需要人类专家水平的学术基准上表现大幅改善通用能力提升指令遵循、工具使用、文本生成与人类偏好对齐均明显增强长上下文256K 长上下文理解能力增强可扩展至 1M tokens。初版 Qwen32504的核心亮点还包括思考模式面向复杂逻辑推理、数学与编码与非思考模式面向高效通用对话之间的无缝切换推理能力超越前代 QwQ思考模式与 Qwen2.5 Instruct非思考模式在创意写作、角色扮演、多轮对话与指令遵循上具备更强的偏好对齐Agent 能力突出可在思考与非思考两种模式下精确集成外部工具。关于 Qwen3 各版本的技术细节、评测数据与发布日志可参阅仓库根目录的 README.md更详细的模型能力介绍见同目录下的 Qwen3_Technical_Report.pdf。快速开始基于 Transformers 的推理Transformers 是进行预训练 NLP 模型推理与训练的标准库。运行 Qwen3 需要transformers4.51.0建议使用 Python 3.10 与 PyTorch 2.6详见 inference/transformers.md 的环境要求。Instruct-2507非思考模式推理Qwen3-Instruct-2507只支持非思考模式输出中不会出现think/think块。与 Qwen3-2504 不同2507 版本不再需要也不再支持传enable_thinkingFalse。以下代码演示如何使用Qwen/Qwen3-30B-A3B-Instruct-2507基于输入生成内容对应 README.md 的官方示例from transformers import AutoModelForCausalLM, AutoTokenizer model_name Qwen/Qwen3-30B-A3B-Instruct-2507 # load the tokenizer and the model tokenizer AutoTokenizer.from_pretrained(model_name) model AutoModelForCausalLM.from_pretrained( model_name, torch_dtypeauto, device_mapauto ) # prepare the model input prompt Give me a short introduction to large language model. messages [ {role: user, content: prompt} ] text tokenizer.apply_chat_template( messages, tokenizeFalse, add_generation_promptTrue, ) model_inputs tokenizer([text], return_tensorspt).to(model.device) # conduct text completion generated_ids model.generate( **model_inputs, max_new_tokens16384 ) output_ids generated_ids[0][len(model_inputs.input_ids[0]):].tolist() content tokenizer.decode(output_ids, skip_special_tokensTrue) print(content:, content)采样参数建议来自 getting_started/quickstart.mdInstruct-2507 推荐temperature0.7、top_p0.8、top_k20、min_p0。在支持的框架中可将presence_penalty调至 0~2 以降低重复但过高的值偶尔会导致语言混杂和轻微的性能下降。Instruct-2507 在复杂任务中可能自动使用思维链CoT建议大多数查询使用 16,384 token 的输出长度。Thinking-2507思考模式推理Qwen3-Thinking-2507只支持思考模式。为了强制模型思考默认聊天模板会自动包含think因此模型输出中只出现/think缺少开头的think标签是完全正常的。以下代码演示思考内容与最终回答的解析对应 README.md 官方示例from transformers import AutoModelForCausalLM, AutoTokenizer model_name Qwen/Qwen3-30B-A3B-Thinking-2507 # load the tokenizer and the model tokenizer AutoTokenizer.from_pretrained(model_name) model AutoModelForCausalLM.from_pretrained( model_name, torch_dtypeauto, device_mapauto ) # prepare the model input prompt Give me a short introduction to large language model. messages [ {role: user, content: prompt} ] text tokenizer.apply_chat_template( messages, tokenizeFalse, add_generation_promptTrue, ) model_inputs tokenizer([text], return_tensorspt).to(model.device) # conduct text completion generated_ids model.generate( **model_inputs, max_new_tokens32768 ) output_ids generated_ids[0][len(model_inputs.input_ids[0]):].tolist() # parsing thinking content try: # rindex finding 151668 (/think) index len(output_ids) - output_ids[::-1].index(151668) except ValueError: index 0 thinking_content tokenizer.decode(output_ids[:index], skip_special_tokensTrue).strip(\n) content tokenizer.decode(output_ids[index:], skip_special_tokensTrue).strip(\n) print(thinking content:, thinking_content) # no opening think tag print(content:, content)采样参数建议Thinking-2507 推荐temperature0.6、top_p0.95、top_k20、min_p0。Thinking 变体的思考深度增加强烈建议在高度复杂的推理任务中提供充足的最大生成长度示例中max_new_tokens32768。初版 Qwen3 的思考/非思考模式切换对于初版 Qwen32504模型默认会先思考再回答可通过两种方式控制硬开关向tokenizer.apply_chat_template传入enable_thinkingFalse将严格阻止模型生成思考内容使行为与 Qwen2.5-Instruct 对齐适合对效率有硬性要求的场景。默认enable_thinkingTrue。软开关在系统或用户消息中使用/think与/no_think指令让模型按指令决定是否思考多轮对话中模型遵循最近的指令。快速上手文档 getting_started/quickstart.md 中给出了初版 Qwen3-8B 的完整示例与解析逻辑同样基于151668这个/thinktoken id。注意思考模式不要使用贪心解码greedy decoding否则可能导致性能退化与无休止重复应使用 Temperature0.6、TopP0.95、TopK20、MinP0generation_config.json中的默认值。pipeline 接口、流式与批量推理除generate()接口外inference/transformers.md 还介绍了pipeline(text-generation)接口支持多轮对话、流式输出TextStreamer/TextIteratorStreamer后者需配合threading.Thread在后台生成、批量生成需设置tokenizer.padding_sideleft等能力。几个关键参数设备放置device_mapauto自动将模型参数分布到多个设备依赖accelerate单设备可用device指定如device-1/devicecpu用 CPU、devicecuda用当前 GPU、devicecuda:1/device1用第二张 GPU。device_map与device不可同时使用。计算精度torch_dtypeauto会根据检查点原始精度与设备能力自动确定数据类型现代设备上通常为bfloat16不传则默认float32显存占用翻倍且更慢。本地模型model_name_or_path既可以是Qwen/Qwen3-8B这样的模型 ID也可以是本地路径可通过huggingface-cli download --local-dir ./Qwen3-8B Qwen/Qwen3-8B或modelscope download --local_dir ./Qwen3-8B Qwen/Qwen3-8B提前下载。长上下文YaRN 与 1M token 扩展Qwen32504模型的预训练最大上下文为 32,768 tokens可通过 RoPE 缩放技术官方验证了 YaRN扩展到 131,072 tokens。在 Transformers 中可通过修改模型文件的config.json或加载时覆盖参数启用{ max_position_embeddings: 131072, rope_scaling: { rope_type: yarn, factor: 4.0, original_max_position_embeddings: 32768 } }或在加载模型时通过model_kwargs传入上述rope_scaling配置。要点Transformers 实现的是静态 YaRN缩放因子与输入长度无关可能影响短文本性能仅在确需处理长上下文时启用建议按实际典型上下文长度调整factor例如典型上下文为 65,536 tokens 时设置factor2.0需注意 Transformers 4.52.3 起会以max_position_embeddings / rope_scaling.original_max_position_embeddings作为实际缩放因子而不论手动指定的rope_scaling.factor。对Qwen3-2507 系列官方已支持 256K token 上下文理解并自 2025.08.08 起可处理100 万 token1M的超长输入具体启用方式见各模型卡说明README.md News 板块。SGLang 与 vLLM 下的 YaRN 配置方法见下文部署章节。ModelScope国内用户推荐针对模型下载问题官方强烈建议中国大陆用户使用 ModelScopeREADME.md 与 getting_started/quickstart.md。modelscope提供与transformers相似但不完全相同的 Python API只需将导入语句改为from modelscope import AutoModelForCausalLM, AutoTokenizer其余代码逻辑不变。其 CLI 工具modelscope download可解决检查点下载问题。对于 vLLM 与 SGLang 部署分别设置环境变量VLLM_USE_MODELSCOPEtrue与SGLANG_USE_MODELSCOPEtrue即可从 ModelScope 拉取模型。本地运行 Qwen3llama.cppllama.cpp 以极小的依赖面与广泛硬件支持著称x86_64 CPU 的 AVX/AVX2/AVX512、Apple Silicon 的 Metal、NVIDIA CUDA、AMD hipBLAS、Intel SYCL、Ascend NPU、Vulkan 等并支持多种量化方案与 CPUGPU 混合推理。建议使用llama.cppb5401完整支持 Qwen3MoE 支持自 b5092 起。获取程序推荐本地编译以免费获得 CPU 优化需gcc与cmakegit clone https://github.com/ggml-org/llama.cpp cd llama.cpp cmake -B build cmake --build build --config Release -j 8编译产物位于./build/bin/。也可用 Homebrewbrew install llama.cpp或 GitHub Releases 预编译二进制注意架构与后端匹配。获取 GGUF 模型GGUFGPT-Generated Unified Format文件包含运行模型所需的权重、超参数、默认生成配置与分词器。官方提供了系列 GGUF 模型仓库名带-GGUF后缀例如huggingface-cli download Qwen/Qwen3-8B-GGUF qwen3-8b-q4_k_m.gguf --local-dir .也可用 llama.cpp 的convert-hf-to-gguf.py脚本将 HF 模型转换为 GGUF再用量化指南生成所需的量化等级。命令行对话llama-cli对应 README.md 官方命令./llama-cli -hf Qwen/Qwen3-8B-GGUF:Q8_0 --jinja --color -ngl 99 -fa -sm row --temp 0.6 --top-k 20 --top-p 0.95 --min-p 0 -c 40960 -n 32768 --no-context-shift # CTRLC to exit参数含义详见 run_locally/llama.cpp.md模型-hf Qwen/Qwen3-8B-GGUF:Q8_0从 Hugging Face Hub 拉取 Q8_0 量化模型本地文件用-m qwen3-8b-q8_0.gguf远程 URL 用-mu url加速-t 8指定 CPU 线程-ngl 99将全部层卸载到 GPU多 GPU 时自动分布可用-dev cuda0,cuda1 -sm row控制设备与切分方式-fa可加速生成采样--temp/--top-k/--top-p/--min-p对应推荐采样参数遇到重复与无休止生成时可加--presence-penalty最高 2.0上下文管理llama.cpp 默认采用旋转式上下文管理context shift——上下文满时保留开头--keep个 token 并丢弃其余一半后继续生成从而实现无限生成-c控制最大上下文默认 40960 表示从模型加载-n控制每次最大生成长度上例中的--no-context-shift即禁用旋转行为达到-c即停止。YaRN 可通过-c 131072 --rope-scaling yarn --rope-scale 4 --yarn-orig-ctx 32768启用对话--jinja使用 GGUF 内嵌的聊天模板Qwen3 会自动进入聊天模式--color区分用户输入与模型输出。API 服务器llama-server./llama-server -hf Qwen/Qwen3-8B-GGUF:Q8_0 --jinja --reasoning-format deepseek -ngl 99 -fa -sm row --temp 0.6 --top-k 20 --top-p 0.95 --min-p 0 -c 40960 -n 32768 --no-context-shift --port 8080默认 Web 前端在http://localhost:8080OpenAI 兼容 API 在http://localhost:8080/v1。llama-server 还支持思考内容解析--reasoning-format与工具调用解析。注意llama.cpp 未暴露聊天模板中的硬开关如需完全禁用思考可传入仓库提供的自定义聊天模板 docs/source/assets/qwen3_nonthinking.jinja等价于始终enable_thinkingFalse即使模型被/think指令要求思考也不会生成思考内容通过--chat-template-file指定。Ollama安装 Ollama 后建议 v0.9.0先启动服务再拉取并运行模型README.md 官方示例ollama serve # 使用过程中需保持此服务运行 ollama run qwen3:8b # 设置参数输入 /set parameter num_ctx 40960 与 /set parameter num_predict 32768 # 退出输入 /bye 并回车 # 对 Qwen3-2504 模型 # - 默认开启思考输入 /set think # - 关闭思考输入 /set nothink可通过后缀指定模型尺寸如:8b、:30b-a3b。Ollama 同时提供 OpenAI 兼容 API默认地址http://localhost:11434/v1/使用前需保持ollama serve运行并先执行一次ollama run以准备检查点。两点重要提醒命名差异Ollama 的命名可能与 Qwen 官方不一致例如截至 2025 年 8 月qwen3:30b-a3b实际指向qwen3:30b-a3b-thinking-2507-q4_K_M使用前请核对 Ollama 模型库的 tag 列表上下文配置Ollama 沿用 llama.cpp 的旋转式上下文管理但其默认设置num_ctx2048、num_predict-1即 2048 token 上下文下的无限生成可能给 Qwen3 带来麻烦务必合理设置num_ctx与num_predict上例中建议 40960 与 32768。其他本地运行方式LM Studio已官方支持 Qwen3可直接使用官方 GGUF 文件MLX LMApple Silicon 用户可使用mlx-lmmlx-lm0.24.0在 Hugging Face Hub 上查找以 MLX 结尾的模型OpenVINOIntel CPU/GPU 用户可参考其 llm-chatbot 示例ExecuTorch可导出并在 iOS、Android、Mac、Linux 等平台运行MNN支持在移动设备上运行 Qwen3。大规模部署SGLang / vLLM / TensorRT-LLMQwen3 支持多种推理框架部署官方在 README.md 中演示了 SGLang、vLLM 与 TensorRT-LLM并提供了面向 Qwen3-2507 与初版 Qwen3 的启动命令。仓库内另有 deployment/sglang.md 与 deployment/vllm.md 提供完整指南。SGLang 部署SGLang 是面向 LLM 与 VLM 的高性能服务框架需sglang0.4.6.post1安装pip install sglang[all]0.4.6.post1。启动 OpenAI 兼容 API 服务# Qwen3-Instruct-2507 python -m sglang.launch_server --model-path Qwen/Qwen3-30B-A3B-Instruct-2507 --port 30000 --context-length 262144 # Qwen3-Thinking-2507需指定 reasoning parser python -m sglang.launch_server --model-path Qwen/Qwen3-30B-A3B-Thinking-2507 --port 30000 --context-length 262144 --reasoning-parser deepseek-r1 # 初版 Qwen3 python -m sglang.launch_server --model-path Qwen/Qwen3-8B --port 30000 --context-length 131072 --reasoning-parser qwen3OpenAI 兼容 API 地址为http://localhost:30000/v1。其他要点默认从 Hugging Face Hub 下载模型设置export SGLANG_USE_MODELSCOPEtrue可从 ModelScope 下载张量并行--tensor-parallel-size 4在 4 张 GPU 上并行思考内容解析--reasoning-parser qwen32507 变体当前建议deepseek-r1响应消息中除content外会多出reasoning_content字段注意enable_thinkingFalse可能与该特性不兼容如需禁用思考请关闭解析工具调用解析--tool-call-parser qwen25可将模型生成的工具调用解析为结构化消息结构化/JSON 输出SGLang 支持 structured/JSON output也可在 system message 或提示词中要求模型生成指定格式量化模型FP8 与 AWQ 预量化模型可直接服务换模型名即可如Qwen/Qwen3-8B-FP8、Qwen/Qwen3-8B-AWQYaRN 长上下文python -m sglang.launch_server --model-path Qwen/Qwen3-8B --json-model-override-args {rope_scaling:{rope_type:yarn,factor:4.0,original_max_position_embeddings:32768}} --context-length 131072vLLM 部署vLLM 以高吞吐、高效 KV 缓存管理PagedAttention、连续批处理与优化 CUDA 内核著称建议vllm0.9.0安装pip install vllm0.8.5注意预编译包对 torch/CUDA 版本有严格依赖。启动服务# Qwen3-Instruct-2507 vllm serve Qwen/Qwen3-30B-A3B-Instruct-2507 --port 8000 --max-model-len 262144 # Qwen3-Thinking-2507 vllm serve Qwen/Qwen3-30B-A3B-Thinking-2507 --port 8000 --max-model-len 262144 --enable-reasoning --reasoning-parser deepseek_r1 # 初版 Qwen3 vllm serve Qwen/Qwen3-8B --port 8000 --max-model-len 131072 --enable-reasoning --reasoning-parser qwen3OpenAI 兼容 API 地址为http://localhost:8000/v1。其他要点设置export VLLM_USE_MODELSCOPEtrue从 ModelScope 下载模型张量并行用--tensor-parallel-size 4思考内容解析--enable-reasoning --reasoning-parser deepseek_r1自 vLLM 0.9.0 起可使用--reasoning-parser qwen3。vLLM 0.8.5 中enable_thinkingFalse与解析不兼容0.9.0 的qwen3parser 已解决工具调用解析--enable-auto-tool-choice --tool-call-parser hermes量化模型FP8 为块级量化block-wise quant需 NVIDIA 计算能力 8.9Ada Lovelace、Hopper 及更新架构以 w8a8 运行自 vLLM 0.9.0 起 FP8 Marlin 支持块级量化以 w8a16 运行也可在 Ampere 卡上运行。若遇到ValueError: The output_size of gates and ups weight 192 is not divisible by weight quantization block_n 128说明张量并行度与权重不一致建议降低--tensor-parallel-size如 4或启用专家并行--tensor-parallel-size 8 --enable-expert-parallelYaRN 长上下文vllm serve Qwen/Qwen3-8B --rope-scaling {rope_type:yarn,factor:4.0,original_max_position_embeddings:32768} --max-model-len 131072OOM 排查来自 deployment/vllm.md FAQ重点调整--max-model-len默认max_position_embedding为 40960显存占用高与--gpu-memory-utilization默认 0.9即预分配 90% GPU 显存使用 CUDA Graphs 时应降低该值否则可尝试--enforce-eager。上下文长度说明SGLang 与 vLLM 中Qwen3 预训练上下文上限为 32,768 tokens超过该长度需用 RoPE 缩放已验证 YaRN。两框架的config.json默认max_position_embeddings为 40,960其中预留 32,768 tokens 给输出、8,192 tokens 给典型提示为模型思考留足空间。若平均上下文不超过 32,768 tokens不建议启用 YaRN静态缩放可能降低短文本性能。TensorRT-LLM 与 MindIENVIDIA 的 TensorRT-LLM 在重构后的 PyTorch 后端中支持 Qwen3建议tensorrt_llm0.20.0rc3trtllm-serve Qwen/Qwen3-8B --host localhost --port 8000 --backend pytorchOpenAI 兼容 API 位于http://localhost:8000/v1。Ascend NPU 用户可在 Modelers 平台搜索 Qwen3 进行部署。OpenAI 兼容 API 交互部署完成后可通过 curl 或 OpenAI Python SDK 与 Qwen3 交互getting_started/quickstart.md。以 vLLM/SGLang 服务为例curl http://localhost:8000/v1/chat/completions -H Content-Type: application/json -d { model: Qwen/Qwen3-235B-A22B-Thinking-2507, messages: [ {role: user, content: Give me a short introduction to large language models.} ], temperature: 0.6, top_p: 0.95, top_k: 20, max_tokens: 32768 }Python 侧使用openaiSDK将api_key设为EMPTY、base_url指向服务地址如http://localhost:8000/v1并在extra_body中传top_k等非标准参数。对初版 Qwen3可通过 API 层的chat_template_kwargs: {enable_thinking: false}实现硬开关禁用思考或直接在用户查询中追加/nothink软开关。注意README 与两篇部署文档均提及由于 SGLang/vLLM 对 API 请求的预处理会丢弃所有reasoning_content字段Qwen3 思考模型的多步工具调用质量可能受影响该场景依赖相关思考内容。官方修复推进期间建议按原样传入内容不提取思考内容聊天模板会正确处理。进阶Thinking Budget思维预算Qwen3 支持配置思维预算达到预算后结束思考过程并通过 early-stopping prompt 引导模型生成总结getting_started/quickstart.md。由于该特性涉及逐模型定制当前未在开源框架中直接提供仅在阿里云 Model Studio API 中实现。但可通过两次生成在开源框架中复现第一次生成至思维预算上限检查思考是否结束未结束则追加 early-stopping prompt第二次继续生成至内容结束或长度上限。仓库文档给出了基于 Transformers 的完整实现核心 token id151645为|im_end|151668为/thinkearly-stopping 文本为\n\nConsidering the limited time by the user, I have to give the solution based on the thinking directly now.\n/think\n\n实践建议示例中thinking_budget16仅为演示实际应基于可接受的延迟调整并建议设置高于 1024 才能在任务中产生有意义的效果。如果完全不需要思考应使用硬开关而非思维预算。构建应用工具调用与微调工具调用官方推荐使用 Qwen-Agent对相关 API 做了封装支持工具使用/函数调用与 MCP 支持。此外工具调用也可通过 SGLang、vLLM、Transformers、llama.cpp、Ollama 等框架进行分别见各框架章节的--tool-call-parser等配置仓库 framework/function_call.md 提供完整指南。Transformers 下的工具调用细节见 inference/transformers.md。微调官方建议使用训练框架对模型进行 SFT、DPO、GRPO 等后训练包括 Axolotl、UnSloth、Swift、Llama-Factory 等仓库 training/ 目录下有各框架的详细指南axolotl、llama_factory、ms_swift、unsloth、verl。从仓库复现评测仓库 eval/README.md 提供了复现 Qwen3 评测结果的一站式脚本目前支持Qwen3-235B-A22B-Instruct-2507 在 ARC-AGI 1pass1上的评测复现得分 40.75。流程为启动推理服务用 vLLM 启动Qwen/Qwen3-235B-A22B-Instruct-2507--tensor-parallel-size按 GPU 数调整端口 8030可选 SGLang Router 以数据并行加速--dp-size 4运行推理python generate_api_answers/infer_multithread.py --config configs/ARCAGI-Qwen3-235B-A22B-Instruct-2507.yaml中断后可重新执行脚本自动检测已有输出并续跑计算得分python eval/eval.py --config configs/ARCAGI-Qwen3-235B-A22B-Instruct-2507.yaml eval_res/ARCAGI-Qwen3-235B-A22B-Instruct-2507_eval_result.txt。模型输出与最终结果分别位于 eval/output 与 eval/eval_res 目录。这份评测复现工程恰好印证了 Qwen3-Instruct-2507 的实际可用性也可作为自行评估其他基准的模板。许可与引用Qwen3 所有开放权重模型均基于Apache 2.0许可发布许可文件见各 Hugging Face 模型仓库。如果在研究或产品中使用了 Qwen3官方建议引用其技术报告article{qwen3, title{Qwen3 Technical Report}, author{An Yang and Anfeng Li and Baosong Yang and Beichen Zhang and Binyuan Hui and Bo Zheng and Bowen Yu and Chang Gao and Chengen Huang and Chenxu Lv and Chujie Zheng and Dayiheng Liu and Fan Zhou and Fei Huang and Feng Hu and Hao Ge and Haoran Wei and Huan Lin and Jialong Tang and Jian Yang and Jianhong Tu and Jianwei Zhang and Jianxin Yang and Jiaxi Yang and Jing Zhou and Jingren Zhou and Junyang Lin and Kai Dang and Keqin Bao and Kexin Yang and Le Yu and Lianghao Deng and Mei Li and Mingfeng Xue and Mingze Li and Pei Zhang and Peng Wang and Qin Zhu and Rui Men and Ruize Gao and Shixuan Liu and Shuang Luo and Tianhao Li and Tianyi Tang and Wenbiao Yin and Xingzhang Ren and Xinyu Wang and Xinyu Zhang and Xuancheng Ren and Yang Fan and Yang Su and Yichang Zhang and Yu Wan and Yuqiong Liu and Zekun Wang and Zeyu Cui and Zhenru Zhang and Zhipeng Zhou and Zihan Qiu}, journal {arXiv preprint arXiv:2505.09388}, year{2025} }仓库资源索引本文涉及的关键资源均可在当前仓库中找到README.mdQwen3 系列官方说明模型家族、News、运行/部署/构建指南、许可与引用Qwen3_Technical_Report.pdfQwen3 技术报告docs/source/getting_started/quickstart.md快速上手Transformers/ModelScope/vLLM/SGLang 与 OpenAI 兼容 API、Thinking Budgetdocs/source/inference/transformers.mdTransformers 推理完整指南pipeline、流式、批量、YaRN、量化docs/source/deployment/sglang.md 与 docs/source/deployment/vllm.md生产部署完整指南含 OOM FAQdocs/source/run_locally/llama.cpp.md 与 docs/source/run_locally/ollama.md本地运行指南docs/source/assets/qwen3_nonthinking.jinja完全禁用思考的聊天模板eval/README.mdARC-AGI 评测复现流程examples/demo/cli_demo.py基于 Transformers 的流式命令行交互 Demo展示apply_chat_templateTextIteratorStreamer 多轮历史管理的完整工程实现【免费下载链接】Qwen1.5Qwen3 is the large language model series developed by Qwen team, Alibaba Cloud.项目地址: https://gitcode.com/GitHub_Trending/qw/Qwen1.5创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

读完文章,也想定制专属网站?

尧图设计师 24 小时内与您沟通定制方案

免费获取报价