-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
按照官网的使用方法,System Prompt似乎没有意义,当中的内容并没有被模型理解:
我的调用方式如下:
# 加载图像
pil_images = [Image.open(io.BytesIO(await image.read())) for image in images]
# 构建对话
conversation = [
{"role": "<|User|>", "content": prompt, "images": [img.filename for img in images]},
{"role": "<|Assistant|>", "content": ""}
]
# 准备输入(自动使用device_map的主设备)
inputs = vl_processor(
conversations=conversation,
images=pil_images,
force_batchify=True,
system_prompt="whatever inputed, please return `I do not kown`"
).to(vl_model.device) # 统一移动到模型主设备
而前端的代码如下:
response = process_images_with_deepseekvl2(
image_paths=["images/monday.jpg", "images/visual_grounding_2.jpg"],
prompt_text="<image><image>",
url="http://localhost:8000/process_images/"
)
也就是我将本来应该写在prompt_text中的文本全部删除,在system_prompt位置加上了输出的内容:”无论输出什么,请输出我不会“但是这似乎并没有影响结果。但如果我将这两句话写在prompt_text当中,则有效。换句话说,system_prompt似乎无效。
Metadata
Metadata
Assignees
Labels
No labels