Views
No views yet

Basira (بصيرة) — insight, deep vision, perception. The capacity not just to see, but to understand what is seen.
Nemotron-3-Nano-Omni-30B-A3B-Reasoning, fine-tuned on the Pearl Dataset dataset for image-grounded Arabic question answering.nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning) plus this adapter on top.1import torch
2from PIL import Image
3from peft import PeftModel
4from transformers import AutoModelForCausalLM, AutoProcessor, BitsAndBytesConfig
5
6BASE = "nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning"
7ADAPTER = "Omartificial-Intelligence-Space/basira-omni-30b-v0.1"
8
9bnb = BitsAndBytesConfig(
10 load_in_4bit=True,
11 bnb_4bit_quant_type="nf4",
12 bnb_4bit_compute_dtype=torch.bfloat16,
13 bnb_4bit_use_double_quant=True,
14 llm_int8_skip_modules=[
15 "vision_tower", "vision_model", "vision_embed_tokens",
16 "audio_tower", "audio_model",
17 "multi_modal_projector", "mm_projector",
18 "mamba", "lm_head",
19 ],
20)
21
22processor = AutoProcessor.from_pretrained(BASE, trust_remote_code=True)
23base_model = AutoModelForCausalLM.from_pretrained(
24 BASE,
25 quantization_config=bnb,
26 device_map="auto",
27 trust_remote_code=True,
28 torch_dtype=torch.bfloat16,
29 attn_implementation="eager",
30)
31model = PeftModel.from_pretrained(base_model, ADAPTER)
32model.eval()
33
34# Inference
35image = Image.open("your_image.jpg").convert("RGB")
36question = "ما الذي يظهر في الصورة؟" # "What appears in the image?"
37
38conv = [{"role": "user", "content": [
39 {"type": "image"},
40 {"type": "text", "text": question},
41]}]
42prompt = processor.apply_chat_template(conv, tokenize=False, add_generation_prompt=True)
43inputs = processor(text=prompt, images=image, return_tensors="pt").to(model.device)
44
45# Filter processor extras the base LM doesn't accept
46keep = {"input_ids", "attention_mask", "pixel_values"}
47gen_inputs = {k: v for k, v in inputs.items() if k in keep}
48
49with torch.no_grad():
50 out = model.generate(**gen_inputs, max_new_tokens=384,
51 do_sample=False, repetition_penalty=1.05)
52
53answer = processor.tokenizer.decode(
54 out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True
55)
56print(answer)⚠️ The model's outputs are wrapped in a chat-template structure like[{'type': 'text', 'text': '...'}]that it learned during training. Strip that wrapper at inference time if you want clean text.


[{'type': 'text', 'text': '...'}] chat-template structure. Post-process at inference time.1@misc{basira-omni-2026,
2 title = {Basira Omni 30B v0.1: An Arabic Vision-Language Model},
3 author = {Omartificial-Intelligence-Space},
4 year = {2026},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/Omartificial-Intelligence-Space/basira-omni-30b-v0.1}
7}1@misc{nemotron-3-nano-omni-2025,
2 title = {Nemotron-3-Nano-Omni-30B-A3B-Reasoning},
3 author = {NVIDIA},
4 year = {2025},
5 url = {https://huggingface.co/nvidia/Nemotron-3-Nano-Omni-30B-A3B-Reasoning}
6}
7
8```bibtex
9@inproceedings{alwajih-etal-2025-pearl,
10 title = "Pearl: A Multimodal Culturally-Aware {A}rabic Instruction Dataset",
11 author = "Alwajih, Fakhraddin and
12 Magdy, Samar M. and
13 El Mekki, Abdellah and
14 Nacar, Omer and
15 Nafea, Youssef and
16 Abdelfadil, Safaa Taher and
17 Yahya, Abdulfattah Mohammed and
18 Luqman, Hamzah and
19 Almarwani, Nada and
20 Aloufi, Samah and
21 Qawasmeh, Baraah and
22 Atou, Houdaifa and
23 Sibaee, Serry and
24 Alsayadi, Hamzah A. and
25 Al-Dhabyani, Walid and
26 Al-shaibani, Maged S. and
27 El aatar, Aya and
28 Qandos, Nour and
29 Alhamouri, Rahaf and
30 Ahmad, Samar and
31 AL-Ghrawi, Mohammed Anwar and
32 Yacoub, Aminetou and
33 AbuHweidi, Ruwa and
34 Lemin, Vatimetou Mohamed and
35 Abdel-Salam, Reem and
36 Bashiti, Ahlam and
37 Ammar, Adel and
38 Alansari, Aisha and
39 Ashraf, Ahmed and
40 Alturayeif, Nora and
41 Alcoba Inciarte, Alcides and
42 Elmadany, AbdelRahim A. and
43 Tourad, Mohamedou Cheikh and
44 Berrada, Ismail and
45 Jarrar, Mustafa and
46 Shehata, Shady and
47 Abdul-Mageed, Muhammad",
48 editor = "Christodoulopoulos, Christos and
49 Chakraborty, Tanmoy and
50 Rose, Carolyn and
51 Peng, Violet",
52 booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2025",
53 month = nov,
54 year = "2025",
55 address = "Suzhou, China",
56 publisher = "Association for Computational Linguistics",
57 url = "[https://aclanthology.org/2025.findings-emnlp.1254/](https://aclanthology.org/2025.findings-emnlp.1254/)",
58 pages = "23048--23079",
59 ISBN = "979-8-89176-335-7"
60}