Skip to content

[Inference snippets] VLM hf_hub, oai snippets #985

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

Merged
merged 1 commit into from
Oct 28, 2024
Merged

Conversation

mishig25
Copy link
Collaborator

@mishig25 mishig25 commented Oct 25, 2024

Thanks to #976, now we can show hf_hub, oai snippets for VLMs ("conversational image-text-to-text" models).

@mishig25 mishig25 marked this pull request as ready for review October 25, 2024 11:43
Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mishig25!

Comment on lines +20 to +35
model.pipeline_tag === "text-generation"
? [{ role: "user", content: "What is the capital of France?" }]
: [
{
role: "user",
content: [
{
type: "image_url",
image_url: {
url: "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg",
},
},
{ type: "text", text: "Describe this image in one sentence." },
],
},
];
Copy link
Contributor

@Wauplin Wauplin Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels like these example messages should be in inputs.ts. I can do it in a later PR if you want.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@Vaibhavs10 Vaibhavs10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 - This is amazing!

@mishig25 mishig25 merged commit fc57b44 into main Oct 28, 2024
3 of 5 checks passed
@mishig25 mishig25 deleted the update_vlm_snippets branch October 28, 2024 10:16
mishig25 added a commit that referenced this pull request Oct 29, 2024
Refactor conversational input to getModelInputSnippet.

Follow up to comment
#985 (comment)

@Wauplin
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

Successfully merging this pull request may close these issues.

3 participants