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

Add LLaVA support #775

Closed
wants to merge 2 commits into from
Closed

Conversation

LinkerCodeMonkey
Copy link

We added code to support llava. #307

test code:

from vllm import MLLM, SamplingParams
prompts = [
    "what is doing the man",
    "what you name",
    "what can I do for you",
    "what is doing the man",
】
images = [{
    "src_type": "url",
    "image_src": "IMAGE_URL"}]*4

sampling_params = SamplingParams(temperature=0.8, top_p=0.5, max_tokens=1024)
model,tokenizer = "/PATH/LLaVA-13b-delta-v1-1", "/PATH/LLaVA-13b-delta-v1-1"
gpu_memory_utilization = 0.9
mllm = MLLM(model=model,tokenizer=tokenizer, gpu_memory_utilization=gpu_memory_utilization)
outputs = mllm.generate(prompts, images, sampling_params)
# Print the outputs.
for output in outputs:
    prompt = output.prompt
    generated_text = output.outputs[0].text
    print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")

@LinkerCodeMonkey LinkerCodeMonkey changed the title add llava support Add LLaVA support Aug 17, 2023
@teraktor2006
Copy link

Thanks. Is it working with LLaVA1.5?

@hmellor
Copy link
Collaborator

hmellor commented Mar 28, 2024

@LinkerCodeMonkey do you still plan to work on this PR?

@WoosukKwon
Copy link
Collaborator

Closed as we added support for LLaVA in #3042

@WoosukKwon WoosukKwon closed this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new model Requests to new models
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants