SmolVLM2
Use HuggingFace's SmolVLM2 vision-language model on a Dedicated Deployment or self-hosted Inference
Code sample
3
Run the model
import os
import supervision as sv
from inference_sdk import InferenceHTTPClient
image = sv.load_image_from_url("https://media.roboflow.com/quickstart/dog.jpeg")
client = InferenceHTTPClient(
api_url="https://your-deployment.roboflow.cloud",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer_lmm(
image,
model_id="smolvlm2",
prompt="Describe this image briefly.",
max_new_tokens=64,
)
print(result["response"])A man is carrying a dog on his shoulders.
Inference speed
Alias
Latency, 128 tokens (ms)
Tokens/sec
Use with Inference (self-hosted)
Execution modes in Workflows
Last updated
Was this helpful?