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

← All models

llava-hf_llava-v1.6-mistral-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.


license: apache-2.0 tags:

  • vision
  • image-text-to-text language:
  • en pipeline_tag: image-text-to-text inference: true

LLaVa-Next, leveraging mistralai/Mistral-7B-Instruct-v0.2 as LLM

The LLaVA-NeXT model was proposed in LLaVA-NeXT: Improved reasoning, OCR, and world knowledge by Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, Yong Jae Lee. LLaVa-NeXT (also called LLaVa-1.6) improves upon LLaVa-1.5 by increasing the input image resolution and training on an improved visual instruction tuning dataset to improve OCR and common sense reasoning.

Disclaimer: The team releasing LLaVa-NeXT did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

LLaVa combines a pre-trained large language model with a pre-trained vision encoder for multimodal chatbot use cases. LLaVA 1.6 improves on LLaVA 1.5 BY:

  • Using Mistral-7B (for this checkpoint) and Nous-Hermes-2-Yi-34B which has better commercial licenses, and bilingual support
  • More diverse and high quality data mixture
  • Dynamic high resolution

Intended uses & limitations

You can use the raw model for tasks like image captioning, visual question answering, multimodal chatbot use cases. See the model hub to look for other versions on a task that interests you.

How to use

Here's the prompt template for this model but we recomment to use the chat templates to format the prompt with processor.apply_chat_template(). That will apply the correct template for a given checkpoint for you.

"[INST] <image>\nWhat is shown in this image? [/INST]"

To run the model with the pipeline, see the below example:

from transformers import pipeline

pipe = pipeline("image-text-to-text", model="llava-hf/llava-v1.6-mistral-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'}]

You can also load and use the model like following:

from transformers import LlavaNextProcessor, LlavaNextForConditionalGeneration
import torch
from PIL import Image
import requests

processor = LlavaNextProcessor.from_pretrained("llava-hf/llava-v1.6-mistral-7b-hf")

model = LlavaNextForConditionalGeneration.from_pretrained("llava-hf/llava-v1.6-mistral-7b-hf", torch_dtype=torch.float16, low_cpu_mem_usage=True) 
model.to("cuda:0")

# prepare image and text prompt, using the appropriate prompt template
url = "https://github.com/haotian-liu/LLaVA/blob/1a91fc274d7c35a9b50b3cb29c4247ae5837ce39/images/llava_v1_5_radar.jpg?raw=true"
image = Image.open(requests.get(url, stream=True).raw)

# 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 is shown in this image?"},
          {"type": "image"},
        ],
    },
]
prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)

inputs = processor(images=image, text=prompt, return_tensors="pt").to("cuda:0")

# autoregressively complete prompt
output = model.generate(**inputs, max_new_tokens=100)

print(processor.decode(output[0], 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 = LlavaNextForConditionalGeneration.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 = LlavaNextForConditionalGeneration.from_pretrained(
    model_id, 
    torch_dtype=torch.float16, 
    low_cpu_mem_usage=True,
+   use_flash_attention_2=True
).to(0)

BibTeX entry and citation info

@misc{liu2023improved,
      title={Improved Baselines with Visual Instruction Tuning}, 
      author={Haotian Liu and Chunyuan Li and Yuheng Li and Yong Jae Lee},
      year={2023},
      eprint={2310.03744},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Magnet link

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

magnet:?xt=urn:btih:d5bcd9bbe09be4176498ceb6cce7ed68af0cffb3&dn=llava-hf_llava-v1.6-mistral-7b-hf

Open magnet in torrent client · infohash d5bcd9bbe09be4176498ceb6cce7ed68af0cffb3

Files & hashes

PathSizesha1sha256
README.md6.2 KB (6,319 B)2e39f1a3eccb8e40e30eb2d382a30707c9e5b342377ca53097a5e237941e8b81d3bee9de57a5a9ccd0757772444bcb53f3c7436b
added_tokens.json41 B (41 B)4bd5222947172917d6a7770e47e797f3253c669aa94c56096001713e3eb9a34b1a545a8c1d5e8034ed2fb81f897c8cb54b420121
chat_template.json694 B (694 B)744351d7d54cdf11b24361600eff7c66c49a8a69270208cd28fbf6bd40d2c180195dafdab84698dca72a5e0fc96025a4a8fcec44
config.json1.2 KB (1,253 B)bd0744cd0d0992372bce023bbebdda02ebf26040ddf45e24cea7da06747d67a2f377b8fe65e672f61180c50adae7fd9c0392ab6e
generation_config.json116 B (116 B)d84663b8bd0a737e3299f3d2b4be2fe3cd2a0333b24fa6ec6afb408d8a40243ca0192ee0abb3d967a8f0ebf5ec8db16eba6ea1f8
model-00001-of-00004.safetensors4.58 GB (4,921,618,144 B)38f67fc3f399bc002ec374dcf0556e9367b5cb3e2d7d9a865868c5f05d8e44b6218f43401a0456d875429d32fa5f947d5ca01a67
model-00002-of-00004.safetensors4.58 GB (4,915,917,568 B)0f5701a24051659d5efec3506756f83d1674e5d502a36fb5d7b0574dc4c8da545089aac85b14a7972908293c11a63eca8ef46c0e
model-00003-of-00004.safetensors4.58 GB (4,915,917,576 B)29ba5a2f8028a970797cb26ebbefaf5c16f790179201eb56fd7d71e2e8dbc6ff7f856e81c6eddb5b4eb12e9acc760576b668948c
model-00004-of-00004.safetensors362.5 MB (380,134,008 B)87f4817dd8ed52799136690a48303eb24a7b51df472780e31b22135a80dc7721cc0ab5665cf7cfc2348755816a2404484abe17dc
model.safetensors.index.json68.5 KB (70,185 B)cf4389fee314605f3b5f75c77f54ce5da9f15cf353c5e4acf8c41b0072772dd648962ab27fc84b05e0cd6b6dd5f720aa175e7332
preprocessor_config.json772 B (772 B)a8248781bae1eb41389a649fbaf4f580aa40c814ecef425c1d3ee91f5e05144c4d107389f9fefd04a424d5cbfc3fb6e0525b8c55
processor_config.json176 B (176 B)4669db7aaac38b24b764a7851e9f8e6a193f96f77cd8bff508772b8b4e6b0678550bf856a7f28abd0f8b237235ac83bfcb9b1c36
special_tokens_map.json552 B (552 B)a782b2f1cdab4d0bacb2dc0f85d02c4b1e31f0bd358c249e2fb29060c6b73157d428853b0c48710deffc8ee670ab1013880946c9
tokenizer.json1.7 MB (1,795,853 B)6f43c1fabc73af13375a3b0c264656711228cd4a3ac63c3abef09099abe96833fbad9cdf473ede830413b0063bf8c3f357ed833c
tokenizer.model481.9 KB (493,443 B)4b7582bd37540a3bfba772bb3569e06c82834018dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
tokenizer_config.json2.0 KB (2,072 B)754adb1891a73bab3f53b94218e6665ec7fc583c37729d3fee9c6d74290bd6a85524941cd06cc7e9c9acb013863c23e9c6275d2f

Cite this release

Canonical URL
https://aiseedbank.org/models/llava-hf_llava-v1.6-mistral-7b-hf/
Slug
llava-hf_llava-v1.6-mistral-7b-hf
Infohash
d5bcd9bbe09be4176498ceb6cce7ed68af0cffb3
License
apache-2.0
Signing key fingerprint
85a3b32c3712427b

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

Provenance

Upstream repositoryllava-hf/llava-v1.6-mistral-7b-hf
Revision (pinned)2424fdd47412fccc66d91719126b420e9fbd7065
Fetched at2026-09-04T01:35:57Z
License at fetchapache-2.0
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-04T01:40:43Z

apache-2.014.10 GB (15,135,958,772 bytes)transformerssafetensorsllava_nextimage-text-to-textvisionconversationaltext-generation-inferenceendpoints_compatible1 language (en)paper: 2310.03744