Files
wehub-resource-sync 86db9aae8e
Documentation / build (push) Has been cancelled
Documentation / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:34:55 +08:00

23 lines
668 B
Python

""" GGUF Vision Model example - get started with vision-to-text using mtmd tool in conjunction with llama cpp """
from llmware.models import ModelCatalog
model_name = "qwen2.5-vl-3b-instruct-gguf"
# add path to local image
image_file_path = "/local/path/to/jpg_or_png_image"
# add text prompt/instruction
prompt = "Describe this image."
model = ModelCatalog().load_model(model_name, max_output=500)
# to run streaming generation
for token in model.stream(prompt,image_file_path):
print(token, end="")
# to run inference (response once completed at the end)
response = model.inference(prompt,image_file_path)
print("--test: inference response: ", response)