deepseek-ai / deepseek-ai/DeepSeek-VL2

Redundant LLM Response

Open
#141 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.4k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

for my code here :

def deepseek_predict( prompt, image_paths) :

if prompt.count("") != len(image_paths):
raise ValueError("Number of 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.