How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="injazsmart/thoth_test")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# Load model directly
from transformers import AutoProcessor, AutoModelForImageTextToText

processor = AutoProcessor.from_pretrained("injazsmart/thoth_test")
model = AutoModelForImageTextToText.from_pretrained("injazsmart/thoth_test")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

Qwen2.5-VL-7B-Instruct Fine-tuned with QLoRA

This model was fine-tuned using Axolotl with QLoRA on Arabic text data. It is based on Qwen/Qwen2.5-VL-7B-Instruct.

Training details

  • Method: QLoRA
  • Epochs: 3
  • Optimizer: Paged AdamW 32bit
  • Quantization: 4-bit (NF4)
  • Hardware: NVIDIA H100 80GB
  • Dataset: Custom Arabic instruction-style text

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("injazsmart/thoth_test")
tokenizer = AutoTokenizer.from_pretrained("injazsmart/thoth_test")

prompt = "اشرح لي معنى الذكاء الاصطناعي بلغة بسيطة"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for injazsmart/thoth_test

Quantized
(138)
this model

Dataset used to train injazsmart/thoth_test