Downloads · 30 days
18
29% of all-time downloads
genloop/llama-3.2-11b-instruct-amazon-product-description-merged-model
llama-3.2-11b-instruct-amazon-product-description-merged-model is a image-text-to-text model from genloop. 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.
- Developed by: Genloop.ai - Funded by: Genloop Labs, Inc. - Model type: Vision Language Model (VLM) - Finetuned from model: Meta Llama 3.2 11B Vision Instruct - Usage: This model is intended for product cataloging, i…
Downloads · 30 days
18
29% of all-time downloads
All-time downloads
63
Public
Parameters
10.7B
21.4 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors21.3 GB · 100%
From the Hugging Face model README
Make sure to update your transformers installation via pip install --upgrade transformers.
import requests
import torch
from PIL import Image
from transformers import MllamaForConditionalGeneration, AutoProcessor
model_id = "meta-llama/Llama-3.2-11B-Vision-Instruct"
model = MllamaForConditionalGeneration.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_id)
url = "insert_your_image_link_here"
image = Image.open(requests.get(url, stream=True).raw)
user_prompt= """Create a SHORT Product description based on the provided a given ##PRODUCT NAME## and a ##CATEGORY## and an image of the product.
Only return description. The description should be SEO optimized and for a better mobile search experience.
##PRODUCT NAME##: {product_name}
##CATEGORY##: {prod_category}"""
product_name = "insert_your_product_name_here"
product_category = "insert_your_product_category_here"
messages = [
{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": user_prompt.format(product_name = product_name, product_category = product_category)}
]}
]
input_text = processor.apply_chat_template(messages, add_generation_prompt=True)
inputs = processor(
image,
input_text,
add_special_tokens=False,
return_tensors="pt"
).to(model.device)
output = model.generate(**inputs, max_new_tokens=30)
print(processor.decode(output[0]))
This model has been finetuned on the Amazon-Product-Descriptions dataset. The reference descriptions were generated using Gemini Flash.
The following hyperparameters were used during training:
| MODEL | FINETUNED OR NOT | INFERENCE LATENCY | METEOR Score |
|---|---|---|---|
| Llama-3.2-11B-Vision-Instruct | Not Finetuned | 1.68 | 0.38 |
| Llama-3.2-11B-Vision-Instruct | Finetuned | 1.68 | 0.53 |