YZMA est le nouveau projet de Ron Evans, un développeur bien connu de la communauté Go. Il s'agit de pouvoir faire en Go de l'inférence locale en s'appuyant sur llama.cpp. Il peut faire de l'inférence sur des LLM, SML, TLM et VLM. Le VLM (Vision Language Model) permet de faire du traitement d'images, de textes, de vidéo. Il fonctionne sur Linux, macOS et Windows.
Il utilise les paquets purego et ffi et ne nécessitant pas CGO. Sur Linux et Windows, il faut installer les drivers NVIDIA pour utiliser l'accélération CUDA. Et il faut installer les dernières versions de llama.cpp.
Un exemple VLM avec Qwen2.5 :
$ go run ./examples/vlm/ -model ./models/Qwen2.5-VL-3B-Instruct-Q8_0.gguf -mmproj ./models/mmproj-Qwen2.5-VL-3B-Instruct-Q8_0.gguf -image ./images/domestic_llama.jpg -p "What is in this picture?" 2>/dev/nullLoading model ./models/Qwen2.5-VL-3B-Instruct-Q8_0.ggufencoding image slice...image slice encoded in 966 msdecoding image batch 1/1, n_tokens_batch = 910image decoded (batch 1/1) in 208 msThe picture shows a white llama standing in a fenced-in area, possibly a zoo or a wildlife park. The llama is the main focus of the image, and it appears to be looking to the right. The background features a grassy area with trees and a fence, and there are some vehicles visible in the distance.
Pour en savoir plus : https://github.com/hybridgroup/yzma