Downloads · 30 days
12
3% of all-time downloads
vonjack/Nous-Hermes-2-Pro-Xtuner-LLaVA-v1_1-Llama-3-8B
Nous-Hermes-2-Pro-Xtuner-LLaVA-v1_1-Llama-3-8B is a image-text-to-text model from vonjack. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Nous Hermes 2 Pro's LLaMA weights + Xtuner Llava's mmprojector & visiontower weights.
Downloads · 30 days
12
3% of all-time downloads
All-time downloads
368
Public
Parameters
8.4B
16.8 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors16.8 GB · 100%
How the weights are stored.
F168.3B · 100%
From the Hugging Face model README
Nous Hermes 2 Pro's LLaMA weights + Xtuner Llava's mm_projector & vision_tower weights.
Good QA + Function Calling + JSON Mode + Vision Multimodal
GGUFs:
Test code:
import requests
from PIL import Image
import torch
from transformers import AutoProcessor, LlavaForConditionalGeneration
model_id = "vonjack/Nous-Hermes-2-Pro-Xtuner-LLaVA-v1_1-Llama-3-8B"
prompt = ("<|im_start|>user\n<image>\nWhat are these?<|im_end|>"
"<|im_start|>assistant\n")
image_file = "http://images.cocodataset.org/val2017/000000039769.jpg"
model = LlavaForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
).to(0)
processor = AutoProcessor.from_pretrained(model_id)
raw_image = Image.open(requests.get(image_file, stream=True).raw)
inputs = processor(prompt, raw_image, 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))
Example:
