Views
No views yet

1from transformers import pipeline
2
3# Load the text and image to text pipeline
4pipe = pipeline("image-text-to-text", model="HiTZ/Latxa-Qwen3.5-4B")
5
6# Messages can be of many types
7messages = [
8 {
9 "role": "user",
10 "content": [
11 {"type": "image", "image": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png"},
12 {"type": "text", "text": "What do we see in this image?"},
13 ]
14 }
15]
16output = pipe(messages)
17print(output)[!Tip] We recommend using the following set of sampling parameters for generation
- Thinking mode for general tasks:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0- Thinking mode for precise coding tasks (e.g. WebDev):
temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0- Instruct (or non-thinking) mode for general tasks:
temperature=0.7, top_p=0.8, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0- Instruct (or non-thinking) mode for reasoning tasks:
temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0Please note that the support for sampling parameters varies according to inference frameworks.
multi variant, it was additionally adapted for Galician and Catalan.| Task | Q3-VL-4B | Q3-VL-4B eu | Q3-VL-4B multi | Q3.5-4B | Q3.5-4B multi |
|---|---|---|---|---|---|
| Arc Challenge | 53.75 | 75.09 (+21.34) | 75.34 (+21.59) | 70.22 | 80.55 (+10.33) |
| Arc Easy | 66.20 | 87.58 (+21.38) | 87.58 (+21.38) | 82.07 | 89.60 (+7.53) |
| BeleBele | 69.67 | 80.67 (+11.00) | 79.00 (+9.33) | 79.78 | 86.33 (+6.55) |
| BertaQA global | 60.66 | 69.06 (+8.40) | 69.65 (+8.99) | 65.05 | 73.54 (+8.49) |
| BertaQA local | 40.27 | 53.43 (+13.16) | 54.36 (+14.09) | 40.74 | 62.82 (+22.08) |
| BL2MP | 55.89 | 90.17 (+34.28) | 90.28 (+34.39) | 71.00 | 91.61 (+20.61) |
| Eus Exams | 47.21 | 55.39 (+8.18) | 56.40 (+9.19) | 50.24 | 58.06 (+7.82) |
| Eus Proficiency | 28.98 | 51.00 (+22.02) | 51.77 (+22.79) | 34.79 | 61.60 (+26.81) |
| Eus Reading | 42.33 | 63.92 (+21.59) | 64.49 (+22.16) | 61.36 | 73.58 (+12.22) |
| Eus Trivia | 44.49 | 56.27 (+11.78) | 57.55 (+13.06) | 46.18 | 62.45 (+16.27) |
| MGSM CoT | 39.20 | 58.40 (+19.20) | 62.40 (+23.20) | 54.00 | 62.80 (+8.80) |
| MMLU | 51.48 | 55.19 (+3.71) | 57.41 (+5.93) | 46.67 | 60.74 (+14.07) |
| OpenBook QA | 42.80 | 70.40 (+27.60) | 71.60 (+28.80) | 62.60 | 71.80 (+9.20) |
| PIQA | 56.81 | 64.49 (+7.68) | 68.68 (+11.87) | 63.51 | 76.03 (+12.52) |
| SIQA | 47.54 | 61.67 (+14.13) | 62.59 (+15.05) | 54.91 | 63.40 (+8.49) |
| X-StoryCloze | 50.63 | 61.22 (+10.59) | 61.81 (+11.18) | 56.25 | 67.31 (+11.06) |
| AVG EU | 49.93 | 65.81 (+15.88) | 66.93 (+17.00) | 58.71 | 71.39 (+12.68) |
[!WARNING] DISCLAIMERThese model are still under development. The results are only reported for Basque tasks, the results in the rest of the languages will be released in the near future.
1@inproceedings{sainz-etal-2025-instructing,
2 title = "Instructing Large Language Models for Low-Resource Languages: A Systematic Study for {B}asque",
3 author = "Sainz, Oscar and
4 Perez, Naiara and
5 Etxaniz, Julen and
6 Fernandez de Landa, Joseba and
7 Aldabe, Itziar and
8 Garc{\'i}a-Ferrero, Iker and
9 Zabala, Aimar and
10 Azurmendi, Ekhi and
11 Rigau, German and
12 Agirre, Eneko and
13 Artetxe, Mikel and
14 Soroa, Aitor",
15 editor = "Christodoulopoulos, Christos and
16 Chakraborty, Tanmoy and
17 Rose, Carolyn and
18 Peng, Violet",
19 booktitle = "Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing",
20 month = nov,
21 year = "2025",
22 address = "Suzhou, China",
23 publisher = "Association for Computational Linguistics",
24 url = "https://aclanthology.org/2025.emnlp-main.1484/",
25 doi = "10.18653/v1/2025.emnlp-main.1484",
26 pages = "29124--29148",
27 ISBN = "979-8-89176-332-6",
28 abstract = "Instructing language models with user intent requires large instruction datasets, which are only available for a limited set of languages. In this paper, we explore alternatives to conventional instruction adaptation pipelines in low-resource scenarios. We assume a realistic scenario for low-resource languages, where only the following are available: corpora in the target language, existing open-weight multilingual base and instructed backbone LLMs, and synthetically generated instructions sampled from the instructed backbone. We present a comprehensive set of experiments for Basque that systematically study different combinations of these components evaluated on benchmarks and human preferences from 1,680 participants. Our conclusions show that target language corpora are essential, with synthetic instructions yielding robust models, and, most importantly, that using as backbone an instruction-tuned model outperforms using a base non-instructed model. Scaling up to Llama 3.1 Instruct 70B as backbone, our model comes near frontier models of much larger sizes for Basque, without using any Basque instructions. We release code, models, instruction datasets, and human preferences to support full reproducibility in future research on low-resource language adaptation."
29}