Model Information

Kendamarron/Llama-3.2-11B-Vision-Instruct-Swallow-8B-MergeใฎๅˆๆœŸใƒใƒผใ‚ธใƒงใƒณใงใ™ใ€‚

Llama-3.1ใ‚ทใƒชใƒผใ‚บใฎไปฃใ‚ใ‚ŠใซLlama-3ใ‚ทใƒชใƒผใ‚บใ‚’ไฝฟ็”จใ—ใฆใ„ใพใ™ใ€‚

Llama-3.1ใ‚’ไฝฟ็”จใ—ใŸใƒขใƒ‡ใƒซใจไฝ“ๆ„Ÿใฎๅ‡บๅŠ›ใฏใ‚ใพใ‚Šๅค‰ใ‚ใ‚Šใพใ›ใ‚“ใ€‚

Detail

https://zenn.dev/kendama/articles/280a4089cb8a72

Recipe

Llama-3.2-11B-Vision-Instruct + (Llama-3-Swallow-8B-v0.1 - Meta-Llama-3-8B)

License

Llama 3.2 Community License

How to use

import requests
import torch
from PIL import Image
from transformers import MllamaForConditionalGeneration, AutoProcessor

model_id = "Kendamarron/Llama-3.2-11B-Vision-Instruct-Swallow-8B-Merge-v0.1"

model = MllamaForConditionalGeneration.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_id)

url = "https://huggingface.co/datasets/huggingface/documentation-images/resolve/0052a70beed5bf71b92610a43a52df6d286cd5f3/diffusers/rabbit.jpg"
image = Image.open(requests.get(url, stream=True).raw)

messages = [
    {"role": "user", "content": [
        {"type": "image"},
        {"type": "text", "text": "ใ“ใฎ็”ปๅƒใงไธ€ๅฅ่ฉ ใ‚“ใงใใ ใ•ใ„ใ€‚"}
    ]}
]
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]))
Downloads last month
5
Safetensors
Model size
10.7B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for Kendamarron/Llama-3.2-11B-Vision-Instruct-Swallow-8B-Merge-v0.1