Skip to content

Add LLaVA support #775

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

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
@zhuohan123 zhuohan123 added the new-model Requests to new models label Sep 12, 2023
@teraktor2006
Copy link

Thanks. Is it working with LLaVA1.5?

@hmellor
Copy link
Member

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
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Feb 7, 2025
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Feb 20, 2025
Support mla (vllm-project#775)

[Deepseek r1] improve latenct cache by save last 64 in key cache and 512 in value cache (vllm-project#804)

Before, we can only allocate 1854 blocks with 29.2G, now we are able to
allocate 3156 blocks
Performance wise, not visible regression and able to push to higher
batch_size or longer context length

---------

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
jikunshang pushed a commit to jikunshang/vllm that referenced this pull request Mar 14, 2025
Support mla (vllm-project#775)

[Deepseek r1] improve latenct cache by save last 64 in key cache and 512 in value cache (vllm-project#804)

Before, we can only allocate 1854 blocks with 29.2G, now we are able to
allocate 3156 blocks
Performance wise, not visible regression and able to push to higher
batch_size or longer context length

---------

Signed-off-by: Chendi Xue <chendi.xue@intel.com>
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