Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output of interleav_wrap_chat #301

Open
wlin-at opened this issue May 2, 2024 · 0 comments
Open

Output of interleav_wrap_chat #301

wlin-at opened this issue May 2, 2024 · 0 comments
Assignees

Comments

@wlin-at
Copy link

wlin-at commented May 2, 2024

Hi, thanks for the great work. I tried the following code snippet with the internlm-xcomposer2-vl-7b model for QA task with two input images.

images = [osp.join( image_folder_dir, "COCO_val2014_000000143961.jpg"),
          osp.join( image_folder_dir, "COCO_val2014_000000274538.jpg")]
image1 = model.encode_img(images[0])
image2 = model.encode_img(images[1])
image = torch.cat((image1, image2), dim=0)
query = """First picture:<ImageHere>, second picture:<ImageHere>. Describe the subject of these two pictures?"""
response, _ = model.interleav_wrap_chat(tokenizer, query, image, history=[], meta_instruction= True)

(here the meta_instruction is a required positional argument, not sure whether it should be set to True or False)
However, I realized that the returned response is actually {'inputs_embeds': wrap_embeds}.
How should I further proceed to get the decoded text output?
Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants