AI SeedbankHelp preserve open and free AI for humanity's future

← All models

llava-hf_llava-1.5-7b-hf

llava-hf · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


language:

  • en datasets:
  • liuhaotian/LLaVA-Instruct-150K pipeline_tag: image-text-to-text arxiv: 2304.08485 license: llama2 tags:
  • vision
  • image-text-to-text

LLaVA Model Card

Below is the model card of Llava model 7b, which is copied from the original Llava model card that you can find here.

Check out also the Google Colab demo to run Llava on a free-tier Google Colab instance:

Or check out our Spaces demo!

Model details

Model type: LLaVA is an open-source chatbot trained by fine-tuning LLaMA/Vicuna on GPT-generated multimodal instruction-following data. It is an auto-regressive language model, based on the transformer architecture.

Model date: LLaVA-v1.5-7B was trained in September 2023.

Paper or resources for more information: https://llava-vl.github.io/

How to use the model

First, make sure to have transformers >= 4.35.3. The model supports multi-image and multi-prompt generation. Meaning that you can pass multiple images in your prompt. Make sure also to follow the correct prompt template (USER: xxx\nASSISTANT:) and add the token <image> to the location where you want to query images:

Using pipeline:

Below we used "llava-hf/llava-1.5-7b-hf" checkpoint.

from transformers import pipeline

pipe = pipeline("image-text-to-text", model="llava-hf/llava-1.5-7b-hf")
messages = [
    {
      "role": "user",
      "content": [
          {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"},
          {"type": "text", "text": "What does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud"},
        ],
    },
]

out = pipe(text=messages, max_new_tokens=20)
print(out)
>>> [{'input_text': [{'role': 'user', 'content': [{'type': 'image', 'url': 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg'}, {'type': 'text', 'text': 'What does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud'}]}], 'generated_text': 'Lava'}]

Using pure transformers:

Below is an example script to run generation in float16 precision on a GPU device:

import requests
from PIL import Image

import torch
from transformers import AutoProcessor, LlavaForConditionalGeneration

model_id = "llava-hf/llava-1.5-7b-hf"
model = LlavaForConditionalGeneration.from_pretrained(
    model_id, 
    torch_dtype=torch.float16, 
    low_cpu_mem_usage=True, 
).to(0)

processor = AutoProcessor.from_pretrained(model_id)

# Define a chat history and use `apply_chat_template` to get correctly formatted prompt
# Each value in "content" has to be a list of dicts with types ("text", "image") 
conversation = [
    {

      "role": "user",
      "content": [
          {"type": "text", "text": "What are these?"},
          {"type": "image"},
        ],
    },
]
prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)

image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
raw_image = Image.open(requests.get(image_file, stream=True).raw)
inputs = processor(images=raw_image, text=prompt, return_tensors='pt').to(0, torch.float16)

output = model.generate(**inputs, max_new_tokens=200, do_sample=False)
print(processor.decode(output[0][2:], skip_special_tokens=True))

From transformers>=v4.48, you can also pass image url or local path to the conversation history, and let the chat template handle the rest. Chat template will load the image for you and return inputs in torch.Tensor which you can pass directly to model.generate()

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://www.ilankelman.org/stopsigns/australia.jpg"}
            {"type": "text", "text": "What is shown in this image?"},
        ],
    },
]

inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors"pt")
output = model.generate(**inputs, max_new_tokens=50)

Model optimization

4-bit quantization through bitsandbytes library

First make sure to install bitsandbytes, pip install bitsandbytes and make sure to have access to a CUDA compatible GPU device. Simply change the snippet above with:

model = LlavaForConditionalGeneration.from_pretrained(
    model_id, 
    torch_dtype=torch.float16, 
    low_cpu_mem_usage=True,
+   load_in_4bit=True
)

Use Flash-Attention 2 to further speed-up generation

First make sure to install flash-attn. Refer to the original repository of Flash Attention regarding that package installation. Simply change the snippet above with:

model = LlavaForConditionalGeneration.from_pretrained(
    model_id, 
    torch_dtype=torch.float16, 
    low_cpu_mem_usage=True,
+   use_flash_attention_2=True
).to(0)

License

Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:a51f3e5c83ed3af872125e90075ef028bbd9985d&dn=llava-hf_llava-1.5-7b-hf

Open magnet in torrent client · infohash a51f3e5c83ed3af872125e90075ef028bbd9985d

Files & hashes

PathSizesha1sha256
README.md5.5 KB (5,639 B)ab3065685d6306b8024746e25d1c2375bbce229736693f49ccf7bae2d1f328154cb30b075bc12f08f57917c8ea344bfa54edf423
added_tokens.json41 B (41 B)4bd5222947172917d6a7770e47e797f3253c669aa94c56096001713e3eb9a34b1a545a8c1d5e8034ed2fb81f897c8cb54b420121
chat_template.jinja674 B (674 B)b432799326738da5fedb3458dfd18ccf373554de6fef09c05345e88b9f85e80bcb3491003332050750586568bdf91cfa81965d0c
chat_template.json701 B (701 B)c998e15e4dfb9f8559cad83653555ccd696cd7ec854445c0a45532ecbee1ae9aa31d4be19644060a156f2c88456f50f584261543
config.json950 B (950 B)5de92935009a2c670e07576ed411be82fd58b2ee0bde54495c54bcc346064a0d314b010d1c4d3ca7f7e583b6f711949a35352c0f
generation_config.json141 B (141 B)8d7eb9299fc02285ea047807e43b0688944ff6d03a6dc8c202be258023f58a03f804bdcacf138b8a2cc7492be2530e16945a0951
model-00001-of-00003.safetensors4.65 GB (4,992,930,200 B)5b3f7b68393d61b1743ec7368b17316faa3f7c34c11dbf016ee7d35ee130c19b67e20eb04873996006f424b7bcbd453b6517ee66
model-00002-of-00003.safetensors4.62 GB (4,957,878,440 B)adc55cf090929f5514bb64d6fe8a12f12f5874d446df6c6e5fad297fe7fbca4963dcf180cb1d0528cabc884d1f603311fed01328
model-00003-of-00003.safetensors3.89 GB (4,176,137,408 B)f7617476bd65f3d91e0be65c0f526d3378c5e2824f06177c37ca13944e73b57dd6d051767b950dffc12400c700dfa2509c24c697
model.safetensors.index.json68.5 KB (70,128 B)695b1d57193f2740ecab31f39297a4fd2a2ed05073af906b5ac12aea6eddf104d482d2a50bca30b20d61ee9f6c5269d3427a6991
preprocessor_config.json505 B (505 B)38f4d736a2e2b34af9eaef607847407c0efc7980a8d5e64ee5c07ff6d70142856d178ac39d0563da3612e32110fa824f5337b7a1
processor_config.json173 B (173 B)af0ccfc7718788d1bdd1b747d6298d91ed48ffa4fef918d6ba333f72a066877965bc4a162308568ba62aa90c806caedf7b45d64e
special_tokens_map.json552 B (552 B)a782b2f1cdab4d0bacb2dc0f85d02c4b1e31f0bd358c249e2fb29060c6b73157d428853b0c48710deffc8ee670ab1013880946c9
tokenizer.json3.5 MB (3,619,380 B)ed9b377d211618c8274de275f3d9d6425740661530e1294abd835edfebb24618fce6f47c21ffb2b2802520d150bdee0b808b47cb
tokenizer.model488.0 KB (499,723 B)7a4e789beca293352e60b6fad5eef1908070cee09e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
tokenizer_config.json1.4 KB (1,451 B)04d334b028b1c479e0a1152eb71348ae509bb2d579b7f1ebceddf7235f3791c387d781818b0c7e7cf868d0e4f71896a55b949833

Cite this release

Canonical URL
https://aiseedbank.org/models/llava-hf_llava-1.5-7b-hf/
Slug
llava-hf_llava-1.5-7b-hf
Infohash
a51f3e5c83ed3af872125e90075ef028bbd9985d
License
llama2
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: llava-hf_llava-1.5-7b-hf.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositoryllava-hf/llava-1.5-7b-hf
Revision (pinned)b234b804b114d9e37bb655e11cbbb5f5e971b7a9
Fetched at2026-09-04T01:31:10Z
License at fetchllama2
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-04T01:35:33Z

llama213.16 GB (14,131,146,106 bytes)transformerssafetensorsllavaimage-text-to-textvisionconversationalendpoints_compatible1 language (en)