mlx-community/medsiglip-448

The Model mlx-community/medsiglip-448 was converted to MLX format from google/medsiglip-448 using mlx-lm version 0.0.6.

Use with mlx

pip install mlx-embeddings
from mlx_embeddings import load, generate
import mlx.core as mx

model, tokenizer = load("mlx-community/medsiglip-448")

# For image-text embeddings
images = [
    "./images/cats.jpg",  # cats
]
texts = ["a photo of cats", "a photo of a desktop setup", "a photo of a person"]

# Process all image-text pairs
outputs = generate(model, processor, texts, images=images)
logits_per_image = outputs.logits_per_image
probs = mx.sigmoid(logits_per_image) # probabilities for this image
for i, image in enumerate(images):
    print(f"Image {i+1}:")
    for j, text in enumerate(texts):
        print(f"  {probs[i][j]:.1%} match with '{text}'")
    print()

Downloads last month
26
Safetensors
Model size
0.9B params
Tensor type
F16
·
MLX
Hardware compatibility
Log In to view the estimation

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support