-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
for my code here :
def deepseek_predict( prompt, image_paths) :
if prompt.count("<image>") != len(image_paths):
raise ValueError("Number of <image> tokens in prompt must match number of image paths provided.")
conversation = [
{
"role": "<|User|>",
"content": prompt,
"images": image_paths,
},
{"role": "<|Assistant|>", "content": ""}
]
pil_images = load_pil_images(conversation)
inputs = vl_chat_processor(
conversations=conversation,
images=pil_images,
force_batchify=True,
system_prompt=""
).to(vl_gpt.device)
inputs_embeds = vl_gpt.prepare_inputs_embeds(**inputs)
with torch.no_grad():
outputs = vl_gpt.language.generate(
inputs_embeds=inputs_embeds,
attention_mask=inputs.attention_mask,
pad_token_id=tokenizer.eos_token_id,
bos_token_id=tokenizer.bos_token_id,
eos_token_id=tokenizer.eos_token_id,
max_new_tokens=8192,
do_sample=True,
use_cache=True,
temperature=0.1,
top_p=0.0,
repetition_penalty=1.1)
response = tokenizer.decode(outputs[0].tolist(), skip_special_tokens=False)
return response
i am getting this response from LLM :
\n-format (e.given the following the model**: \n-1** or is not the product?\n\n#### \n\n---\n\n####\n\n####\n-\n- objectivection:\n-\n-\n- object\n-\n- object\n- object\n-\n- object\n-\n-\n-\n- object\n-\n-\n- object\n- object\n-\n-\n-\n-\n- object?\n\n####\n-\n\n####\n- object, object\n- object\n- object\n-\n- object\n-\n- object\n-\n- object\n- object\n-\n-\n- object\n-\n- object\n- object\n- object\n-\n-\n-\n-\n- object\n-\n- object\n-\n- object\n-\n- object\n-\n- object\n-\n- object\n- object\n-\n-\n- object\n- object\n- object\n-\n- object\n- object\n-\n-\n- object\n-\n-\n- object\n-\n- object\n-\n- object\n-\n- object\n-\n- object\n- object\n-\n-\n- object\n-\n- object\n-\n- object\n- object\n- object\n-\n- object\n- object\n-\n- object\n- object\n-\n- object\n-\n- object\n- object\n-\n-\n- object\n-\n- object\n- object\n-\n- object\n\n<container**\n- object\n- object\n- object\n- object\n- object\n- object
my prompt is fine , i sent 10 images along my prompt with proper image tokens.