Downloads · 30 days
11
9% of all-time downloads
uzairkhn/Almas-Pashto-AI
Almas-Pashto-AI is a image-text-to-text model from uzairkhn. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
Almas Pashto AI is a custom, standalone Pashto's first ever Vision-Language Model (VLM) fine-tuned on the 4-Billion parameter google/gemma-3-4b-it base architecture.
Downloads · 30 days
11
9% of all-time downloads
All-time downloads
119
Public
Parameters
4.3B
17.3 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors8.6 GB · 100%
From the Hugging Face model README
Almas Pashto AI is a custom, standalone Pashto's first ever Vision-Language Model (VLM) fine-tuned on the 4-Billion parameter google/gemma-3-4b-it base architecture.
It has been meticulously fine-tuned on a huge amount of high-quality Pashto data to deeply understand, generate, and reason in the Pashto language. Crucially, it completely retains its native visual processing capabilities (such as Optical Character Recognition and complex image analysis), making it a fully functioning multimodal assistant natively fluent in Pashto.
Because this model is a fully merged standalone architecture, you can load it directly using standard Hugging Face transformers libraries without needing any separate adapter configurations.
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText, BitsAndBytesConfig
# Direct repository ID
model_id = "uzairkhn/Almas-Pashto-AI"
print("Loading processor...")
processor = AutoProcessor.from_pretrained(model_id)
print("Configuring 4-bit quantization...")
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16
)
print("Loading Almas Pashto AI...")
model = AutoModelForImageTextToText.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto"
)
# Example Inference
test_prompt = "مصنوعي مصنوعي ځیرکتیا څه شی دی؟"
messages = [
{"role": "user", "content": [{"type": "text", "text": test_prompt}]}
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=[text], return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.7,
do_sample=True,
repetition_penalty=1.1
)
generated_text = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True)
print(generated_text)