Downloads · 30 days
8
10% of all-time downloads
iamthehimansh/LlamaVision-llama-3.3-1b
LlamaVision-llama-3.3-1b is a image-text-to-text model from iamthehimansh. 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 mit.
LlamaVision is a custom multimodal vision-language model that bridges visual understanding with advanced text generation. It utilizes a CLIP-ViT-Large-Patch14 vision encoder and a Llama-3.2-1B language backbone, conne…
Downloads · 30 days
8
10% of all-time downloads
All-time downloads
77
Public
Parameters
1.5B
3.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors3.1 GB · 99%
From the Hugging Face model README
LlamaVision is a custom multimodal vision-language model that bridges visual understanding with advanced text generation. It utilizes a CLIP-ViT-Large-Patch14 vision encoder and a Llama-3.2-1B language backbone, connected via a trainable linear projector. The model is designed to describe images in detail and answer questions about visual content based on provided prompts.
The model follows a modular architecture:
bfloat16 for memory efficiency and numerical stability.You can load and use the model with the following Python code :
import torch
from transformers import AutoTokenizer, CLIPImageProcessor,AutoModel
device = "cuda" if torch.cuda.is_available() else "cpu"
model_path = "iamthehimansh/LlamaVision-llama-3.3-1b"
external_image_path = r"./image/bahubali_poster.jpg"
model = AutoModel.from_pretrained(
"iamthehimansh/LlamaVision-llama-3.3-1b",
trust_remote_code=True
)
# LlamaVisionModel.from_pretrained(model_path)
model.to(device)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(model_path)
image_processor = CLIPImageProcessor.from_pretrained(model_path)
query="Explain this image "
res= model.genrate_with_vision(external_image_path, query,tokenizer,image_processor)
print(res)
If you use this model, please cite the base components:
jackyhate/text-to-image-2M