Qwen3-VL-8B-Instruct
介绍
Qwen3-VL —— 迄今为止 Qwen 系列中最强大的视觉-语言模型。
这一代在各个方面都进行了全面升级:更优秀的文本理解和生成、更深入的视觉感知和推理、扩展的上下文长度、增强的空间和视频动态理解能力,以及更强的代理交互能力。
提供密集型和 MoE 架构,可从边缘扩展到云端,并有 Instruct 和增强推理的 Thinking 版本,以实现灵活的按需部署。
- ModelScope: https://www.modelscope.cn/models/Qwen/Qwen3-VL-8B-Instruct
- HuggingFace: https://huggingface.co/Qwen/Qwen3-VL-8B-Instruct
主要增强功能:
- 视觉代理:操作 PC/移动 GUI — 识别元素、理解功能、调用工具、完成任务。
- 视觉编码增强:从图像/视频生成 Draw.io/HTML/CSS/JS。
- 高级空间感知:判断物体位置、视角和遮挡;提供更强的 2D 接地并支持 3D 接地,用于空间推理和具身 AI。
- 长上下文和视频理解:原生 256K 上下文,可扩展至 1M;处理书籍和长达数小时的视频,具有完整的回忆和秒级索引。
- 增强的多模态推理:擅长 STEM/数学 — 因果分析和基于逻辑、证据的答案。
- 升级的视觉识别:更广泛、更高品质的预训练能够“识别一切”——名人、动漫、产品、地标、动植物等。
- 扩展的 OCR:支持 32 种语言(从 19 种增加);在低光、模糊和倾斜情况下表现稳健;更好地处理罕见/古代字符和术语;改进了长文档结构解析。
- 与纯 LLM 相当的文本理解:无缝的文本-视觉融合,实现无损、统一的理解。
模型架构更新:

- 交错 MRoPE:通过鲁棒的位置嵌入,在时间、宽度和高度上进行全频分配,增强长时间范围的视频推理。
- DeepStack:融合多级 ViT 特征以捕捉细粒度细节并锐化图像-文本对齐。
- 文本-时间戳对齐:超越 T-RoPE,实现精确的时间戳定位,以加强视频时间建模。
这是 Qwen3-VL-8B-Instruct 的权重仓库。
模型性能
多模态性能

纯文本性能

快速开始
Qwen3-VL 的代码已在最新的 Hugging Face transformers 中,建议您使用以下命令从源码构建:
pip install git+https://github.com/huggingface/transformers
# pip install transformers==4.57.0 # currently, V4.57.0 is not released使用 🤗 Transformers 进行聊天
这里展示了一个代码片段,展示了如何使用 transformers 库中的聊天模型:
from modelscope import Qwen3VLForConditionalGeneration, AutoProcessor
# default: Load the model on the available device(s)
model = Qwen3VLForConditionalGeneration.from_pretrained(
"Qwen/Qwen3-VL-8B-Instruct", dtype="auto", device_map="auto"
)
# We recommend enabling flash_attention_2 for better acceleration and memory saving, especially in multi-image and video scenarios.
# model = Qwen3VLForConditionalGeneration.from_pretrained(
# "Qwen/Qwen3-VL-8B-Instruct",
# dtype=torch.bfloat16,
# attn_implementation="flash_attention_2",
# device_map="auto",
# )
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-8B-Instruct")
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen-VL/assets/demo.jpeg",
},
{"type": "text", "text": "Describe this image."},
],
}
]
# Preparation for inference
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt"
)
# Inference: Generation of the output
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
print(output_text)生成超参数
视觉-语言
export greedy='false'
export top_p=0.8
export top_k=20
export temperature=0.7
export repetition_penalty=1.0
export presence_penalty=1.5
export out_seq_length=16384文本
export greedy='false'
export top_p=1.0
export top_k=40
export repetition_penalty=1.0
export presence_penalty=2.0
export temperature=1.0
export out_seq_length=32768作者:Jeebiz 创建时间:2025-10-23 09:30
最后编辑:Jeebiz 更新时间:2025-11-11 17:29
最后编辑:Jeebiz 更新时间:2025-11-11 17:29