mirror of
https://www.modelscope.cn/Qwen/Qwen3-VL-8B-Instruct.git
synced 2026-04-02 21:02:55 +08:00
Adding transformers as the library name (#4)
- Adding `transformers` as the library name (60595ebc30ec8e3b1d3b9e65d4943ca011c0006a) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co> (batch 1/1)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
pipeline_tag: image-text-to-text
|
||||
library_name: transformers
|
||||
---
|
||||
<a href="https://chat.qwenlm.ai/" target="_blank" style="margin: 2px;">
|
||||
<img alt="Chat" src="https://img.shields.io/badge/%F0%9F%92%9C%EF%B8%8F%20Qwen%20Chat%20-536af5" style="display: inline-block; vertical-align: middle;"/>
|
||||
@ -93,7 +94,7 @@ model = Qwen3VLForConditionalGeneration.from_pretrained(
|
||||
# device_map="auto",
|
||||
# )
|
||||
|
||||
processor = AutoProcessor.from_pretrained("Qwen/Qwen/Qwen3-VL-8B-Instruct")
|
||||
processor = AutoProcessor.from_pretrained("Qwen/Qwen3-VL-8B-Instruct")
|
||||
|
||||
messages = [
|
||||
{
|
||||
@ -116,6 +117,7 @@ inputs = processor.apply_chat_template(
|
||||
return_dict=True,
|
||||
return_tensors="pt"
|
||||
)
|
||||
inputs = inputs.to(model.device)
|
||||
|
||||
# Inference: Generation of the output
|
||||
generated_ids = model.generate(**inputs, max_new_tokens=128)
|
||||
|
||||
Reference in New Issue
Block a user