How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="optimum-intel-internal-testing/tiny-random-phi-4-multimodal", trust_remote_code=True)
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("optimum-intel-internal-testing/tiny-random-phi-4-multimodal", trust_remote_code=True, dtype="auto")
Quick Links

This tiny model is for debugging. It is randomly initialized with the config adapted from microsoft/Phi-4-multimodal-instruct.

Downloads last month
10
Safetensors
Model size
6.46M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support