基本信息
模型仓库:Qwen/Qwen3-32B
组织:Qwen
任务:文本生成
架构与运行信息
模型类型:qwen3
架构:未提供
支持库:transformer, safetensors, pytorch
基础模型:未提供
当前修订:master
许可与更新时间
许可:apache-2.0
创建日期:2025-04-30
最近更新:2025-12-02
硬件需求
参考配置(非官方最低要求):BF16 权重约 65.5 GB,全精度推理建议至少 80 GB 合计显存,并另外为 KV cache 预留空间。4-bit 权重约 16.4 GB,量化后建议从 24 GB 显存起步。 Inference estimate (not an official minimum): BF16 weights are about 65.5 GB; allow at least 80 GB aggregate VRAM for full precision, plus KV-cache memory. 4-bit weights are about 16.4 GB; 24 GB or more is a practical starting point for quantized, shorter-context use.
下载地址
基本使用示例
Transformers 快速推理 / Transformers quick inference
# pip install -U "transformers>=4.51.0" accelerate torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Qwen/Qwen3-32B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype="auto", device_map="auto"
)
messages = [{"role": "user", "content": "你好,请用三点简要介绍人工智能。"}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True,
enable_thinking=False
)
inputs = tokenizer([prompt], return_tensors="pt").to(model.device)
output = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(
output[0][inputs.input_ids.shape[1]:], skip_special_tokens=True
))