This model adds image multimodal capabilties, as well as an expanded dataset for training.
1from transformers import AutoProcessor, AutoModelForImageTextToText
2import torch
3processor = AutoProcessor.from_pretrained("theminji/OpenGoody-2")
4model = AutoModelForImageTextToText.from_pretrained("theminji/OpenGoody-2", device_map="auto", dtype=torch.float16)
5messages = [
6 {
7 "role": "user",
8 "content": [
9 {"type": "image", "url": "./dog.jpg"},
10 {"type": "text", "text": "What breed of dog is this??"}
11 ]
12 },
13]
14inputs = processor.apply_chat_template(
15 messages,
16 add_generation_prompt=True,
17 tokenize=True,
18 return_dict=True,
19 return_tensors="pt",
20).to(model.device)
21
22outputs = model.generate(**inputs, max_new_tokens=40)
23print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
This model was trained on English only dataset, expanding on the base model Qwen3.5 language capabilities, so non-English languages do not work very well.
Update: something is wrong with the GGUF quants in Ollama, but they work in LM Studio (haven't tried other GGUF apps), I'm not sure what, the transformers model works though. (My gpu is having a stroke trying to run pytorch for some reason T-T because its AMD and windows, but Colab can run it.)