This model is a QLoRA fine-tuned version of Qwen3-VL-8B-Instruct trained on the Turkish-Math-VQA dataset, which consists of 12th-grade mathematics problems published by the Turkish Ministry of National Education (MEB).
The model is designed to:
The solution field was generated synthetically by GPT-o1 and has not been manually verified for correctness. While GPT-o1 is generally strong at solving problems at this level, the dataset may contain:
Therefore, the fine-tuned model may inherit these imperfections.
1from transformers import AutoProcessor, AutoModelForImageTextToText
2
3processor = AutoProcessor.from_pretrained("khazarai/Math-VL-8B")
4model = AutoModelForImageTextToText.from_pretrained("khazarai/Math-VL-8B")
5messages = [
6 {
7 "role": "user",
8 "content": [
9 {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
10 {"type": "text", "text": "Resimde verilen matematik problemini çözün."}
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=1024)
23print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))